Remove items from Ubuntu’s indicator applet

Ubuntu 10.04 (Lucid Lynx) features new panel applets called “indicator applets”. If you want to get rid of some of them, they can be removed by removing the corresponding package(s) using your favourite tool (Synaptic, aptitude, apt-get, …): indicator-me provides the menu with your avatar and your availability status indicator-messages provides the menu for email/Evolution, …

Automated MySQL backup for shared webhosting

What to do if you want to use mysqldump in a shared hosting environment without being able to access the shell (SSH…)? Use a Perl CGI script: #!/usr/bin/perl -w use strict; use CGI::Carp qw(fatalsToBrowser); print “Content-type: text/plain\nContent-disposition: attachment; filename=\”db_backup.sql\”\n\n”; print qx(mysqldump -uUSERNAME -pPASSWORD DATABASE 2>&1); Replace USERNAME, PASSWORD and DATABASE with the configuration data for …

Dell Preboot Authentication: Deleting smartcard associations

Laptops from the new Dell Latitude E series come with an OEM version of Wave Embassy Trust Suite. This software can be used (amongst others) for configuring BIOS and hard disk “passwords” based on smartcard authentication. This is a nice feature, but what if you try to turn this off again after trying it out? …

ionice: Controlling the Linux I/O scheduler

Linux is quite good at scheduling the CPU time of running programs: Even when a process is running which constantly uses up all processor power, it is still possible to use another (interactive) program nearly as fast as on an idle system. But if a process is doing heavy I/O operations (i.e. backup software), the …

Clean MySQL backup using mysqldump

If you need to configure a backup of a MySQL database server, you shouldn’t simply copy it’s database files from /var/lib/mysql since they might be inconsistent (due to simultaneous changes). mysqldump is a safe choice for this task. I wrote a simple script for Debian that uses the pre-configured “debian-sys-maint” account and compresses the output: …

java -jar ignores classpath — Workaround

When you want to run a Java class wich needs additional libraries, you usually run java -cp mylib.jar MyClass or you specify the environment variable $CLASSPATH before running the class. When you have a JAR file you want to run, you usually do this by issuing java -jar myjarfile.jar Maybe you’ll think: Hey, I want …

Strato V-Server/Virtuozzo: Memory usage

This blog runs on a virtual server offered by Strato. They use Virtuozzo for virtualization which has a drawback: If you use top, free or other tools to show the current memory usage, not only your “slice” of the machine but more (all?) of the memory is measured. This doesn’t help much if you try …

Caching using weak references

Some time ago I wrote a Java class that caches generated images so I don’t need to re-render them all the time (rendering SVG graphics takes some time…). There’s only one problem: As more and more different images are getting cached, the maximum heap space of the JVM will eventually get exhausted. Increasing this limit …