sneeu

Feed icon

25/May

(Double) Spotify Sunday #9

I somehow managed to forget Sunday Spotify two weeks in a row, so here’s a playlist I made over the last few weeks. I started at Grizzly Bear, and kept clicking on similar artists, or back until I ran out of time.

19/May

I am 27

Today, I am 27. Although it looks more like 3^3. I am the age I will be when I am married.

Here’s a nice video to celebrate.

12/May

Tweetie Bookmarklet

I adore Tweetie for the Mac (and the iPhone). I’m also interested in the whole revcanonical thing that’s been going on (you may have noticed I recently added short URLs to the permalink pages of this blog), and I wanted the Tweetie Bookmarklet to respect the site’s own short-URL rather than generating one from Bit.ly, TinyURL or another when posting to Twitter, so I tinkered with the bookmarklet.

And here it is, my new and improved Post to Tweetie bookmarklet, with added relalternativeshort love.

10/May

Spotify Sunday #8

This week’s Sunday Spotify, inspired by my buddy Andy Lobban’s Off The Beaten Tracks is Malcolm Middleton’s latest effort, Sleight of Heart. And I’m sorry it’s late.

2005-09-28-Malcolm_Middleton-03 by Martijn Middel

2005-09-28-Malcolm_Middleton-03 by Martijn Middel.

03/May

Spotify Sunday #7

This week’s Spotify Sunday comes from Scotland’s very own Dananananaykroyd, and is their latest album, Hey Everyone. I was lucky enough to see Dananananaykroyd support Foals last year at the Barrowlands.

Glittered Dana by lucylovestodance

Glittered Dana by lucylovestodance.

30/Apr

Adding South Migrations to Django

Database migrations: Django doesn’t have them built in, but that doesn’t mean we’re stuck in a multi-developer, multi-database, ALTER TABLE purgatory. In fact there are a couple of options, and the one I’ve looked at is South.

Getting started is easy: by the end of this post you’ll have installed South, have a couple of migrations, and be able to add and remove columns from your tables. What you won’t learn is how to write custom migrations or migrate data.

Geese migrating south by nordicshutter

Geese migrating south by nordicshutter.

Installing South

  • Download South from the South website, or get your self a clone of the South Git repository.
  • Install it using python setup.py install.
  • Add 'south' to your INSTALLED_APPS setting, and create a new setting: SOUTH_AUTO_FREEZE_APP = True.
  • Finally, do a syncdb.

The First Migration

Assuming you’re adding South to an existing project, the first migration is super simple:

./manage.py startmigration [app name] --initial

This will generate the first migration for your [app name] (where [app name] is the last part of an app name in your INSTALLED_APPS setting). The syncdb we did above should have installed the South tables, but because we have existing models, we need to fake the migration:

./manage.py migrate [app name] --fake

The Next Migrations

Once you’ve altered your models you’ll want to create more migrations, this is done with the following command:

./manage.py startmigration [app name] [migration name] --auto

And then we’re ready to migrate the database:

./manage.py migrate [app name]

By this point you’ve probably noticed that in your app folder there’s now a migrations folder with sequentially named files. To migrate to a specific version, we use:

./manage.py migrate [app name] 0002

If the current state of the database is ahead of the specified migration, the above command will migrate backwards (probably removing columns), otherwise it will migrate forwards (adding columns).

Next Steps

What I’ve described is only dipping toes into the South water. To find out more, checkout the excellent South Tutorial, and the South Command Reference.

28/Apr

Future Disappointment

Back to the Future by Dr. Ilia

Back to the Future by Dr. Ilia

Eye-Fi sells a camera memory card which adds the ability to send photos wirelessly to your computer, or the Internet. Imagine my delight when I heard they were releasing an iPhone app!

Now the Eye-Fi app for the iPhone is available for download. It uploads photos from the iPhone to Flickr, Picasa, and a handful of other web-sites. Pretty cool.

But not that interesting. And something that’s been done before. And only Eye-Fi customers can use it. And it’s only available from the US iTunes Store.

What I would really have liked to see Eye-Fi do is write a proxy application. By that, this is what I mean: I stick the Eye-Fi card in my camera. I start the app on my phone, lock it, and put it in my pocket. I start snapping with my camera. The photos are sent to Flickr via the phone. Not a “computer” in sight.

This is the future for goodness sake!

26/Apr

Spotify Sunday #6

Most of my friends know I am partial to a bit of No Jacket Required, but until recently I’d not listened to much early Genesis. My good friend, and colleague Robbie pointed me towards what is this week’s Sunday Spotify: Foxtrot by Genesis.

genesis - foxtrot - 1972

genesis – foxtrot – 1972 by mr_akka

26/Apr

Old Code

I’ve put the old (ugly, blue, lifestream) version of this website on GitHub. Certainly there are some warts in the code, few comments, but it was an interesting project: in particular getting the lifestream working with the help of FriendFeed.

I’ve done this for two reasons: firstly to free up a private repo in my GitHub account; and secondly as an experiment to see if anyone looks at the code—let me know if you find anything useful, or would like any help getting the code running.

And finally the last thing I learnt from doing this, was how to completely remove a file from a Git repo’s history.

20/Apr

Spotify Sunday #5

Feeling a bit lazy, this week’s Sunday Spotify is simply The Best of Pantera: Far Beyond the Great Southern Cowboys’ Vulgar Hits!

Pantera by m.m_q_999

Pantera by m.m_q_999.