Arnt Gulbrandsen
About meAbout this blog

Email tracking pixel support

There once was a font called Smelvetica, a truly terrible prank based on Helvetica. There once was, because Monotype has sent a takedown notice for the git repo. Smelvetica was just like Helvetica except that its kerning was so bad that it was a feature. In fact, it was so bad that the font deserved a takedown notice. It deserved two.

There still exists a mail reader called Outlook, which my sort of people disliked twenty years ago, for good and bad reasons. One of the better reasons was that Outlook would implement harmful features. It still does. For example, it offers tracking pixel support, most often used via one-pixel images but Outlook offers other vectors too, including web fonts.


If you happen to have an old version of Smelvetica, don't like tracking pixels and suffer from a poor sense of humour, you can leverage it to send email that has terrible kerning if and only if the recipient's mail reader supports using web fonts in the way tracking needs. Here's an example of how to do it:

Date: …
From: …
Subject: A little gothic type
Mime-Version: 1.0
Content-Type: text/html

<link rel="stylesheet"
<div style="font-family: UnifrakturCook;">
<p>Goth is great.

Since Smelvetica was taken down, I chose to use this font for the example, but the world of web fonts offers many other possibilities. Start looking here. Smelvetica was the best though — the result would look ordinary, yet somehow disturbingly wrong.


I give up

The newspaper yesterday drove me over the edge. I admit it: The word hacker hasn't been usable for someone like me for a long time, I just didn't want to admit it.

A long, long time ago I had a keycard that didn't do what I needed. The keycard system was a compromise between what the organisation needed and what the keycard vendor could deliver, and it was mostly okay. Not 100%.

With my usual luck, one of the exceptions turned out to apply to myself. I couldn't get all the access that I needed while also being locked out of everything else. But I'm a hacker, so I poked around a little and made myself my own card, with enough access. Problem solved.

I didn't hide the card (you could see that it was homemade) (more…)


Android boot with animated GIF

I've hated the Cyanogenmod 11 boot animation since I first installed Cyanogenmod on my phone. Admittedly I don't see it often, but I hate it. These walking fingers, possibly drawn by Will Holmes, would be so much better. So I put together a shell script to convert animated GIF files to the format Android needs.

Now and then phones are lost, particularly at schools, and I have two children, so I added an option to add text.

Reddit's mesmerizinggifs is full of suitable input files. To download today's highest-scoring animation and annotate it with Nirmala's phone: (more…)


Custom filofax paper

The two pictures show things I usually bring along in my hand luggage on the plane. Guess which one the security screeners want to look at most often.

Correct! The razor gets a brief glance or no attention at all (usually), the organiser looks odd on their screens and is often inspected. Mine was going to become a 9600bps modem when it grew up, as I have told many a security screener.

Ever since I got my first duplex printer I've made my own paper for it. Nothing very fancy, really. Four constraints only: ⓐ I like to write on the right-hand side, ⓑ occasionally I want to measure something so there should be a ruler, (more…)


The return of the advent calendar

I'm glad that my four-fours advent calendar enjoys a small following. I have even heard that certain programmers have been seen arriving at work before lunchtime, going straight to the calendar on the way in.

The original idea for the calendar came from the column Numbers Count in PCW magazine sometime in the eighties. A stylish column in a fine magazine: It published mathematical problems and occasional puzzles, and did not waste much space on answers. One of the puzzles was to count from 1 to 20 using four sevens. As I recall, I found 19 to be the most difficult.

I first tried to extend that to 24 to make an advent calendar, but had to give up on 23, which blocked me for a few years. Four fours was much easier. This year I tried four threes. Again, 23 looks poor, so but one can always choose to pay less attention to that and more to 24, for which I found several good possibilities. Which is the most elegant 24, 3!×(3⁄3+3) or 33-√3×3? Or 33×3-3 perhaps?

Again, there's both an postscript file and an advent3.pdf PDF version.


SEO at Trolltech ca. 1996

My cron-driven alter ego ran several scripts on the Trolltech web server. This is about one I wrote in 1996 and ran every half-hour to make sure that qt-related subjects were well covered by the search engines. At the time, some search requests didn't give as good results as they could have, and I thought the likely reason was that the search engines hadn't crawled the right pages.

But the pages tended to be in the Trolltech referrer log, or if not, then some other page very close to them were.

So I wrote a crontab script to watch for new referrers in our apache logs, and whenever it saw one, it did the following.

First, get rid of spam (yes, even then there were spam pages). The test was simple: At most x% of the text could be links, the page should mention one of a set of keywords, the page could contain at most y links, and at least one link had to point to Trolltech.

If the page passed that test, the script tried to clean up the URL a bit (delete session cookies, delete index.html). Next it tried to locate a higher-level index page linking to the candidate page and other related pages (since submitting an index page gave the search engine more to work with).

Finally, the script would submit either the payload page or the index page to Altavista, Hotbot, Lycos and a fourth engine whose name I've forgotten. I don't think it was Google, Google came later.

It worked very well. Searches for Qt-related subjects gave better results than before, and yes, the search engines saw more links to The script ran until shortly before I left Trolltech in 2001. By that time Google had learned to crawl well, and the script laid unused and forgotten until I found it today, while going through and wiping my old hard disks. (Update: The reason I don't know the name of the fourth search engine is that I had put the submission URLs in a configuration file.)

Update: The fourth was, of course, Excite, whose existence I had quite forgotten.


An advent calendar for nerds

By popular request: my postscript hack to produce a four-fours advent calendar.

Each of 24 printed pages bears a label such as 4+4/4-4 or 4+4×4+4. Print, fold e.g. as shown below, insert pralines, (more…)