Debian Cake


how to keep your apple notebook battery healthy

3 simple rules:

- DO NOT leave your charger connected when the battery is charged, even when you go to sleep.

- DO let it discharge completely, when using it wait till it reaches 0%, when sleeping it leave it alone, when you'll wake up and you'll open it, a resume from suspend to disk will greet you. OSX FTW.

- Monitor it and show off OSX performance counters to your friends (images courtesy of and System

healthy battery 2

healthy battery cycle count

Senza parole (openoffice)

menubar mess caused by

heavy swap usage

openoffice crash report

downloading openoffice update...

Python2.4's urllib2 broken by default on Solaris Express 5.11

While happily installing prerequisites to build an app on Solaris 10, i enjoyed having Mercurial already installed in the "base system".. except for a BIG issue: digest authentication was broken. I tcpdumped the traffic exchanged between the mercurial client and the CGI server and I saw that no Authorization header was sent, and obivously the server refused to serve the hg repository.

Before reinstalling python, maybe from source and replacing the default installation or having side by side two different versions, with consequent nuisances and dirt around the system, I tried a very very small patch to that... amusingly enough, fixed my problem:


[06:19'08"] ... nextie changed the topic of #antani to:
[11:08'46"] @      vjt| az


Active Gibberish

Localization for Active Record error messages

Today i had to answer to one of the questions every non-english Rails developer stumbles upon now or after.. how to localize AR error messages for pleasant appearance to a non-english customer Eye-wink.

First off, thanks to defunkt's excellent gibberish plugin and to the way AR validation errors are exposed, the task was accomplished in an easy and clean manner, without messing too much with AR's internals.

Cristo e l'elite.

* gianluca propone cristo ministro di grazia e giustizia
vjt: certo meglio di mastella, si`
gianluca: cacchio, sarebbe felice pure il papa
gianluca: vero cristo?
cristo: sarebbe felice pure il papa passato era migliore di sto mostro
vjt: cmq si` cristo e` #sniffo oramai
gianluca: mado' veramente
vjt: ha assimilato quasi tutto
gianluca: ms-dos 1.0!
gianluca: cristo, sei elitario?
gianluca: cristo: tu sei elite!
gianluca: vero?
vjt: si`, vedi, se la tira  

Extracting data from Apple Safari's cache

Five minutes ago, i overwritten my super-shining-new CSS stylesheet that implements the "diarrea con sangue (liquid shit with blood)" color scheme i set up some days ago, because i wanted to restore the original color scheme and put it in a new theme for this site, so that people who enjoyed the old theme could continue to use it.

But as the most kiddie system administrator, i decompressed the original files from the backup archive OVER the current ones..

Safari to the rescue! Every cached item by safari is stored into a SQlite3 database located in ~/Library/Caches/, let's inspect how it is structured:

sniff sniff

Amorevolmente nerd.

La riga del giorno

05:01:24 vjt@voyager:~/Antani/trunk$ replace(){ sed -e "s|$1|$2|g" < $3 > ${3}X; mv ${3}X $3; }; egrep -r 'XP_[A-Z_]+[[:space:]]+-?[[:digit:]]' Headers | ruby -ne "f,m = scan(/(.+):.+(XP_[\w_]+)/).first; puts '%s %s %s' % [ f, m, 'kXP'<<m.scan(/(_[A-Z])([A-Z]+)/).map { |a,b| a[1..1]<<b. downcase }.join ]" | while read hdr from to; do replace $from $to $hdr; for src in `grep -rl $from Sources`;do replace $from $to $src;done;done