Friday, May 13, 2011

Twitter is Down!!!

Now that twitter is down, we can get back to whatever the hell we did before being hooked up to twitter all day.

image gif 654-10

Saturday, November 13, 2010

Saturday Night Saved or vlc-sdl-yuv-color-awfulness

So you are sitting on your couch, popcorn's ready, movie is downloaded, you've downloaded the subs for the movie, you read the review in imdb. Everything is set to go. Then, suddenly, when you press play button on your vlc and you see the image with the colors all distorted. Oh my... so what do you do? cancel the movie night? NO way jose.

The automatic response is go pure logic. What changed in your Home theater pc recently? Nothing recently. Do other movies look like this? NO. Go directly to vlc image options and you see "VLC Chroma settings". Oh my.. what is chroma thing anyway. Did I touch it before? Yea, now I remember once I did this for other movie.... (I should've blogged this fix, now I don't remember). And in linux there's a chroma thingy called "xvinfo"... yea i've read this before. But why am I doing this again, because the lack of documentation... rethinking it all over. 

So here is the pic of the solution:


And here is explanation to save my precious saturday nights next time this happen.

RGB is the Red-plus-Green-Blue thingy (color space). YUV is just another way to map colors, a better way including brightness. My TV screen, and yours, uses RGB format. VLC in linux works using YUV formats because of xvideo/SDL driver (That is if you want to use hardware accelerated video).  So your video player have to interpret the YUV format in your movie file and pass it to the xvideo/SDL driver to show them on your TV or screen. Now here is the catch, your video player makes its best guess at doing this, the faster one according to the vlc documentation. Guess what happens? sometimes it fails. And when it fails, you see the colors all distorted. What's the fix? You have to provide the format manually, that means, try every YUV format your Xwindows supports ("xvinfo" will provide them for you).... 
Here is a list of all the formats. Once you found the one you want, the magic happens and your saturday is saved by googling and studying a little bit.

PD: I am no expert at this, if anyone has a suggestion or comment... it's most welcomed.
PD2: I am saying color awfulness MAY be because of this. But sometime it can mean some other things too....

Monday, November 01, 2010

More open source... VLC http home dir fix

¿Are you using vlc's http interface?, and you are annoyed by the fact that when you try to select a file to be played, you are shown the $HOME directory when you'd prefer another directory.

Here is the fix for you.

Go to this file:
$VLCPATH/share/vlc/http/dialogs/browse

And change this line

<input type="hidden" id="browse_lastdir"
value="~" />

For this:

<input type="hidden" id="browse_lastdir"
value="{PUT HERE YOUR
PREFERED PATH}" />

You're welcome.

Monday, August 02, 2010

Merecemos el infierno ... pero Dios merece que seamos salvos todos.

La verdad es que no valgo tanto para hablar tanto de mí, y tu tampoco. ¿Tengo baja estima? no. Solo soy realista, soy uno entre 6 mil millones de personas en el mundo. Y el mundo es una pequeña mota de polvo imperceptible en el universo. Y por si fuera poco duramos muy poquito tiempo viviendo. Que son 70 años comparado con los millones de años del universo.

Y por si fuera poco, somos pecadores. Conocemos el bien pero no queremos hacerlo . Ninguno de nosotros. Aun nuestros mejores hombres, los mejores pensadores: los científicos o los filósofos son motivados por la competencia. Nuestros avances en ciencia son motivados por el dinero y el dinero no es mas que un invento para diferenciarnos unos de otros, para medirnos y competir unos con otros. Lo que toda la vida hemos hecho, luchar como animales. Lo mejor que le podría pasar al Universo es que desapareciéramos. Imagina que la humanidad lograra crecer y expandirse por el Universo. Un universo entero lleno de guerra, hambre y miseria. De diferencias sociales. De ignorancia. De maldad. De egocentrismo. Hemos cambiado en la vida que llevamos de existencia como raza? no... nuestra forma de ser permanece igual. ¿Te parece algo bueno?. no ...no lo es.  Aunque todos en el planeta pasaramos la eternidad quemándonos en el infierno. El resto del universo respiraría en paz, en tranquilidad. 

Entonces ¿Porque debe un pequeño individuo como yo o como tu, arrepentirse delante de Dios? Si nuestra salvación no es tan importante.  Por una sola razón: Jesús merece todo el crédito, toda la alabanza por su entrega por nosotros. El murió por cada uno de esos pecados. Dios se entrego y saldo la deuda. Cumplió y pago por nuestras injusticias. Y merece que seamos transformados por el poder de su Sangre. Por haber pagado por todas nuestras maldades. El merece toda la alabanza por la eternidad. Por su amor.

Esta es la diferencia entre creer una religión y creer a Dios. La primera es que haces tu para llegar a Dios. La segunda es que ya hizo Dios para llegar a ti... Ahí comienza todo. 

¿Le darás tu corazón a Dios? o ¿ prefieres seguir en tus propósitos mundanos.... y tu vida normal... como la de la mayoría? 

Monday, July 26, 2010

Sacrificios...

" ... No ofreceré al SEÑOR mi Dios holocausto que no me cueste nada ... "
1 Crónicas 21:24


¿Te esta costando ser Cristiano?. Bienvenido al club de los Cristianos verdaderos.
Si no te cuesta es que no estas haciendo lo que debes. 


"...El que sacrifica alabanza me honrará: ..."
Salmos 50:23


No es solo alabar, es sacrificar. Lo que implica matar. Matar esa parte de nosotros mismos que no quiere alabar a Dios. Que no quiere obedecerle. Que no quiere la vida, que prefiere la muerte. Esa parte que simplemente se entrega a la destrucción.







Monday, January 18, 2010

The beauty of open source ... in Apache

There is a bug/feature in mod_headers that replaces all finishing line characters with blanks whenever you use mod_headers directive "set".
Most of the times this is OK, but when using SSL this can lead to problems parsing a PEM client certificate.
Because when you pass the client certificate to the application, you get a certificate with spaces in between. This is not the way an https accelerator would work.

That is when you have something like this in the httpd.conf


< Location /headers/ >
SSLOptions +ExportCertData
SSLVerifyClient require
SSLCACertificateFile /my/software/httpd/conf/ca.crt
RequestHeader set SSL-CLIENTCERT-PEM "%{SSL_CLIENT_CERT}e"
ProxyPass http://127.0.0.1:8080/headers/
ProxyPassReverse http://127.0.0.1:8080/headers/
< /Location >


And headers is an example web application (tomcat in my case) to output all http headers. (Not included in this post)

To fix this we have to remove all finishing line characters instead of replacing them with blanks. Here is the source code fix for this.

Apply this patch running patch:

patch mod_headers.c < /tmp/patch.txt


/tmp/patch
----------------------------------------------------------------------------------

-- httpd-2.2.14/modules/metadata/mod_headers.c 2010-01-15 09:08:01.544368411 +0100
+++ temp/httpd-2.2.14/modules/metadata/mod_headers.c 2009-05-04 22:40:20.000000000 +0200
@@ -178,17 +178,13 @@
{
if (ap_strchr_c(hdr, APR_ASCII_LF) || ap_strchr_c(hdr, APR_ASCII_CR)) {
char *ptr;
- char *ret;

- ret = ptr = apr_palloc(p, strlen(hdr)+1);
+ hdr = ptr = apr_pstrdup(p, hdr);

- while (*hdr){
- if (*hdr != APR_ASCII_LF && *hdr != APR_ASCII_CR)
- *ptr++ = *hdr;
- ++hdr;
- }
- *ptr = 0;
- hdr = ret;
+ do {
+ if (*ptr == APR_ASCII_LF || *ptr == APR_ASCII_CR)
+ *ptr = APR_ASCII_BLANK;
+ } while (*ptr++);
}
return hdr;
}

--------------------------------------------------------------------------------------------------

./configure
make
make install
profit!!

Your welcome.

Monday, November 30, 2009

Hace frío

El frío tiene un efecto increíble en nuestro cuerpo. Nos duelen los músculos. Nos quedamos quietos o tiritamos de frío. De cualquier manera, es imposible no sentirse mal y e intentar cubrirse para no sentir el frío. Por las mañanas, hace que lleguemos tarde al trabajo. Por las tardes, hace que no queramos volver a casa. A algunos los enferma,

Sin embargo, el frío en sí se define sólo por la existencia del calor. El frío es la ausencia de calor. Calor es cuando los átomos del aire están muy cerca unos de otros y generan energía. Frío es cuando no hace calor. Simplemente un nivel menor de energía en el ambiente. Sin embargo, no decimos: tengo falta de calor, decimos: Tengo frío. Es decir nos enfocamos en lo malo, en el problema, en vez de en lo bueno que estamos añorando.

Así como el frío al calor es la falta de amor al amor. Pero ¿qué es la falta de amor?. Es tristeza, es rabia, es depresión, es lucha contra el mundo, es desesperanza, es sentirse abandonado, es envidia, es agresión contra otros o contra nosotros mismos. Depende de lo que cada uno decida.

Todos estos son síntomas, y como en el caso del frío, inexistentes. Sentimientos que en sí sólo suceden porque te hace falta el amor. Y no en un sentido romántico, sino en un sentido real. El mismo amor que siempre has necesitado desde que salistes del vientre de tu madre, porque es que en realidad todos seguimos siendo bebes hasta los 99 años. Seguimos buscando atención, pero nos inventamos maneras diferentes de conseguirlas. Maneras

Pregunta: ¿Te sientes amado o amada? ¿Sabes lo que es sentirse amado?. O por el contrario: ¿Sientes tristeza o rabia sin razón? ¿Te sientes solo o sola? ¿Cuál es tu manera de buscar el amor?

Saludos