David Reynolds

Welcome to boredom

Git Workflow

| Comments

I’ve been using this for a while and had it recorded on a private on a private wiki. I was just tidying up my hosting account and thought I’d get rid of the wiki and store any useful info from it on my blog

Clone full subversion history into git repository (warning, may take a long time depending on how many commits you have in your Subversion repository).

1
$ git-svn clone -s http://example.com/my_subversion_repo local_dir

-s signifies trunk/ branches/ tags/ exist in the svn repo (standard repository setup)

Create branch for local changes and check it out

1
$ git checkout -b XXXX-description # where XXXX is a ticket number

Make my changes in the branch… Make my commits in the branch…

Change back to master branch

1
$ git checkout master

Merge branch as one commit to master

1
$ git merge --squash XXXX-description

Commit changes to master branch:

1
$ git commit -a

Push changes back to svn:

1
$ git svn dcommit

Resync local_changes to master:

1
2
$ git checkout XXXX-description
$ git rebase master

Installing Python-crack on Mac OS X Lion in a Virtualenv

| Comments

Since:

  • I forgot how to do this last week
  • I need to do it reasonably regularly
  • I can’t find any other correct resources suggesting how to do this

.. I thought I’d record it here.

This assumes:

  • You are running Mac OS X (version probably doesn’t matter)
  • You are using Homebrew (and if you’re not, why aren’t you?)
  • You are using virtualenv

Do the following:

1
2
3
4
5
6
$ # Download and uncompress python-crack-0.5.1.tar
$ brew install cracklib cracklib-words
$ cd python-crack-0.5.1
$ DEFAULT_DICTPATH=/usr/local/share/cracklib-words ./configure --prefix=$VIRTUAL_ENV
$ make
$ make install

Done!

How to Compile Lftp on OS X Leopard

| Comments

I’ve recently been missing a few pieces of software from my linux days most recently, lftp. It wasn’t as simple as I had hoped it would be so I thought I’d record how I did it here.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Download and install readline
$ wget ftp://ftp.cwru.edu/pub/bash/readline-6.0.tar.gz # (or latest stable version)
...
$ tar zxvf readline-6.0.tar.gz
$ cd readline-6.0
$ ./configure --prefix=/usr/local
...
$ make
...
$ sudo make install

# Download lftp
$ wget http://ftp.yars.free.net/pub/source/lftp/lftp-3.7.15.tar.gz # (or latest stable version)
...
$ tar zxvf lftp-3.7.15.tar.gz
# Here comes the magic
$ CXXFLAGS="-O0 -Wall -fno-exceptions -fno-rtti -fno-implement-inlines" \
   LDFLAGS="-Xlinker -search_paths_first -L/usr/local/lib" \
   CPPFLAGS="-I/usr/local/include" \
  ./configure --with-openssl --disable-shared --disable-nls --prefix=/usr/local
...
$ make
...
$ make install

.. and that should be it. As I understand it, the ‘magic’ part tells the compiler to look in the right place for the readline library.

UPDATE: I suggest you now ignore this and use Homebrew where I have contributed an lftp recipe.

My Favourite Podcasts (at the Moment)

| Comments

I’ve been finding recently that I seem to spend a lot more time watching and listening to podcasts than I used to and I thought I’d list them here to see if anyone else has similar podcast taste or if anyone has any podcast recommendations.

Apple Quick Tips: Weekly, short tips on how to use Mac OS X. These are often things I already know, but sometimes the odd gem of a tip comes up.

Best of Chris Moyles Enhanced: Since I don’t commute to work any more, I seem to not catch much of this show when it’s on in the morning, so I catch up on it with the podcast.

CNET TV’s Loaded: A (generally) less than 5 minute look at the latest news stories in Tech. Presented by Natali Del Conte.

The Collings and Herrin Podcasts: Weekly musings from Richard Herring (ex of Herring and Lee) and Andrew Collins (ex of Collins and Maconie). Often quite crude, always very funny.

Diggnation: A hilarious look at the weeks top stories from digg.com. Presented by Kevin Rose and Alex Albrecht.

GeekBrief.TV: Shiny, happy Tech news.

Hak5: Info and tutorials on all sorts of geeky topics.

Layers TV: Short tutorials, competitions and news about all applications in Adobe Creative Suite.

The Perfect Ten with Phill Jupitus and Phil Wilding: The first podcast I’ve heard with rules: * 10 Subjects, drawn at random from a fine-looking hat * Only 30 minutes for the lot * No returning to subjects - EVER! It ruins the time/space continuum. Another very funny podcast.

Photoshop User TV: Tutorials, news and competitions focused mostly on Photoshop (and sometimes Lightroom).

Pixel Perfect: Presented by the Photoshop wizard that is Burt Monroy. He shows you how to create all sorts of things from scratch in Photoshop.

Robert Llewellyn’s Car Pool: The actor behind Kryten in Red Dwarf and presenter of Scrap heap Challenge. Drives people around in his car and has a chat with them. Fantastically simple concept which makes for a great podcast.

Scam School: Bar scams and tricks. Another great podcast from Revision 3.

SModcast: Kevin Smith and Scott Mosier (with occasional guests) chat about anything and everything.

Systm: Patrick Norton, David Caulkins and Roger Chang talk you through all sorts of geeky projects. From building a robot, to making a Media PC.

Amazon MP3 Store

| Comments

I have probably been using Amazon a hell of a lot more over the past couple of months than I usually do, mostly because I signed up for an Amazon Prime trial and then bought most Christmas presents from Amazon, but also because of their new MP3 Store.

Amazon launched their MP3 store just before Christmas and I bought Seasick Steve’s album “I Started Out With Nothing” to try it out. I found the experience pretty painless and was very pleased with the service for £3 an album. I didn’t really buy any more music from Amazon until I received an email with a £3 voucher in it for use on Christmas day and Boxing day.

I finally remembered to use it on Boxing Day evening and I picked 2 albums to download (Elbow - The Seldom Seen Kid and Kaiser Chiefs - Yours Truly, Angry Mob). I checked out, paid and the realised I’d forgotten to use the voucher! I cursed my own stupidity but then forgot about it and started listening to the music.

Today, I received an email from Amazon saying the following:

‘We are writing to you with regard to our recent MP3 Christmas promotion. As your order XXX-XXXXXXXX-XXXXXXX qualified for this promotion, we would like to offer you a refund of GBP 3.00.’

Thanks Amazon! This means despite me forgetting to use the voucher (like an idiot) I still received the £3 discount! I was so impressed with this customer service that I had to break my month long blog silence to post about it.

How Long Does It Take to Do a 7 Pass Erase With Disk Utility

| Comments

Since I couldn’t find any solid figures for how long it might take to run the 7 pass erase, I thought I’d feed Google with my findings in the hope that it might help someone else in future.

I ran the 7 pass erase on an 80GB Hard Disk and it took around 4.5-5 hours.

Hope that helps someone.

Django Pony Wallpaper Popularity

| Comments

From my logs it seems that the blue wallpaper was the most popular:

74 /blog/django-pony/magic-pony-django-wallpaper-blue.png

57 /blog/django-pony/magic-pony-django-wallpaper-green.png

41 /blog/django-pony/magic-pony-django-wallpaper-red.png

For fun, here is a little graph to demostrate:

Django pony wallpaper colour popularity