Upgrading extensions (like Remove It Permanently) for Firefox 3

Firefox 3 is great, but a few of my "required" extensions still haven't been updated for this yet-to-be-released version. One of which, Remove It Permanently, is essential for dealing with badly laid out websites.

Well it turns out that in that case, it's just a matter of:

  1. unpacking the XPI file (it's a renamed ZIP file) and
  2. bumping the "maxVersion" in the install.rdf file.

Update: Remove It Permanently 1.0.6.4 was released on 13 June 2008 and is compatible with Firefox 3.

Watch all of your logs using monkeytail

Monkeytail is a neat little tool which allows web developers and sysadmins to easily watch new additions to their log files by tailing them (i.e. tail -f) and providing helpful vertical spacing after detecting pauses in the output.

What makes monkeytail so useful is its ability to easily tail multiple files together, even when it involves connecting to these machines over ssh and running sudo on them. For example, you could tail all of your load-balanced servers by doing:

mtail @webservers

where webservers is an alias defined in ~/.mtailrc:

<group webservers>  
    sudo yes  
    <file>  
        filename /var/log/apache2/error.log  
        prefix "server1: "  
        host server1.example.com  
    </file>  
    <file>  
        filename /var/log/apache2/error.log  
        prefix "server2: "  
        host server2.example.com  
    </file>  
</group>

It is available in Debian unstable and from its official homepage.

Kudos to Martyn Smith for turning this idea into a release!

Preventing accidental deletion of important files using safe-rm

Some weeks ago, I accidentally deleted half of my /usr/lib. I didn't lose anything important and was able to restore everything (thanks to my Ctrl+C'ing the process in time) but that user error did strike me as too easy to make (apparently, I'm not alone). So I started thinking about how I could prevent something like that from happening again.

I realized one thing: there is no way I would ever want to delete /usr or /etc for example. I figured that "rm" should, by default, refuse to delete certain critical directories (or files). Of course, that would be a very controversial patch to "rm" itself and the chances of this approach succeeding were pretty close to zero.

So instead, I decided to build a wrapper around "rm" which prevents the deletion of important files by checking each one against a blacklist. Anything you add to the blacklist will not be deletable using "rm" unless you override this protection by calling "rm.real" directly.

This tool, safe-rm, ships with a default system-wide configuration file (/etc/safe-rm.conf), but each user can supplement that list of "protected" directories and files by adding lines to ~/.safe-rm.

Debian and Ubuntu packages are available from the usual places.

There are of course different approaches to preventing these kinds of problems...