Download it from here (with a browser, it does some redirect crap). Install dosbox:

sudo aptitude install dosbox

It is a self-extracting zip file, so you can either use wine to unzip (holy nuclear option, batman) or install unzip:

sudo aptitude install unzip

Create a directory that we can ask dosbox to mount as ‘C:’, then unzip it:

mkdir -p ~/.dos/Dune2
cd ~/.dos/Dune2
unzip ~/Downloads/Dune2.exe

Get a default config file by starting up dosbox:

dosbox

and (in dosbox) ask it to write out a config file for you:

config -writeconf /home/you/.dosbox.conf

type ‘exit’ in the dosbox window to, er, exit. Add the line to mount the directory we created:

echo "mount c /home/you/.dos" >> ~/.dosbox.conf

and start dosbox again (with that config):

dosbox -conf ~/.dosbox.conf

and run Dune2 in the dosbox window (dosbox’s shell has tab completion, yay):

cd Dune2
Dune2.exe

Clicking in the window will make dosbox grab your mouse and keyboard - ctrl-f10 to escape.

Posted late Tuesday afternoon, July 27th, 2010 Tags: ?debian ?dosbox ?dune2 ?games ?linux ?wine

This config snippet configures vim to highlight trailing whitespace in a horrendous red, making it easy to spot and remove.

:highlight ExtraWhitespace ctermbg=red guibg=red
autocmd Syntax * syn match ExtraWhitespace /\s\+$\| \+\ze\t/

Even better would be to only highlight it on lines that have been otherwise modified since the last commit…

Posted Wednesday evening, June 23rd, 2010 Tags: ?linux ?vim

Thanks to the awesome work of Diego Giagio (for writing it) and Paul McEnery (for packaging it for Debian), using your iPhone as a modem under Debian is about 60 seconds work:

  1. Install ipheth-dkms (the kernel module side of things) and ipheth-utils (the userspace pairing daemon).
  2. watch the postinst build the kernel driver for your current kernel
  3. plug your phone in
  4. dmesg|grep iPhone should show something like:

    [867025.370421] ipheth 3-2:4.2: Apple iPhone USB Ethernet device attached

    and you’ll find you have a new Ethernet interface

  5. enable tethering on the phone (Settings -> General -> Network -> Internet Tethering)
  6. now the ethernet interface is running a DHCP server - select it with nm-applet or ifup it or whatever you normally do
Posted late Tuesday evening, June 1st, 2010 Tags: ?debian ?iphone ?linux ?modem ?tethering

Since getPage just passes most of its’ args through to HTTPClientFactory, you can just make a simple wrapper to set the user-agent:

    from twisted.web.client import getPage
    ...
    def my_page_getter(*args, **kwargs):
        if 'agent' not in kwargs:
            kwargs['agent'] = 'your user agent/1.2'
        return getPage(*args, **kwargs)
Posted Sunday night, December 20th, 2009 Tags: ?python ?twisted ?web

Since feeds in ikiwiki are just the result of the [[inline]] directive generation a list of pages, you can use the combination of a pagespec and the tag plugin to stop ikiwiki from syndicating draft pages. Just include “!tagged(draft)” in your page spec for the page that generates the feed (e.g. blog.mdwn):

[[!inline  pages="./blog/* and !*/Discussion and !tagged(draft)" show="100" ]]

then for each article you’d like to hide for now, simply add the ‘draft’ tag:

[[!tag  foo bar baz draft]]
Posted late Saturday evening, November 28th, 2009 Tags: blog

nginx now has ipv6 support! Yay! To have it work on Debian, all you need to do is open up /etc/nginx/sites-available/default and replace:

listen   80;

with

listen [::]:80  default ipv6only=on;

ipv6only=on here is a bit of a lie - it will listen on both ipv4 and ipv6.

Then, in your /etc/nginx/sites-available/* files, add

listen       [::]:80;

just below

listen       80;

so nginx listens on both.

Posted at lunch time on Thursday, October 29th, 2009 Tags: ?debian ?http ?ipv6 ?linux ?nginx

If you have one of the free PositiveSSL certs that Namecheap gives away with new domains, you’ll find that it probably needs an intermediate cert to make OpenSSL stop complaining. Since they list a bunch here, let me save you some time: you need this one. If you’re using nginx, just add that file to the bottom of your signed cert (i.e. the thing PositiveSSL emailed you).

Posted late Thursday evening, October 22nd, 2009 Tags: ?certificate ?https ?namecheap ?nginx ?positivessl ?ssl

If nagios claims:

Error: 'bar' is not a valid parent for host 'foo'!

it is because bar doesn’t exist (e.g. you used a name directive instead of a hostname one).

Posted Thursday evening, May 7th, 2009 Tags: ?errors ?nagios

If you get an error like this:

Mar 23 16:26:08 quesadilla puppetmasterd[25945]: Denying authenticated client quesadilla.xxx(xxx) access to puppetbucket.addfile
Mar 23 16:26:08 quesadilla puppetd[32000]: Could not call puppetbucket.addfile: <RuntimeError: HTTP-Error: 500 Internal Server Error>
Mar 23 16:26:08 quesadilla puppetd[32000]: (//Node[basenode]/puppethacks/File[/etc/puppet/namespaceauth.conf]/source) change from {md5}b17c68bda4c44e7b818acb50553d0169 to puppet:///puppethacks/namespaceauth.conf failed: HTTP-Error: 500 Internal Server Error

on the server side, or like this:

Mar 23 16:24:48 crumbs puppetd[20054]: Could not call puppetbucket.addfile: <RuntimeError: HTTP-Error: 500 Internal Server Error>
Mar 23 16:24:48 crumbs puppetd[20054]: (//Node[crumbs.xxx]/dns/File[/etc/bind/named.conf.acls]/source) change from {md5}504a05051a6db6f517010ddf6b345271 to puppet:///dns/named.conf.acls failed: HTTP-Error: 500 Internal Server Error

on the client side, it is because you have a namespaceauth.conf, but didn’t allow access to the filebucket for your clients (more details).

Posted Wednesday afternoon, April 15th, 2009 Tags: ?errors ?puppet
Dec 20 15:25:30 bongo NetworkManager: <info>  Activation (ath0) failure scheduled...
Posted Saturday afternoon, December 20th, 2008 Tags: ?linux ?networkmanager
Posted Wednesday night, May 21st, 2008 Tags: ?banking ?etc ?finance ?gfc ?mortages ?subprime
Posted late Friday afternoon, March 28th, 2008 Tags: ?2020 ?australia ?summit

For some reason it defaults to context diffs. To switch to unified:

(setf vc-diff-switches "-u")
Posted Saturday evening, February 23rd, 2008 Tags: ?bzr ?elisp ?emacs ?vc

flyspell{,-prog}-mode likes to take control of M-tab, which is a shame since that is usually bound to complete-symbol.

(setq flyspell-use-meta-tab nil)

doesn’t work, but:

    (eval-after-load "flyspell"
        '(progn
        (define-key flyspell-mode-map (kbd "M-TAB") nil)))

does.

Posted Thursday evening, February 21st, 2008 Tags: ?emacs ?flyspell

To setup stunnel to tunnel SSH over SSL to subvert silly firewalls that proxy port 80 but let port 443 out:

# sudo stunnel -f -d ip_to_listen_on:443 -p /etc/ssl/private/your_pem_file.pem -v -r ssh_server_name:22</pre>
Posted Tuesday night, February 5th, 2008 Tags: ?firewallfascism ?httptunnel ?ssh ?stunnel

The docs are a bit unclear, but you need to pass these options to rst2latex:

--section-numbering --use-latex-toc

voila.

Posted Monday night, February 4th, 2008 Tags: ?latex ?rst

Copy /var/lib/bitlbee/*, and make sure they’re still owned by bitlbee:nogroup.

Posted Saturday night, February 2nd, 2008 Tags: ?bitlbee ?irc