Monthly Archive for August, 2007

Exporting changed only files with Subversion

Reading the referers of this website, I found that someone reached it querying a search engine for

subversion or svn export only changed files

This one-liner (that can be easily turned into a subversion hook) could do the task

for i in `svn log -r HEAD -v | grep "^ [MA]” | awk ‘{print $2}’`; do rsync -avR $i /basedir_of_your_export/; done

I’ve previously described here a slightly different problem.

Redirecting categories to tags in WordPress 2.3

Waiting for WordPress 2.3, I’ve just tried its Beta 1 release and, using a plugin called Redirection, I’ve found a simple way to transparently redirect the old category URIs to the new tags that WordPress will ship.

First, convert your categories to tags following this path of menus: Manage -> Categories -> Importers & Converters -> Selectively convert categories to tags.

Last, after installing and activating the plugin, add a redirection with the following parameters

Source URL: /category/(.*)
Target URL: /tag/$1
Type: Simple redirection
Method: Pass-through
Regex: checked

This way, using the old URIs, you should see the new pages (their titles will be “Posts Tagged ‘’” but I think that it is an acceptable drawback… I suspect that it is due to the Beta because it does the same even without the plugin). I’ve tried it on a testing server… but it should work. :)

Sometimes I have to be pitiless :)

I’ve just found this masterpiece in my spam box.

My name is Elena. To me of 20 years.
I would like to get acquainted with you if you not against.
I Look forward to hear you soon with impatience. Adult Dating (link omitted)

Wouldn’t it be cynical to reply with something like this?

Dear Elena,
your name and your English make me think that, like me, you are not a mother tongue. Even though a girl with your name has had a role in my life, I think your sentences are not enough to persuade me to visit your spam website.
Before deleting your message, I want to let you know I have no doubts that you can do much better.
Sincerely,
Carlo.

A little thing that has made my day

I think that receiving an unexpected phone call from a worldwide appreciated engineer is much better than discovering twenty new trackbacks. :)

Where JToolBarHelper finds icons

Someday this post could save you an hour: do you need to use JToolBarHelper::custom() within Joomla 1.5.x? The icons that it calls by default are placed in administrator/templates/khepri/images/toolbar/ (substitute khepri with the name of your non standard administrator template if you have one) and if you want to use, for example, icon-32-help.png, you have to write something like
JToolBarHelper::custom('up0', 'help.png', 'help.png', 'up', false);
In other words, you have to pass the filename without the starting icon-32- string. If the previous case is not sufficient for you and you want to pass to custom() your custom icon, read this post.

A links page for Fluid Blue

As I previously wrote, I’ve just left here a very simple links page for Fluid Blue.

Samsung LE26S86BD with Kubuntu

I have bought a Samsung LE26S86BD HD Television. Its manual states that its maximum resolution is 1366x768@60: connecting it to a live Feisty (running on my TM 8003LMi) through its VGA port I have got this xorg.conf file that lets it work at 1024x768@60 and I suppose that, with more care, it won’t be hard to get its maximum.

Tracciati legislativi

Leggo su “Notizie Radicali” di Luglio che il Comitato Nazionale di Radicali Italiani avrebbe elaborato una proposta per la creazione del “portale delle istutuzione elettive e degli eletti”, contenente, per ciascuna istituzione - dal Parlamento Europeo alle Circoscrizioni comunali - una serie di dati personali di ogni rappresentante eletto: in particolare il secondo punto evidenzia come

tutti i dati di cui sopra e, in particolare quelli relativi alle votazioni individuali, debbano essere accessibili e in un formato standard aperto (XML)

Bella idea e buona iniziativa; non credo che arriverò a vederla anche se penso ci possa essere un’altra semplice iniziativa informatica ancora più importante per la trasparenza legislativa: l’istituzione di un Trac che segua il cammino di ogni proposta (dalle prime bozze alla pubblicazione sulla Gazzetta Ufficiale, sarebbe spesso imbarazzante per eletti ed elettori vedere chi ha fatto applicare quali patch e - per certo - so che molti una proposta simile non vorrebbero nemmeno sentirla… purtroppo quando la Pubblica Amministrazione vuole mostrarsi trasparente, è molto attenta a cosa realmente lasciar trasparire).

Citazioni dal passato

Ho trovato un blog, di una sola pagina, che raccoglie vecchie citazioni (direi da IRC e mailing-list): non ho ben capito il motivo ma ci sono anch’io… sarà una frase che ho scritto sette/otto anni fa. Mah…

RIM BlackBerry Pearl 8100g red (nuovo)

Prima che finisca all’asta, c’è qualcuno interessato a questo telefono? :)