Easy way to to stop kernel updates on Ubuntu

September 29th, 2014

One easy command (as root):

echo `dpkg -l "*$(uname -r)*" | grep image | awk '{print $2}'` hold | dpkg --set-selections

At the British Museum

April 21st, 2014

British Museum, London.

Vector Clocks

October 9th, 2013

Always wanted to know more about Vector Clocks and how they work (specially after dealing with Riak for a couple of months now) and this is an excellent read.

Poor man’s ssh launcher (CLI)

October 3rd, 2013

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.


June 23rd, 2013
Nazaré by Frederico Marques
Nazaré, a photo by Frederico Marques on Flickr.

Bola na praia. Nazaré, Agosto de 2005.


June 23rd, 2013

Barcelona, originally uploaded by Frederico Marques.

My first computer

October 19th, 2012

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.

Let the banks fail

September 9th, 2012

A simple truth that everyone should understand.

As everybody knows now, we did not pump public money into the failed banks. We treated them like private companies that went bankrupt, and we let them fail. Some people say we did it because we didn’t have any other option, there is clearly something in that argument, but it does not change the fact that it turned out to be a wise move or whatever reason. Whereas in many other countries, the prevailing orthodoxy is you pump public money into banks and you make taxpayers responsible for the banks in the long run, and somehow treat the banks as if they are holier institutions in the economy than manufacturing companies, commercial companies, IT companies, or whatever. And I have never really understood the argument: why a private bank or financial fund is somehow holier for the well being and future of the economy than the industrial sector, the IT sector, the creative sector, or the manufacturing sector.

Read more (interview with Ólafur Ragnar Grímsson, Iceland’s President).

Abril, águas mil

April 24th, 2012

Já começou a coisa do 25, das conquistas, os capitães e tal. Como vivo em retrocesso civilizacional faz uns anitos, já nem me importo.

É tudo nosso

April 4th, 2012

O ex-Presidente da República, Mário Soares, foi apanhado em excesso de velocidade num carro em nome da Direcção-Geral do Tesouro e Finanças. O Estado é que vai pagar, terá dito Mário Soares ao GNR.

Num país normal, isto seria um escândalo, mas parece que há gente que se sente dona do país. Palavras para quê? Deve ser da selecção natural.

Se há muito desemprego – cada vez mais -, se as pessoas morrem por falta de cuidados de saúde ou mesmo à fome, os dirigentes neoliberais encolhem os ombros e pensam, para eles: “Pois que morram, é a seleção natural…”

Grande senador. Haja paciência para mais uma múmia do regime.

Mr Zozo – Fred Sound System

November 4th, 2011

My first experiment using the Korg iMS-20 Analog Synth on the iPad. Pure live improvisation using the Kaoss Pad with Real Time Recording.

Peter Schiff Speaks for 1 Percent at Occupy Wall Street

November 2nd, 2011

É estimulante observar como acabam as discussões. Concorde-se ou não com Peter Schiff.