Home
Ephemera in Stone
in cyberspace nobody can hear you scream
Recent Entries 
8:28pm, Saturday 7th July 2007 - Fix delete keys in screen
in pub

Add this to ~/.screenrc:

termcapinfo xterm* kb=\177:kD=\033[3~
5:13pm, Sunday 1st July 2007 - (X)html
in pub

TfL’s Journey Planner website.

content-type: text/html;charset=utf-8

So it’s html.

<!DOCTYPE html PUBLIC
          "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Oh ok, it’s not, it’s xhtml. And lo, there is much <br/>ing and, er, <li/>ing.

But what’s this?

<script type="text/javascript" language="javascript">

Containing

for (i =1; i <= li; i++)

Argh!

(Why yes, I am screen scraping.)

in pub

Today in JBuilder I discover that Ctrl+Shift+9 puts a 9 on a button in the margin. Repeating removes it again.

I have no idea what this means.

11:59am, Tuesday 29th November 2005 - Finding Feed subscribers from the User Agent
in pub

Apparantly web-based feed readers (including LiveJournal) let the site know how many people are reading the feed through them.

7:45pm, Wednesday 19th October 2005 - Mail Transport Agents on *nix
in pub

“Mail filter” in this post means something that happens at SMTP time.

  • Courier: Wants to do everything. Not clear whether I can just use the SMTP bit on its own. The documentation consists of man pages for the individual components; there’s no overview.

  • Sendmail: Legendarily complex to configure. More security holes than Group Four. Mail filters must be compiled in, but there are lots of useful ones available.

  • qmail: It’s djb-ware, so fast and secure but stroppy; rubs me up the wrong way. Not clear how to do mail filtering. Allegedly responsible for “returning” spam to faked senders.

  • Postfix: Mail filters run as an SMTP server in their own right, so you need two instances of Postfix running on different ports. Works so long as I don’t have to write my own filters. Documentation seems good.

  • Exim: Seems very complicated. There is lots of documentation. Not sure whether I can plug in a mail filter of my own. Not sure whether I need to.

  • Mailfront: Not actually an MTA in its own right. Uses qmail. Little documentation.

There appears to be more and better software available for serving web pages than for receiving and relaying mail. That would be because web serving is easy, whereas receiving and especially relaying mail is fundamentally more complex.

5:48pm, Sunday 16th October 2005 - Lesser known webservers
in pub
  • boa — CGI, configurable mime types
  • fnord — CGI, dodgy documentation
  • micro_httpd — too simple
  • thttpd — CGI (arbitrarily named via symlink), URL throttling, custom error pages
  • thy — CGI, dodgy documentation
4:07pm, Saturday 1st October 2005 - Hungarian
in pub

This week I discovered a lesser-known dialect of Hungarian that is actually useful. Although ideally the kind-checking it does would be built into the language, so us poor programmers could safely forget about it.

3:54pm, Sunday 25th September 2005 - How to enable the Debug menu in Safari
in pub
  1. Quit Safari.
  2. Run defaults write com.apple.Safari IncludeDebugMenu -boolean true from the shell.
  3. Restart Safari.
in pub

Entries have gone missing from <projectname>.jpx.local.

Solution:

  1. Pull the project out of cvs into a new directory.
  2. Copy the generated .jpx.local file from the new directory over the existing file in the old.
  3. Delete the new directory.
11:05am, Wednesday 9th March 2005 - JBuilder — grey content area, won't exit
in pub

Symptoms:

  • Apart from menus and toolbars, nothing appears; all is grey.
  • File | Close and the window close button do nothing. Thankfully rebooting works.

Solution:

  • View | Workspaces | default.

Had this problem since Friday afternoon. Now to get it to use CVS again.

4:32pm, Wednesday 2nd February 2005 - Random characters
in pub
U+2709 &#x2709; ✉ envelope
U+270D &#x270d; ✍ writing hand
U+260E &#x260e; ☎ telephone
U+2708 &#x2708; ✈ aeroplane
U+2713 &#x2713; ✓ tick
U+2717 &#x2717; ✗ cross
U+263A &#x263a; ☺ smiley
U+2639 &#x2639; ☹ frowny

Might not display for everyone.
10:55pm, Tuesday 19th October 2004 - forlj
in pub

A perl script for people who post source code to LiveJournal.

Usage: forlj source.c source2.h >tempfile

Then insert the tempfile into your lj post.

forlj )
This must be Monday. I never could get the hang of Mondays.