Miércoles, Mayo 31, 2006

Accediendo a los “stats” con WordPress

A algún que otro usuario de Dreamhost puede ser que le venga bien este pequeño truco. En mi caso la instalación por defecto de WordPress crea un fichero “.htaccess” con este contenido:


RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

Estos rewrites hacen que todas las páginas que no sean un fichero (”!-f”) o un directiorio (”!-d”) se redireccionen a index.html. De esta forma wordpress puede manejar los 404, etc cuando un fichero o directorio no existe. El problema es cuando tenemos directorios mapeados como rutas, es decir, que físicamente no existen aunque deberían servirse. Por ejemplo, en dreamhost toda las páginas tienen estádisticas en “domino/stats”, en mi caso “www.pplux.com/stats”.

Para solucionarlo, añadimos una excepción en el fichero .htaccess.


RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^/stats$
RewriteCond %{REQUEST_URI} !^/stats/(.*)$
RewriteCond %{REQUEST_URI} !^/failed_auth.html$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

y arreglado. :D

Update Después de probarlo… resulta que estaba documentado XD

posteado por PpluX @ 4:06 pm tags:Personal  

Sábado, Mayo 27, 2006

Acabando con el Spam

Estoy probando Spam Karma 2 según me comentó kraptor. A ver si de una vez por todas me quito toooda la cantidad de spam que me llegaba diariamente.

De paso actualizamos a wordpress 2.0.2 :)

posteado por PpluX @ 12:51 pm tags:Personal  

Jueves, Mayo 11, 2006

Learn cool spanish!

Genial… sencillamente genial para todos vuestros amigos extranjeros para que sepan el argot-más-cool del español, con sonido, transcripciones y su traducción al inglés para que sepan qué están diciendo. cool-spanish! (y por la BBC ni más ni menos!)

Algún ejemplo…
¡Y un cojón me voy a levantar yo a las 7 para ayudarle!
No way am I getting up at 7 to help him!

Pide la dolorosa, veremos cuánto nos clavan
Ask for the bill, let’s see how much they rip us off for.

Abrió la puerta en pelotas, ¡imagínate!
He opened the door butt naked, can you imagine!

¡Joder! ¡Menuda resaca tengo! Fue el puto vino de ayer
Bloody hell! I am so hungover! It was that crap wine yesterday.

Me importa un pimiento/pepino/comino/pito/tres cojones
Lit. I care as much as a pepper/cucumber/cumin seed/a whistle/three testicles. In other words, I don’t give a damn.

El móvil que se compró está guay del Paraguay
The mobile he bought is really, really cool.

Mierda, he vuelto a perder las llaves!
Shit, I’ve lost the keys again

¿Qué?/¿Eh? I don’t understand.
¡Ay! Ouch! That hurts.
¡Pufff…!/¡Uf! Yuck, yuck (smell).

Tocar los huevos/las narices
Lit. To touch (someone’s) testicles/noses (yes, in plural to add more drama!). To piss (someone) off.

Lleva todo el día tocándome las narices y se va a arrepentir
She’s been getting on my nerves all day and she’s going to regret it.

¡Vete a freír espárragos!
Lit. Go off and fry asparagus. Basically disappear and do whatever you want as long as it is out of my sight!

La muy cabrona le robó el dinero
The bitch stole his money.

Tengo que ir al puto médico
Lit. I have to go to the prostitute doctor. I have to go to the effing doctor.

No paramos de reír en toda la tarde, es que es un cachondo mental…
We did not stop laughing the whole evening, he is bonkers …
Warning - don’t confuse with estar cachondo/cachonda which means “to be on heat/horny”!

Bueno y así todas :D

Gracias a Miguel por el link.

posteado por PpluX @ 9:33 am tags:Personal  

Domingo, Mayo 7, 2006

Simple Lua Binder (SLB)

Simple Lua Binder is an everything-in-one-header (two actually) to make C++ <-> lua bindings easily. It is based on the C++ template mechanism to compile wrappers on the fly to access classes and methods. It is not well documented, that is a task I will do in the near future, by the way SLB lib can be found at http://svn.pplux.com/lab/SLB. Drop me a line if you try to use it and it works (or not), it should work with any C++ compiler (It has been tested on GCC).
Update April 2007: I’m working in a fresh subversion for a complete new version of SLB… it will be released at slb.luaforge.net

posteado por PpluX @ 2:47 pm tags:C/C++, Lua, Programación  

Gestionado con WordPress