Summer has arrived - finally!

This weekend marked the first consistent period of above 22C temperatures and sunshine. Truly remarkable... We had winter up to end of May.

This car will be my undoing

At $1.50 per litre for petrol at the moment in Canada for 91 octane, and at these consumption rates, I am in for a bitter sweet period... This was after about 150km of driving in the city...

21l/100km
21l/100km

HTTPS (SSL) Support in Perl's LWP::Simple

If you run Ubuntu Linux and using Perl's LWP::Simple's get function to fetch the content of an SSL encrypted web site, make sure to install libcrypt-ssleay-perl to enable SSL support for LWP.

Conditional inserts in PostgreSQL

I have many times wanted to perform the following kind of SQL statement:

insert into X (field1, field2) values (A,B) if not exists X.field1 = A

The idea is to have a single statement that only inserts the value if a given key (in this case A) does not already exist. Therefore it is like a unique add operation. To implement this in PostgreSQL, simply do:

Full Article

N00b 101 - How to play back a DVD on Ubuntu Linux?

So here is most probably the dumbest question on earth... You install your brand spanking new Ubuntu 11.04 Linux on your screaming fast $1200 machine, only to discover whenever you put a DVD in the DVD-ROM, it does not play. So you install VLC, MPlayer etc... All do the same - they see the name of the DVD as it gets mounted properly, but it refuses to play it. No error, nothing. It just flickers when you click Play, then reverts back to stopped.

So you think to yourself... This is the year 2011. Playing a DVD should not be hard... Especially since everybody thinks Ubuntu with its new Unity desktop is going to revolutionise the world. Fortunately for me I know a thing or three about Linux and DVDs... But if I did not? then what? So here is what you need to do.

Open up a terminal, and run the following command:

Full Article