martes, 13 de octubre de 2009

<Audio> play

I've created a simple script that will add an audio player next to each mp3, ogg or oga link, using the HTMLv5 audio element (it requires a web browser that supports it).
The size and style of the audio player controls depends on the browser you are using.

You can check it out at UserScripts:

The script is in fact shorter than this entry :P ..very simple but I still found it interesting to do.

Any suggestion, modification or just feedback is welcome.

Dulce introducción al caos (sweet introduction to chaos)

Extremoduro - Dulce introducción al caos

"Literal" English translation for spanish learners

I'm sorry if the english is grammatically incorrect here, but I think it's still understandable and it might be better this way so that it can help people learning Spanish to see the relationship between the words from both languages.

¿Cómo quieres que escriba una canción?
How do you want that I write a song?

Si a tu lado no hay reivindicación.
If at your side there's no demand.

La canción de que el tiempo no pasara,
The song about the time not running,

donde nunca pasa nada.
where it never happens anything.

Una racha de viento nos visitó,
A gust of wind visited us,

y al árbol ni una rama se le agitó.
and to the tree no branch was shaked.

La canción de que el viento se parara,
The song about the wind stopping,

donde nunca pasa nada.
where it never happens anything.

Un otoño el demonio se presentó,
In Autumm the demon introduced himself,

fue cuando el arbolito se deshojó.
it was when the leaves of the little tree fell.

La canción de que el tiempo se atrasara,
The song about the time going back,

donde nunca pasó nada.
where it never happens anything.

Una racha de viento nos visitó,
A gust of wind visited us,

pero nuestra veleta ni se inmutó.
but our vane didn't even noticed.

La canción de que el viento se parara,
The song about the wind stopping,

donde nunca pasa nada.
where it never happens anything.

Mientras tanto pasan las horas,
Meanwhile the hours run out,

sueño que despierto a su vera,
I dream that I wake up next to her,

me pregunto si estara sola,
I wonder if she will be alone,

y ardo dentro de una hoguera.
and I burn inside a fire.

Como quieres que escriba una canción?
How do you want that I write a song?

Si a tu lado he perdido la ambición.
If next to you I've lost the ambition.

La canción de que el tiempo no pasara,
The song about time not running,

donde nunca pasa nada.
where it never happens anything.

Se rompió la cadena que ataba el reloj a las horas,
It was broken the chain that tied the clock to the hours,

se paró el aguacero, ahora somos flotando dos gotas,
it was stopped the rain, now we are two floating drops,

agarrado un momento a la cola del viento me siento mejor,
grabbing for a while the tail of the wind I'm feeling better,

me olvidé de poner en el suelo los pies y me siento mejor.
I forgot of putting on the ground the feet and I'm feeling better.

¡volar, volar!
fly! fly!

Una racha de viento nos visitó,
A gust of wind visited us,

y a nosotros ni el pelo se nos movió.
and to us not even the hair moved.

La canción de que el viento se parara,
The song about the wind stopping,

donde nunca pasa nada.
where it never happens anything.

Ya no queda una piedra en pie,
There's no stone left in place,

porque el viento lo derribó,
because the wind demolished it,

no, no hay esa canción.
no, there's no that(such) song.

Ya no queda nada de ayer,
There's left nothing from yesterday,

porque el viento se lo llevó,
because the wind took it,

no, no hay esa canción.
no, there's no that(such) song.

lunes, 12 de octubre de 2009

Depente (It depends)

Jarabe de palo lyrics: Depende

"Literal" English translation for spanish learners

Que el blanco sea blanco
That the white is white

y que el negro sea negro,
and that the black is black,

que uno y uno sean dos
that one and one is two

porque exactos son los números........ depende.
because exacts are the numbers........ it depends.

Que aquí estamos de prestao,
That here we are temporarily,

que hoy el cielo está nublao,
that today the sky is cloudy,

que uno nace y luego muere,
that one is born and later dies,

y este cuento se ha acabao........ depende.
and this tale has ended........... it depends.

chorus {

Depende, ¿de qué depende?,
It depends, what does it depend on?

de según como se mire todo depende.
on how you look at it, everything depends.


Qué bonito es el amor,
How beautiful love is,

más que nunca en primavera,
more than ever in spring,

que mañana sale el sol
that tomorrow raises the sun

porque estamos en agosto........ depende.
because we are in August........ it depends.

Que con el paso del tiempo
That with the running of the time

el vino se hace bueno,
the wine turns good,

que todo lo que sube baja
that everything that goes up goes down

de abajo a arriba y de arriba a abajo........ depende.
from down to up and from up to down.......... it depends.


Que no has conocido a nadie
That you have known no one

que te bese como yo,
that kisses you like I do,

que no hay otro hombre en tu vida
that there's no other man in your life

que de ti se beneficie........ depende.
that from you is getting...... it depends.

Y si quieres decir sí
And if you want to say yes

cada vez que abres la boca,
every time you open your mouth

que te hace muy feliz
that it makes you very happy

que sea el día de tu boda............ depende.
that is the day of your marriage... it depends.



La rosa de los vientos (The rose of the winds)

Mägo de Oz song lyrics: La rosa de los vientos

"Literal" English translation for spanish learners

Si siembras una ilusión
If you seed an illusion

y la riegas con tu amor
and you water it with your love

y el agua de la constancia
and the water of the constance

brotará en ti una flor
it will grow in you a flower

y su aroma y su calor
and its smell and its warmth

te arroparán cuando algo vaya mal
will cover you when something goes wrong

Si siembras un ideal
If you seed an ideal

en la tierra del quizás
in the land of the "maybe"

y lo abonas con la envidia
and you fertilize it with the envy

será difícil arrancar
it will be hard to remove

la maldad
the evilness

de tu alma si hecha raíz
of your soul if it grows root

chorus {

y que mi luz te acompañe
and that my light be with you

pues la vida es un jardín
because the life is a garden

donde lo bueno y lo malo
where the good and the bad

se confunden y es humano
are mixed and it's human

no siempre saber elegir
to not know always what to choose

Y si te sientes perdido,
And if you are feeling lost,

con tus ojos no has de ver.
with your eyes you must not see.

Hazlo con los de tu alma
Do it with the ones in your soul

y encontrarás la calma
and you will find the calm

Tu rosa de los vientos seré
Your rose of the winds I'll be


Si siembras una amistad
If you seed a friendship

con mimo plántala
with tenderness plant it

y abónala con paciencia
and fertilize it with patience

Pódala con la verdad
Cut it with the truth

y transplántala con fé
and transplant it with faith

Pues necesita tiempo y crecer
because it needs time and to grow

Si te embriagas de pasión
If you are drunk of passion

y no enfrías tu corazón
and you dont cold your heart

tartamudearán tus sentidos y quizás
your senses will stutter and maybe

hablarás con el calor y no la razón
you'll speak with the hot and not the reason

Es sabio contar hasta diez
It's wise to count to ten


martes, 6 de octubre de 2009

Instant Translate Bookmarklet

I've made a bookmarlet to instant translate a selection of text.

Drag this link and drop it into your bookmark bar: [Translate(en)]

You just have to select any text in a website (not too much or else it won't work) and it will automatically translate any text from any language into english (for other languages just edit the lang='en'; at the beggining of the url to suit your language code). If there's no selection of text it will translate the whole website instead.

jueves, 27 de agosto de 2009

Microshop photo fail

Not long ago, a Photoshop Disaster was found in the Microsoft Polish website.Microsoft photoshopped a black man out of a picture for their Polish website and replaced it with a white guy.

Now, there's a meme initiated in techcrunch about modificated versions of the picture.
So.. I decided to give a try for the contest :P
And.. given that Microsoft company and marketing decisions are so upside down... I thought that perhaps if I did this I could try to fix it.

lunes, 4 de mayo de 2009

The Magic "System Request" key in Linux

There's something useful that I keep forgetting when I'm using Linux, something that I would like to keep a record about, and I thought that a good way to do it would be by writing it in this blog.

The System Request key, "SysRq" in English keyboards ("Pet Sis" in Spanish ones, short for "Petición de Sistema") is the useless-looking key that is sitting right next to your (also useless-looking) "Pause" key.

However, this key plays an important role for a Linux System administrator, because it can be used to send system calls directly to the kernel. Sometimes, speaking directly to the kernel is the only way to save the day.

For example... imagine that suddenlty your whole system hangs. It's frozen... there's some process using 100% of the resources of the system.. your mouse doesn't move.. the Control+Alt+F2 key doesnt work... you can't do anything! Arghh!! what to do!!??

In Windows the only possible solution to this situation would be to forcefully disconnect your PC, make it loose any data you had sent and take the risk to damage your hard disk, motherboard, CPU and all the hardware that you were using at that time.

However, if you are using the Linux kernel, there's still some chance for salvation.... sending a System Request...

Press AltGr+SysRq+R (unRaw, releasing your keyboard from X control)
Press AltGr+SysRq+E (tErminate, sending a SIGTERM to close gracefully the running programs)
Press AltGr+SysRq+I (kIll, send a SIGKILL to inmediatelly close the remaining programs)
Press AltGr+SysRq+S (Sync, saving the data to the disk so that you won't loose the last changes)
Press AltGr+SysRq+U (Unmount all the disks, so that they won't be damaged)
Press AltGr+SysRq+B (reBoot the system)


If you are like me, you'll forget this shortcuts easily.
You can do like me, and write in a blog about that... or try to remember it by using some hints. Here are some of them:
"Reboot Even If System Unbelievably Broken"
BUSIER backwards
"Raising Elephants Is So Utterly Boring"
You can also Sync the disks before terminating programs if you want:
"Raising Skinny Elephants Is Utterly Boring" (because if they are fat it would rather be utterly deadly...)

Note: if you are not using a QWERTY keyboard the keys can be different for you
You can also read more about other SysRq shorcuts here:

sábado, 2 de mayo de 2009


Lately I've started watching a series that has kept me stuck to the screen the whole day!

"Heroes" is a science fiction drama about normal people who suddenly start discovering that they have some special abilities. Even thought the series is called "Heroes" you won't see the stereotypical superhero that wear bright colors, long panties and is wearing the underwear on top, this people is just normal people... they just suddenly discover that they have special abilities, slowly growing on them.

The plot of each season has small story arcs built into the series' overall large story arc plot. Each season of Heroes is designed to involve ordinary people who discover extraordinary powers, and how these abilities take effect in the character's lives. There's a mix of small stories that create a tangled pattern that keeps you wondering how they relate each other...

I'm not really very fond of American comics about superheroes (with only a few exceptions...) but this series is really cool!! ...I specially like some characters like the japanese guy (Hiro Nakamura) who is a funny boy (you may say "otaku") who one day discovers that he can control time and goes screaming YATAAAA!!! running all around his workplace. There are also some charismatic characters like a painter who can paint scenes from the future when he is on drugs. I won't say much more to avoid any more spoiling...

So... in case you want to start watching a bit.. I'll post here the first 3 episodes (I've always thought that you have to watch at least 3 episodes of a series before being able to judge). However... be warned.. they are long (40min each!)... but they are also addicting!

(Note: The videos in Tu.TV (you can find also more episodes there) are low quality, and sometimes they suddenly stop. If that happens you can also find the videos in seriesyonkis, but if you don't know spanish you'll have to choose the english audio version with spanish subtitles)

Heroes Season 1 Episode 01


Heroes Season 1 Episode 02


Heroes Season 1 Episode 03


There are also some graphic novels (comics) about Heroes.

You can find the comics in the official page or also in the wikipedia article about this comics.

There's also a wiki where you can find a lot more information about the Heroes series, but I recommend you all to not enter if you have not watched at least a few seasons, because it's filled with spoilers.

Now I'll go.. I still have much to watch ;) ...see ya! -Teleports himself- >.<

jueves, 30 de abril de 2009

Apt-linker: easy way to install apps by clicking "apt-get install" links

Since the day that Ubuntu Gutsy was released it has been including a useful tool that allows package installing directly from the browser by means of "apt://" links:

However, the usage of this tool is not very extended in the web. that's why I've thought of writting a small script for automatically creating apturls

I hope that this script is able to ease the life of GNU/Linux users in Ubuntu (or Debian) who browse the Internet searching for software, tutorials, etc. and find apt-get/aptitude lines all around.

What this script does is to turn lines of text like this:

sudo apt-get install emacs emacs-goodies-el windows-el jde js2-mode
aptitude install freepats timidity-interfaces-extra timidity-el tuxguitar

into clickable links that will launch a graphical installer for each of the packages in the line.
Like this:

sudo apt-get install emacs emacs-goodies-el windows-el jde js2-mode
aptitude install freepats timidity-interfaces-extra timidity-el tuxguitar

If this links don't work for you then it means that you are not using Ubuntu or that you have a Debian derivative that doesn't have the apturl package installed. You can try to install it doing this:

sudo aptitude install apturl
# (this might be probably the last time you'll have to copy that on a terminal)

If you want to install this script on Firefox you will need first to install the Greasemonkey add-on (there's also versions of this add-on for other browsers, but I've not tried that).

Once you have Greasemonkey installed you will be able to install the script from HERE (and you may want to browse that website too, there are a lot of other interesting scripts).

For the making of this script I've used the GREAT help of the findAndreplace algorithm by James Padolsey, thanks!

The Ethernal Flame (God wrote in Lisp)

I was taught assembler in my second year of school.
It's kinda like construction work -- with a toothpick for a tool.
So when I made my senior year, I threw my code away,
And learned the way to program that I still prefer today.

Now, some folks on the Internet put their faith in C++.
They swear that it's so powerful, it's what God used for us.
And maybe it lets mortals dredge their objects from the C.
But I think that explains why only God can make a tree.

For God wrote in Lisp code
When he filled the leaves with green.
The fractal flowers and recursive roots:
The most lovely hack I've seen.
And when I ponder snowflakes, never finding two the same,
I know God likes a language with its own four-letter name.

Now, I've used a SUN under Unix, so I've seen what C can hold.
I've surfed for Perls, found what Fortran's for,
Got that Java stuff down cold.
Though the chance that I'd write COBOL code
is a SNOBOL's chance in Hell.
And I basically hate hieroglyphs, so I won't use APL.

Now, God must know all these languages, and a few I haven't named.
But the Lord made sure, when each sparrow falls,
that its flesh will be reclaimed.
And the Lord could not count grains of sand with a 32-bit word.
Who knows where we would go to if Lisp weren't what he preferred?

And God wrote in Lisp code
Every creature great and small.
Don't search the disk drive for man.c,
When the listing's on the wall.
And when I watch the lightning
Burn unbelievers to a crisp,
I know God had six days to work,
So he wrote it all in Lisp.

Yes, God had a deadline.
So he wrote it all in Lisp.

This song is part of the Roundworm album.

lunes, 27 de abril de 2009

.... .- .--. .--. -.-- | -... .. .-. - .... -.. .- -.-- !!!

Happy Birthday Samuel Morse!
Today Google has updated its logo to commemorate the birth of the father of the Morse code!
[Source: Lunatic Rabbit]

For commemorating it myself, here's a mnemonic image I composed (based on G.Reinhold's) to show the alphabet on Morse code in a dichotomic tree (you can follow the tree from up to down, going right when there's a dot, and left when there's a dash)

And here's a Morse code converter in javascript!:

Type in a word or phrase:

miércoles, 25 de febrero de 2009

Rechazo al software privativo: ¿fanatísmo o ideología?

En una entrada de se ha formado un pequeño debate acerca del "fanatísmo linuxero". Y, como pasa a menudo con estas cosas, suelen ser mas interesantes los comentarios que se generan alrededor de un texto que el texto en sí.

Sólo queria citar un par de anecdotas que ha contado uno de los que ha intervenido en la discursión, Sergi.

La primera anécdota, me ocurrió en las oficinas de un cliente mío: una gran editorial para la que estaba desarrollando un software privativo (en aquel entonces ni había oído hablar de SL) como complemento a uno de sus libros. Estaba yo entrevistando con uno de sus jefes editores, con el cuál yo tenía mucha confianza. Casualmente vi en unas estanterías que ellos tenían expuestos unos cuantos manuales (de esos de 500 hojas) de cómo utilizar el famoso y conocido DSM (la biblia de los psicólogos de medio mundo, que resumidamente es como un diccionario enciclopédico con todos los transtornos psicológicos bien definidos por sus síntomas y tratamientos habituales, publicado por la APA). La cuestión es que le comenté que casualmente un compañero de doctorado precisamente había desarrollado un software de inteligencia artificial que precisamente aspiraba a ayudar a los profesionales médicos de la psicología y la psiquiatría a sacar el máximo provecho del DSM, puesto que el software en cuestión pedía al médico un INPUT con los síntomas y devolvía una lista ordenada por mayor probabilidad de los transtornos que se corresponden con los mismos. Bueno... mi sorpresa vino cuando mi interlocutor, se alarmó muchísimo y me dijo muy preocupado: Sergi, a ese amigo tuyo ni que le ocurra publicar algo así... nosotros somos los únicos en habla hispana que tenemos la licencia para explotar comercialmente el DSM !! Yo en seguida le tranquilicé, intentando darle la vuelta al asunto y tal vez sacar algo de provecho: pues más fácil me lo pones.. ¿porque no propones a quien dependa que elaboremos este software de forma más comercial? Y él dijo: no no nooo... para nada!!! ¿Sergi, tú no sabes de qué va esto! Nosotros con lo que nosotros GANAMOS DINERO es vendiendo PAPEL. ¿Sabes la de dinero que ganamos vendiendo toda esta estantería llena de libros que explican cómo utilizar el DSM?! no nos interesa para nada un software así! Uf.... chicos, aquel día fue peor que cuando descubrí que los Reyes Magos no existen... :(((

Así que resulta que a las grandes corporaciones -que son las que tienen todas o casi todas las patentes y licencias privativas- les importa un pepino el progreso de la sociedad, la efectividad de nuestros médicos y profesionales, el progreso en general!!!!! Seguramente no digo nada que todos no supierias, pero necesito ponerlo como justificación -LA MENOS MIA Y PERSONAL- para oponerme desde aquel día al sistema de patentes!!! Me dirijo a Eduardo y a los otros que aún defendéis el software privativo: ¿no veis que el sistema de patentes -en un sentido amplio de la expresión- está frenando literalmente nuestro progreso y bienestar? ¿dónde estaría ya la civilización humana si no fuera por estas alimañas avariciosas!!!! no si es que cada vez que lo pienso me pongo….

La segunda anécdota no es tan filosófica, es mucho más pragmática. Y es más reciente: hace menos de un año, me contactó una PYME que había comprado meses antes, cuando empezó sus andaduras, un software de gestión contable y de stocks de licencia privativa. De hecho un paquete de origen francés muy bien posicionado en el mercado, del que no voy a dar el nombre, obviamente. La cuestión es que me llamaron porque querían que les montara una tienda virtual en web -a ser posible opensource(principalmente por el ahorro económico)- y querían que éste CMS se comunicara con el sistema privativo de gestión, que estaba operando en uno de los servidores de sus oficinas. Bueno, pues… solo deciros que fu prácticamente misión imposible!!!!!!!! a día de hoy, después de 8 meses en el proyecto me fui voluntariamente, y no sé si habrán conseguido hacerlo. ¿El problema? Que el “bueniiiiisimo” software privativo de gestión solo ofrecía una limitadisima API que además presentaba una colección de bugs, que incluso ESTABAN DOCUMENTADOS COMO TALES EN SU DOCUMENTACIÓN! la única respuesta o posibilidad que daban la empresa PROPIETARIA del sowftare de gestión era contratarles a ellos la elaboración del puente entre ambas aplicaciones! ¿conclusión? mi cliente acabó harto hartísimo y se arrepintió de haber contratado ese sofwtare en su día. Obviamente este ejemplo no quiere decir que siempre que se contrata o compra un software privativo tiene que ser de consecuencias tan perjudiciales, obvio que no. Pero tenéis que admitir que cuando se trata de software privativo UNO PIERDE CASI CUALQUIER POSIBILIDAD DE MODIFICAR O ENTENDER EL CODIGO QUE HA COMPRADO con lo que cualquier intento de hacerlo más productivo o más adaptado a las necesidades de uno es misión imposible!!!

Eduardo, eso es lo que tanto recrimina Stallman al códgio privativo. De hecho, me atrevería a decir -por lo que he leído- de que es lo ÚNICO y lo BÁSICO de su lucha pro el software libre: QUE EL USUARIO O COMPRADOR DEL SOWFTARE TENGA LA LIBERTAD DE MODIFICAR LA APLICACIÓN SEGÚN SUS NECESIDADES. Es que el colmo es que aún habiendo pagado por ello uno le sea negado eso!!! ¿cómo nos hemos acostumbrado a eso?

miércoles, 18 de febrero de 2009

Bash snippets

This entry is just for storing some useful bash snippets that I may forget...
I'll keep it updated when I find more.

Some of this snippets would do nice if used as aliases ^^

Show the disk usage of the files and directories, sorted by size (useful when cleaning the disk)
du -ms * | sort -nr | $PAGER
If you want it to show all the files in the directory tree...
du -m * | sort -nr | $PAGER

Search all the coincidences of a regular expression (POSIX) recursively in all the files and display the line and context where they were found.
grep --color -nIHr . -e REGULAR_EXPRESSION
Excluding backups, hidden files/directories (beware of excluding "." and ".."), etc...
grep --color --exclude=*[~#] --exclude-dir=.??* -nIHr . -e REGULAR_EXPRESSION

Search and replace a string of text in all the files of a directory tree recursively...
find . -type f -exec sed -i 's/STRING1/STRING2/' {} \;

Archive all the files that haven't been modified within the last 60 days
find . -type f -mtime +60 | xargs tar -cvf `date '+%d%m%Y'_archive.tar`

Create a patch for all the changes between two directories.
diff -urNp OLD_DIRECORY NEW_DIRECTORY > file.patch

Download all the files ending with "PREFIX" found recursively (through 10 levels) from
wget -r -l 10 -A PREFIX

martes, 20 de enero de 2009

bye Bush! :D

Just a video in honor of the departure of maybe one of the worst leaders USA ever had.

miércoles, 7 de enero de 2009