Funny spam

6 April, 2009 - 11:31

From time to time I check my spam folder to see if some legitimate emails ended up there. The subject lines of those mails are pretty boring most of the time. Sometimes however, the ones trying to sell you viagra and related crap are so grotesque that it is funny in a (sad) way.

A selection:

  • Get your giant pilot into her cockpit
  • She will lick her lips when you pop out your salami
  • Rise from the dead, ye little head...
  • Welcome to wiener wonderland
  • Statue of Liberty, Eiffel tower, then your tool

Accented characters with qwerty keyboard (Ubuntu Linux)

23 March, 2009 - 10:25

I prefer a qwerty keyboard for programming, but to write in my native language (Dutch) I need sometimes accented characters like ë, ï, é, etc, which do not have dedicated keys on a qwerty layout.

A handy way under Linux is to use a "compose key" ([Alt Gr] on my setup), which allows you to compose accented characters by entering the accent (umlaut, accent grave, ...) and the unaccented character separately.

Flag a PDF file as binary for Subversion

11 December, 2008 - 01:05

Sometimes, Subversion thinks that a PDF is a text file, instead of binary data. This can hurt during commits or diffs, because Subversion tries to do textual diffs with binary data.

Solution: you can explicitly flag the file as PDF data and Subversion will handle it as binary from then:

svn propset svn:mime-type application/pdf yourPDFfile.pdf

localhost webdev: virtual host setup on Mac OS X with MAMP

23 October, 2008 - 11:28

Reminder to self: how to set up a virtual host for localhost webdevelopment on OS X with MAMP

  1. DNS setup: add an entry for the local domain name in /etc/hosts, e.g.     foo.localhost

    and flush DNS cache with

    dscacheutil -flushcache

  2. Apache config (/Applications/MAMP/conf/apache/httpd.conf): add a virtual host entry like
    <VirtualHost *>
      ServerName foo.localhost
      DocumentRoot /Users/eddywally/Sites/foo/localhost-dev/drupal

    and restart webserver, e.g. with

    /Applications/MAMP/bin/apache2/bin/apachectl restart

  3. Connect to http://foo.localhost:8888 (don't forget the nonstandard port number, unless you configured MAMP to use standard port 80).

Voorontwerp dankwoord

13 October, 2008 - 17:07

en last but not least wil ik mijn vissen bedanken omdat ze rondzwemmen in mijn aquarium en dat maakt me blij als er een dood is moet ik wel wenen want dat is droevig

Without words

24 September, 2008 - 13:55


26 August, 2008 - 20:48

Yet another dull "numbers are so uncool" blog entry:
I just committed revision 2345 to my subversion repository. Yay.

Apart from having four consecutive digit, there's nothing special about 2345 actually.
In hexadecimal: 929, pfft
In binary: 100100101001, almost, but no sigar
Prime factorization: 5 x 7 x 67, boooring



20 August, 2008 - 19:05

Two days. Two days I'm working to find a bloody number. First I tried with brute force searching. But because that appeared not very feasible, I had to think of a more clever way to find it. Which I did. No brute force exhaustive search, just some matrix multiplication stuff.

And the number is 4212320.


By the way: it's the number of unique binary patterns of 5 by 5 pixels, ignoring all copies due to rotations and reflections. Seems a very simple problem, but it was a very tough nut to crack.

Script for easier adding subversion ignore rules

4 July, 2008 - 11:16

It's possible to make Subversion ignore unversioned files, so they don't show up in the status overview and you get a better signal to noise ratio. The command line interface to add ignore rules this is however a bit clunky. First, you need to remember following command:

svn propedit svn:ignore .

(which can be quite confusing, especially with the slightly similar looking but different propset command).
Then you get a file editor where you have to add the rule (make sure you remembered the file name or pattern you want to ignore), save the file and exit the editor.
A bit too much hoops to jump through for something that could be just one command like svn-ignore filename.

LaTeX: promille/permille sign

12 June, 2008 - 17:28

I needed the LaTeX code for the sign that is called the "promille" sign in Dutch. It's the sign like the percent sign "%" ("procent" in Dutch), but with two circles at the bottom. Googling for "latex promille" was not very successful, so I thought this would be a good botsnack.
(Googling for "permille" or "(parts) per thousand", yield better results however.)

Anyway, I found two solutions:

  1. \textperthousand from the package textcomp, also provides \textpertenthousand but both only work in text mode, not in math mode.
  2. \permil from the package wasysym, works in both text mode as in math mode.

That's all folks