How to download YouTube videos using Docker on Linux

I recently found a 2 hour YouTube video where I wanted to listen to the audio only.  On trying to install youtube-dl on my server, I was shocked to see the number of packages that it was trying to install.

I run Ubuntu, but this should work in any Linux distro.  Using a docker container saves polluting your server with a lot of dependencies you might not need.

If you don’t already have it, install docker:

# curl -fsSL -o
# sh ./

The following will download a video to the current working directory:

# docker run --rm  -v $PWD:/downloads wernight/youtube-dl "

This will extract just the audio and give you the output as an mp3:

# docker run --rm  -v $PWD:/downloads wernight/youtube-dl --extract-audio --audio-format mp3  ""

Filtering Postini tagged mail with Sieve

The headers Postini’s anti-spam system adds to emails are quite hard to filter on, as you need to compare part of one header to part of another. Here’s a little snipped that works with dovecot 1.2’s sieve implementation. I don’t actually use this myself anymore, but I’m posting it here for anyone else struggling with the problem.

Continue reading “Filtering Postini tagged mail with Sieve”

Cacti and Exim – a (mostly) complete guide – Part 1

I recently had to set up monitoring for a new Exim MX server at work. I wanted to make exim statistics available over SNMP such that I can easily hook it into cacti and nagios. Having recently been though the whole process from beginning to end, I thought I’d take the time to document the process, so that others can not only download and use my scripts/templates – but also modify it to suit their needs and learn some cacti whilst doing so.

Download my script and template: – exim_cacti_v1.tar.gz

Continue reading “Cacti and Exim – a (mostly) complete guide – Part 1”

Connecting to the Internet via bluetooth using a Nokia on OS X

I recently got a new MacBook, thanks to my employer – Timico. Believe it or not, my previous laptop I ran Windows Vista on – and despite Linux usually being my OS of choice, I got on well with Vista. For me, things ‘just works’, and on that list of things that ‘just work’ was Nokia’s ‘One Click’ internet access tool included in the Nokia windows software. This tool makes it dead easy to connect via bluetooth, it really was just a matter of selecting your network provider, and clicking a button.

I typed a few things into google to try to figure out how to get OS X to connect via bluetooth over my N95 or E71 mobile phone. I found all sorts of confusing articles suggesting I needed to download scripts and place them somewhere, and jump over a few hurdles. Frankly, I couldn’t be bothered to mess about with that kind of thing, I wanted things to just work like they did in Windows.

Despite the confusion caused by the various articles on the internet, it’s actually surprisingly easy to setup – so I thought I would document it here for others. Simply go to the bluetooth menu, and select to ‘Set up a bluetooth device’, follow though the obvious settings. The last step in the wizard has a tick box labeled ‘Access the Internet with your phone’s data connection’. Ensure it’s ticked, and click next.

These settings are for Vodafone contract (PAYG is different apparently) in the UK, a quick google of something like ‘GPRS settings <country> <provider>’ should allow you to find the settings you need.

Username web
Password web
APN internet

Save these settings. I like to have ‘show bluetooth status in menu bar’ and ‘show modem status in menu bar’ selected, that choice is yours. It is now as easy as going into network preferences (or using the menu status in the menu bar) and clicking ‘connect bluetooth’ to connect to the internet. This works perfectly for me in OS X 10.5.6.