Macaroni Cheese Recipe


500 g uncooked elbow macaroni
1/3 cup plus 1/4 cup butter, divided
1 finely chopped onion
6 tablespoons all-purpose flour
1 teaspoon ground mustard
3/4 teaspoon salt
1/4 teaspoon pepper
4 cups milk
500 g shredded sharp cheddar cheese
3/4 cup dry bread crumbs


  • Preheat oven to 350°. Cook macaroni according to package directions for al dente; drain.
  • In a Dutch oven, heat 1/3 cup butter over medium heat; saute onion until tender. Stir in flour and seasonings until blended; gradually stir in milk. Bring to a boil, stirring constantly; cook and stir until thickened. Stir in cheese until melted. Stir in macaroni. Transfer to a greased 13×9-in. baking dish.
  • In a microwave, melt remaining butter; toss with bread crumbs. Sprinkle over casserole. Bake, uncovered, until heated through, 30-35 minutes. Yield: 8 servings.
Posted in Recipes | Leave a comment

Skeptics’ Guide to the Universe transcripts project

I’m a huge fan of the Skeptics’ Guide to the Universe, a podcast of science and skepticism, and I’ve been thinking for a while that it’d be really good to have transcripts of the episodes to facilitate linking and searching. But I couldn’t find any other project, other than a thread on the SGU forums. So I decided to put my time where my mouth is, and just do some transcribing.

It takes me about three times the amount of time to do a transcript as the podcast’s length (which is about 80 minutes), so generally a couple of nights’ work for a single SGU podcast. I guess I might be able to manage about two podcasts a week, and given that there are currently a bit over 350 podcasts in the archive, and a new one released each week, it’ll probably take me about seven years to finish them all! So… I created a wiki, Now we’ll just have to see if the community gets behind it, otherwise I could be here for a long time.

Posted in Blogthings | Tagged , , , , , , , , , | 13 Comments

RDP VirtualBox without the proprietary Oracle extension pack

These days, virtualisation is all the rage. The various competing virtualisation products have reached a level of maturity where they can be reliably used for server consolidation. VirtualBox is one of the easiest to use, most featureful programs available in this space and with the ability to run on many different OSes on hardware with or without VM extensions, it is also one of the most popular. However, there is one wrinkle when it comes to using it for server consolidation: the proprietary RDP/USB2 extension pack.

The conventional wisdom when running a headless server with VirtualBox is that you need to install this proprietary extension pack from Oracle. This is fine until you want to use the server in production: as the PUEL only covers you for personal use and evaluation, you must purchase licenses. You can either pay £34 per user or £670 per “socket” (which has quite a convoluted definition). This gets you USB2 and RDP support.

However, there is another way, at least when it comes to RDP support. Continue reading

Posted in HOWTOs | Tagged , , , , , , , , , , , , , , , , , | 4 Comments

How to build MySQL Workbench on Ubuntu Precise (pre-release)

Update 2012-04-25: mysql has appeared in the universe package archive. You should be able to install it with a simple:

sudo apt-get install mysql-workbench

Read on if you still want to compile from source.

Right now (2012-04-04), Ubuntu 12.04 hasn’t been released yet, and so there is no binary package from Oracle of MySQL Workbench for Precise. I managed to get the MySQL Workbench binaries for Oneiric to run, by manually installing libzip1_0.9.3-1_amd64.deb from Oneiric, but this wasn’t stable (crashed as soon as I tried to run a SQL Query).

So I decided to build from source. Here’s how I did it Continue reading

Posted in HOWTOs | Tagged , , , , , , , , | 20 Comments

Ubuntu on Amazon ec2 from scratch

Update: I’ve now rolled this blog post into the Ubuntu wiki’s: EC2 Starters Guide page. Hopefully this helps out the Ubuntu community!

The informatics team here at MalariaGEN have been working with ec2 since before I joined them. So naturally, it’s one technology with which I’ve had to come to grips in the course of doing my job. For me, EC2 had a fairly steep learning curve, and after spending a while trying to learn it through doing, I decided that I would just have to spend some time getting properly to grips with how things worked. As part of that I decided to document it in a way that I’d not yet seen on the web: logically, comprehensively, explaining all the strange concepts and quirks that were clouding my understanding and stopping me from getting my job done efficiently. Continue reading

Posted in HOWTOs | Tagged , , , , , , , , , , , , | 1 Comment

Lentil soup

Tablespoon olive oil
2 Onions, diced
2 Carrots, diced
Some celery, diced
1 cup of red lentils
1L of veg stock
1-2 tsp curry powder
1 small tin of tomatoes
4 cloves of garlic, diced
salt and pepper

Fry the onions, carrots and celery until the onions are translucent. Add the curry powder and fry a bit more. Add the stock, lentils, tomatoes and garlic. Bring to a boil then reduce heat and simmer for 25 mins or until lentils are cooked. Salt and pepper to taste AND CHILLI. Eat with buttered toast.

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

Ubuntu’s Ambiance: selected items in unfocused windows are invisible

I have a confession to make: I really like Ubuntu’s design, its look and feel, and its colour scheme.  And it seems to get better with each release.  The new Natty theme is really beautiful, and the dark window decorations of the Ambiance theme are great (especially now that they’ve chased down the odd dark text on dark background problems).

Having said that, there’s one thing that I really don’t like: the way that it’s virtually impossible to tell what you have selected in windows other than the one that happens to be focused.  This is because the focused elements get completely desaturated, like this:

Which items are selected? It's anyone's guess!

Continue reading

Posted in HOWTOs | Tagged , , , , , , , , , , , , , , | 4 Comments

Installing Ubuntu on the lenovo ideapad S205

My girlfriend’s laptop died recently, and as her birthday was coming up I thought I’d buy her a new netbook to get her up and running again (well, really, to get my mac back).  For £300 from Amazon, we had a machine that was much like her old laptop; it’s amazing what you can get for so little money these days.  However, there were two things I didn’t realise: one, the ideapad-S205 lacks an optical drive (whoops).  The second was that it’d take me basically a whole day of dicking around to get Ubuntu to dual boot with Windows 7.  I hope this guide will help people out with the second problem (and I solved the first one by buying a USB DVD drive for another £30). Continue reading

Posted in HOWTOs | Tagged , , , , , , , , , , , , , , , , , , , , , , , , | 80 Comments

Gridengine the Ubuntu/Debian way

I’ve had Sun GridEngine running on our cluster of 12-core HP blades from its earliest days. What has not been working is the the inter-host communication (the ability of the system to schedule and distribute jobs across the nodes). I therefore set out to fix this situation. It turns out that the problems that prevented this from working are mainly caused by quirks in the way that the Debian (and by inheritance, Ubuntu) packaging was done. Continue reading

Posted in HOWTOs | Tagged , , , , , , , , , , , , , , | 12 Comments

Scripting class, answers 1

1. In firefox, right click on an image and do Copy link location. Then use that link in your script. {1..21} is shorthand for the space separated list from 1 to 21, i.e.: “1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21”.

[ $ii -le 21 ] is shorthand for “test $ii -le 21”

# using a for loop
for ii in {1..21}
        wget "${ii}.jpg"
# using a while loop
while [ $ii -le 21 ] # spaces are required
        wget "${ii}.jpg"
        ii=`expr $ii + 1` # spaces are required

For an interesting discussion: why did I use ii for my incrementer instead of i?

2. Note the double quotes, which are required to escape the filenames which contain special characters (spaces and parentheses). It is always good practice to wrap variables that contain filenames in double quotes for this reason.

for file in img*.jpg
        mv "$file" "`basename "$file" .jpg` (modified).jpg"

3. First, make sure imagemagick is installed:

sudo apt-get install imagemagick
for file in img*\ \(modified\).jpg 
        convert -resize 50% "$file" "`basename "$file" .jpg` (small).jpg" 

4. First, we install the software we need:

sudo apt-get install vorbis-tools
sudo apt-get install lame

Then we convert the files:

tar xvzf lara_st_john.tar.gz
cd lara_st_john/bach_violin_concertos
for file in *.ogg
        oggdec "$file"
        lame --vbr-new `basename "$file" .ogg`.wav `basename "$file" .ogg`.mp3

5. First, we extract the track information from the ogg file using the vorbiscomment command and save it in a temporary file. Then we use grep and sed to select each datum and save it in a shell variable. Once we have all this info ready, we can decode the ogg file to wav, then encode the wav to mp3, passing in the shell variables which contain the track information.

for file in *.ogg
        base=`basename "$file" .ogg`
        vorbiscomment "$file" > "$base.comment"
        tt=`grep -e "^title"  "$base.comment" | sed -e 's/title=\(.*\)$/\1/'`
        ta=`grep -e "^artist" "$base.comment" | sed -e 's/artist=\(.*\)$/\1/'`
        tg=`grep -e "^genre"  "$base.comment" | sed -e 's/genre=\(.*\)$/\1/'`
        ty=`grep -e "^date"   "$base.comment" | sed -e 's/date=\(.*\)$/\1/'`
        tl=`grep -e "^album"  "$base.comment" | sed -e 's/album=\(.*\)$/\1/'`
        oggdec "$file"
        lame --vbr-new --tt "$tt" --ta "$ta" --tg "$tg" --ty "$ty" --tl "$tl" "$base.wav" "$base.mp3"
        rm -f "$base.comment"
        rm -f "$base.wav"
Posted in answers, scripting | Leave a comment