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
apt://oneko
apt:bsdgames,pacman4console,moon-buggy-esd


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
apt://oneko
apt:bsdgames,pacman4console,moon-buggy-esd


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: