Rebel

“Every man who has shown the world the way to beauty, to true culture, has been a rebel, a ‘universal’ without patriotism, without home who has found his people everywhere.”
― Chaim Potok

O regime acabou

Cheira a podre. O regime acabou:

Depois das detenções de Ricardo Salgado e de José Sócrates, que puseram em cheque o sistema financeiro e o sistema político português (a ordem é arbitrária), seja qual for o rumo que os processos venham a tomar – e não se antevê que seja particularmente auspicioso para nenhum dos dois – o regime precisará de forças hercúleas para se salvar, ou ciclópicas, como dizia outra nossa personagem histórica de fim de regime, por sinal também ela transportada de carro no seu momento final. Se o PS e o PSD não perceberem este momento e não se entenderem rapidamente, não ficarão por cá muito tempo para verem o que lhe sucederá.

Rui Albuquerque, Blasfémias.

Poor man’s ssh launcher (CLI)

Problem: just wanted an easy way to add my hosts to the ssh config file and connect to each host through the easiest way possible using normal bash command-line.

Solution: configure your .ssh/config like you normally would, with the following:

Host myapache
Hostname myapache.host.com
User fred

Host myapache2
Hostname myapache2.host.com
User fred

Add the following to your .bashrc or .bash_profile (Mac OS X):

shosts=`grep ‘Host ‘ ~/.ssh/config | awk ‘{print $2}’`
for h in $shosts ; do alias $h=”ssh $h” ; done
alias ssh-hosts=’echo -e $shosts | tr ” ” “n”‘

And voilá, if you want to connect to any host, just type the name of the host, for example ‘myapache’. If you want to get a list of ssh hosts, type ‘ssh-hosts’. Keep it simple, stupid.

My first computer

Nostalgia time. While reading a few Wikipedia articles, just remembered that my first computer was a Timex 2068, which in fact was a clone of the ZX Spectrum 48k. I got it in 1987 but I was used to play with other computers (friends, school, etc) like the Commodore 64, Atari ST, Phillips MSX, etc. The Timex 2068 had a cartridge system but with limited support. I had a few ones (a word processor and a Spectrum 48k emulator cartridge to load games using the cassette player). My first language was of course, BASIC. Those were the days. I remember the exact day when I have used a computer. I was a kid in 1984 and at the time I was living in Brazil. I went to an exhibition where there was a TK 82C (a brazilian clone of the ZX81) connected to a big and ugly green monitor playing the Game of Life (very popular at that time as a demo BASIC program). I immediatly fell in love with computers.