Author Archives: Mads Sülau Jørgensen

iptables throughput on Soekris net4801

Earlier today I had to find out what the capacity of a soekris net4801 running openwrt. Using a fairly normal rule set, it can forward 51.8 Mbits/sec which is alright for a 266 MHz processor. Sadly for me, we’ll be … Continue reading

Posted in Uncategorized | Leave a comment

How to resize ext3 partition on LVM

From time to time I have to resize the file systems on various systems which are primarily using ext3 on top of LVM. Resizing such an ext3 file system is not a complex task at all. For starters, make sure … Continue reading

Posted in Work | Tagged , , , | Leave a comment

Extracting a single database from a pg_dumpall PostgreSQL dump

Some data got deleted from one of our databases, and we had to restore it from our backups. To make sure we get everything from our PostgreSQL cluster’s, we use pg_dumpall to make a SQL dump. It’s in no way … Continue reading

Posted in Uncategorized | 2 Comments

Figuring out largest/smallest/median filesizes

I had to get some statistics about file sizes today, but couldn’t really find a tool for the job, so naturally, I wrote one. import os, sys, re from os.path import join, getsize, exists   def median(numbers): s = sorted(numbers) … Continue reading

Posted in Uncategorized | Tagged , | Leave a comment

AppleScript application to slow network

I keep doing the same ipfw commands over and over. Enough of that, here is my first applescript application every. Probably filled with bugs and other scary things, and I’m probably not the first one to do this, but I … Continue reading

Posted in Uncategorized | Leave a comment

Building postgresql8x and psycopg2 for x86_64 and i386 on Snow Leopard (OS X 10.6)

I’ve recently installed Apple’s new 64 bit OS Snow Leopard, on my work computer. I use postgresql extensivly together with python, and usually use apple’s bundled python2.5 for working with django. As the daredevil I am, I wanted to recompile … Continue reading

Posted in Uncategorized | 4 Comments

Managing multiple AWS identities

I’m running multiple different project on AWS which was so much of a pain to use, as I often find myself having to use the identity of project-a together with the official amazon ec2 tools. To help myself manage the … Continue reading

Posted in Python, Work | 1 Comment

Detaching a running process on *nix (or how to make a process continue to run after logging out)

Today, I had to copy 70 GiB of data from a ext3 filesystem to a XFS filesystem. This involved a lot of small files. After a couple of hours of waiting, I thought it’d be best to just leave it … Continue reading

Posted in Work | 7 Comments

Poormans cloudfront with EC2 and varnish

Recently (10-20 minutes ago), amazon couldfront (a cdn) stopped sending dns replies in europe: % dig -t ns cloudfront.net ; DiG 9.4.3-P1 -t ns cloudfront.net ;; global options: printcmd ;; connection timed out; no servers could be reached I was … Continue reading

Posted in Work | Tagged , , , | 1 Comment

Django – sharing a memcached instance

Update: Some Curious User brought to my attention, that a ticket has been opened which, when implemented, will add a setting for a cache prefix. It will also allow other cache key manipulations. Until recently I’ve been using the file:// … Continue reading

Posted in Django, Programming, Python, Work | Tagged , , , | 6 Comments