Wednesday, October 31, 2007

Screen to the rescue

I couldn't find a BitTorrrent client which can be executed without a terminal (and therefore from within "at") in time for tonight so attaching "screen -d -m btdownloadcurses ..." solved the problem. This starts the command in a detached screen session so on one hand the command thinks it has a terminal while on the other hand I can still start it from inside "at", which doesn't have a terminal. It also has the added benefit of being able to attach back to that screen session later to see how it goes, which is the main advantage of "screen".

Tuesday, October 30, 2007

Encoding email addresses in HTML pages

A while ago I noticed that GROX use URL encoding to put their e-mail address
in a "mailto" link. I guess they do this in order to make it more difficult for address harvesters to pick up their e-mail.

In order to do the same for my wife's web site at I found the following couple of tricks:
  1. The "mailto" link is encoded using:
    perl -e 'use URI::Escape; print uri_escape("the@email.address", "\0-\377"), "\n";'
  2. The title of the link, which I wanted to contain the e-mail address in HTML, was created simply by using the HTML Encoder from CodeHouse

Wednesday, October 10, 2007

Installing local .deb files with dependencies

This ("how to install a local .deb file and have all its dependencies automatically pulled from repositories") seems to be an issue which many people ask but nobody gives the current "right answer" which is simply gdebi.