Blog Archives

RabbitMQ: rabbitmqctl is unable to connect to node rabbit@localhost: nodedown

I just installed RabbitMQ in Arch Linux from the AUR and can start it without problems using systemctl. sudo systemctl start rabbitmq (BTW: I don’t have strong feelings against systemd, to the contrary, it feels very right and sysv/initscripts had

Tagged with: , , , ,
Posted in Code, Linux

SPARQL query a RDF document using RDF::Trine and Dancer

Learning SPARQL can be a challenging task, not only because real-life queries tend to become rather convoluted but also because running SPARQL queries on arbitrary RDF data requires setting up and tearing down a (temporary) RDF store and a SPARQL

Posted in Perl, Uncategorized

Format file sizes human-readable in Perl

Examples:

Tagged with: , ,
Posted in Code, Perl

Getting the size of a URL without downloading it on the command line

curl -vX HEAD http://mydomain.com/possibly_very_large_file.zip Used as a shell function function curl-size { curl -vX HEAD $1 2>&1| grep ‘< Content-Length:' | grep -o '[0-9]+' } which can be used like this: $ curl-size http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.4.31.tar.bz2 无 80181587

Tagged with: , , ,
Posted in Code

Show perl module version on the command line

I’m pretty sure I picked this up somewhere at some point. Props to the original author. I have this as perlmodvar in my $PATH – named like that for whatever reason, perl-module-version would be more accurate but I’m used to

Tagged with: , , ,
Posted in Code, Perl

Change Wallpaper regularly and find favorites using bash

I seldom see the desktop because I tend to maximize my windows or use them full screen but when I do, I enjoy a nice galaxy, a glorious moon or anything else that has been featured as a Astronomy Picture

Tagged with: , ,
Posted in Code

How to hire a Good Perl Programmer

chromatic lists quite a lot of questions every Good Perl Programmer should be able to answer. I suppose I can answer at least half of them, but some, especially the documentation-related ones, are somewhat embarrassing. I have to admit, I’m

Tagged with: , , ,
Posted in Perl, Uncategorized

Display random file

If you have a directory with lots of files and can’t decide just which of those files you want to use, this script might come in handy. It selects one file randomly from within the directories given with the –dirs/-d

Tagged with: , ,
Posted in Perl

Shell frontend for Simon Tatham’s Portable Puzzle Collection

Simon Tatham wrote an excellent set of puzzle games. There’s actually quite a lot of them and the executables are all named without prefix, so it’s hard to remember them all. I think Debian/Ubuntu add .desktop-entries for the application menu.

Tagged with: , ,
Posted in Code

Extract files files from binary stream

Sometimes, one needs to extract files from a binary stream, e.g. from a broken tar-archive or some other compound file format for which there is no native software to export the images. The general way of handling such tasks: Check

Tagged with: , , ,
Posted in Code, Perl