Own stuff

Make an ISO image from selected files/directories in Nautilus

Using the attached Nautilus action, you can easily add a custom action in the context menu of Nautilus and create an ISO image from the selected files and/or directories. It works with filenames containing whitespace and supports selection of multiple items. It also remembers the last selected/entered file path + name (in case you create ISO images regularly). Requires genisoimage to be installed.

Flash Performance Optimizer (GreaseMonkey script)

Adobe's Flash Player can eat up quite some CPU power and sometimes the sole reason for the Flash plugin's high CPU usage is badly written embed code. Eg. the wmode=transparent embed parameter is only required if the Flash contains (and uses) transparent sections and it is necessary for correct rendering to utilize transparency. The other performance killer is the quality embed parameter: setting it to best is most of the time an overkill and totally unnecessary. Unfortunately some Flash developers (and website maintainers) lack the knowledge/time/desire to tune their embed code for optimal performance and use these parameters even if they are not needed. Flash Performance Optimizer tries to fix these problems to give you a better user experience.

Convert images to JPEG format in Nautilus

Using the attached Nautilus action, you can easily add a custom action in the context menu of Nautilus and convert the selected files to JPEG. It works with filenames containing whitespace and supports selection of multiple items. Requires ImageMagick to be installed and the convert executable to be available through /usr/bin/convert.

JarDiff - create a diff of the public API of two JAR files

I've written a simple shell script to generate "signatures" of all the *.class files in two JAR files and compare these with diff. The output is pretty well usable to spot the (sometimes accidental) differences between two versions of the same library.

A glimpse at the startup process of a context in Tomcat

Reading through the Servlet API documentation it's quite probable that you'll stumble on a couple of questions you cannot answer ... at least not based on the docs. I always wondered how exactly Tomcat handles the various elements of a webapp that we define in the web.xml deployment descriptor file. To lift all doubts, I've written a small webapp that logs all aspects of the startup process of a Tomcat context. I've chosen to use the good old standard error (System.err.println()), because loggers would have added just unnecessary dependencies, configuration and complications.

Python script to list libvirt domains with their descriptions

Unfortunately neither the virsh command, nor virt-manager give you the option to list your virtual machines with their descriptions. If you've a couple of dozen (or even hundred) VMs, the short VM name is pretty soon going to be not enough to find the given VM you're looking for.

How to find the processes using the most swap space in Linux

There's already a good answer to the question at stackoverflow. They suggested to use the top command, then change the sorting field to "swap" by hitting O and p. Unfortunately (afaik) there's no way to do this in batch mode (using the -b switch) and save the top swap using prorcesses in a file. There's another method: use the ps command.
psres=$(ps -eo rss,vsz,user,pid,tty,time,cmd); set -- $(/bin/echo "$psres" | head -n1); shift; shift; echo "SWAP $*"; echo "$psres" | awk 'BEGIN {ORS=""; getline} {print $2 - $1 " "; for (i=3; i<NF; i++) print $i " "; print $NF "\n"}' | sort -rn | head

Mozilla (Firefox + Thunderbird) profile cleaner for linux

It happens occasionally that after a crash (Firefox/Thunderbird or the PC itself) starting up Firefox (or Thunderbird) you experience weird behaviour. Eg. it tells you that the app is already running or it starts, but bookmarks are not available, etc. Cleaning your profile can be easily done manually by removing a couple of files in your Firefox/TB profile, but average users are not familiar with contents of these profile folders. To help them I've written a small app (shell script using Zenity to provide a GUI) that you can put in your Gnome/KDE/etc. menu so all your users can easily access it. Of course, you're free to customize the script anyway you like (eg. take out a few questions to make it even more automatic). I've tested the script in Ubuntu 9.10 (Firefox 3.5.9 and Thunderbird 2.0.0.24).

Display various checksums of files and directory contents in Nautilus

Using the attached Nautilus action, you can easily add a custom action in the context menu of Nautilus and calculate the MD5, SHA1 or CRC32 (as defined by POSIX.2 -aka. IEEE Std. 1003.2- standard) checksum of the selected files and/or for all files in the selected directories recursively. It works with filenames containing whitespace and supports selection of multiple items. By default the results are displayed in a 1000x600 window, but you can easily change that. The action requires zenity to display a dialog box for checksum method selection and display the results.

Notification icon for mounted (aka. in use) LTSPFS devices like USB drives

LTSP uses a FUSE-based filesystem (LTSPFS) for providing access to devices that are attached to the thin client, but are used on the terminal server in the user's session. The creators of LTSPFS took an unconventional approach: users cannot (and are not supposed to) manually eject these LTSPFS mounts, the system does this on it's own after 5 seconds of inactivity (at least it's 5s in Karmic). This is meant to make use of USB devices more comfortable. Unfortunately LTSPFS does not provide any means to the user to detect whether the device is still in use or not. My small modification comes here in play.

Syndicate content