OfflineImap to Thunderbird

Last week I moved from Debian to Linux Mint and setup Thunderbird as my new mail client(replacing mutt). Sadly for some reason Thunderbird started tanking and wiped all the mails from my mailserver without actually downloading anything. I could’ve restored the mails from a backup but instead I figured I’d take my emails offline and use Thunderbird as my primary mail client. I had a backup of my mails from OfflineImap but the problem was that OfflineImap uses the MailDir format and Thunderbird didn’t support it. ...

February 8, 2014 · Shane Dowling

Thrashing your networks download with dispatch and axel

Say you need to grab a file as fast as possible and you also happen to have a few network connections knocking about. For example maybe a separate network for your wireless and ethernet. Maybe you have a phone with tethering or a 3g dongle. This little guide will get your download distributed across these connections and hopefully significantly speed things up. Beforehand you’ll need npm, dispatch and axel download manager. Connect all of your network connections and get the IPs they have been allocated. I had some virtualbox connections appear as valid so make sure dispatch is using the right ones. You can actually use dispatch itself to list all potential connections. ...

December 12, 2013 · Shane Dowling

Fixing a broken vagrant box

The first time this happened I went into a cold sweat. My box with all dev versions of my companies live databases had died. Of course I had the box provisioned with salt so configuration wasn’t a problem, but grabbing all those databases, downloading, altering specific internal values and inserting them was going to cost me hours. These steps should’ve been salted too but I hadn’t gotten round to it yet. ...

October 17, 2013 · Shane Dowling

Using PPAs with Salt-States

I couldn’t seem to find a decent tutorial on using PPA’s to manage repos with salt states so I’m documenting it here. Say you want to install golang using these sudo add-apt-repository ppa:duh/golang sudo apt-get update sudo apt-get install golang Well, to replicate this into a salt state it’s pretty straight-foward. This also ensures you always have an up-to-date version of go. golang: pkg: - latest pkgrepo.managed: - name: ppa:duh/golang That’s it, I just struggled to find that anyway. ...

October 10, 2013 · Shane Dowling

Making Drupal 6 Development Suck Less

So you’re here. Like myself probably stuck developing for `Drupal 6 `__. All the modules on-line are for the latest and greatest versions of Drupal and you’re scouring posts from 2009 to try find that deprecated module you really need. Well his post is dedicated to making your life that little bit less painful, because I too feel your pain. Better debugging with devel. Installation Install subversion (to allow devel to download the firePHP extension code needed). Make sure drush is installed. drush dl devel && drush en devel Enable user permissions for devel Enable what you need to at http://rooturl.com/admin/settings/devel Install FireBug and FirePHP on firefox and enable the Net Panel in firebug Usage ...

October 3, 2013 · Shane Dowling

Connect to routers anonymously

I’ve created a little script that incorporates wicd, macchanger, hostname and john the ripper’s password list to randomise your mac address and hostname when connecting to the internet. I’ve gone with wicd over network manager as network-manager has a tendency to store connection details, so while your machine might id your hostname or mac address as something new, network-manager will actually connect using the original stored details. I must admit I enjoyed writing this, it reminded me of the old days when linux network managers were all rubbish and you had to write bash scripts to connect to vaguely complex network configurations. ...

September 28, 2013 · Shane Dowling

Explainshell

explainshell.com - match command-line arguments to their help text match command-line arguments to their help textexplainshell.com A very nice visualization of command line args.

September 13, 2013 · Shane Dowling

Salt Miner

I’ve just created a salt state that allows you to install a crypto-currency miner across your salt provisioned boxes. It’s only tested on Ubuntu and Debian, but I intend to extend it to Archlinux(there’s a lovely aur package that does all the work). Currently I’m mining anoncoins as you have some chance of making tiny amounts of cash and it’s exchange rate against Bitcoins isn’t so bad but feel free to choose whatever coin you like. ...

September 7, 2013 · Shane Dowling

Unit-testing unmanaged Django models

Say you have an app with a set of models that aren’t being managed by Django, you’re going to run into trouble when it comes time to run unit-tests against these. What I mean is if in the model meta you have something like this app_label = 'your_app_label' managed = False db_table = u'your_table_name' If you run unit-tests against these models the trouble occurs because django will ignore this model when creating tables in the test database and you’ll get a relation not defined error for ‘your_table_name’. The solution to this is to create an app specific TestRunner that will over-ride this setting and temporarily allow Django to manage your models, just for testing purposes. ...

August 31, 2013 · Shane Dowling

Suppling test data to django-cities

Django-Cities, is an awesome project that supplies easy to import worldwide location data and a set of very neat location models that you should really be using for any django project needing location information. I’ve been using it lately but ran into problems when I tried to run unit tests that made use of the django-cities app. As django-cities populates a load of data via it’s import command it can take a long time(over an hour) before a test database with all the data could be created. So I needed a stop-gap solution to quickly get a workable dataset up and running for a few small unit tests. ...

August 29, 2013 · Shane Dowling