Categories
Linux

Compiling on a 64 bit Linux

I’m currently in the process of upgrading my old server to a nice new 64 bit CentOS 5 install and came across a few issues rebuilding some of the packages.
In general I try not to use customised versions of packages since it makes updating the machine so much easier when there’s nothing to rebuild, however some things I do customise slightly such as Apache and Exim.
Whilst rebuilding the Exim RPM I came across some strange errors which I assumed (correctly) were to do with the fact that it was a 64 bit OS not 32 bit.

Categories
Linux

yum reports bad marshal data

I’ve been trying to check for updates on one of my CentOS machines using yum and got the following error.
root:~# yum upgrade
Loading “installonlyn” plugin
Options Error: bad marshal data

Categories
Programming

Merging two hashrefs in Perl

I came across an interesting and very simple way to merge the contents of two hashrefs today. A hash is made up of pairs – a key and a corresponding value. As an example, the following can be pasted into a shell session on most machines that have perl installed.
perl -MData::Dumper -le ‘
$x = { a => 1, b => 2 };
$y = { c => 3, d => 4 };
$x = { %$x, %$y };
print Dumper($x);

Categories
Mac OSX

Safari and multiple tabs

I was reading Mac Format this morning and read about an application called Taboo that stops you from accidentally closing Safari windows with multiple tabs open, or even quitting Safari when there are multiple tabs open in a window.

Categories
Personal

MediaWiki database compression

Recently I’ve been taking daily backups of a 4.2GB mediawiki (v1.5.6) database, about 3.9GB of which was in the ‘text’ table. It was all the previous versions of pages that were taking up the space so having looked at http://meta.wikimedia.org/wiki/Help:Reduce_size_of_the_database I decided to give deleteOldRevisions.php a go.