Tutorials
Here we have a small selection of tutorials detailing many of the things that we have done around the site, and just how we've gone about it. The majority of these tutorials deal with getting various applications and code running within WordPress. Check back often as this page will be regularly updated.

Cicada (link coming shortly) is our first site of 2010, commissioned by a friend of mine for his new business. The brief was to provide a simple and clean website in order to allow prospective clients to contact him and to conform to all current European standards for businesses. It should also be compliant with IE6+, Firefox, Chrome, and Opera.
The website truly does seem simple at first look, but there’s a lot going on behind the scenes in terms of JavaScript and design choices. The big one being cufon, used to serve Helvetica Neue — in Light and Ultra Light variants — to the viewers. Using cufon is as easy as uploading the typefaces to their provided generator (make sure that the licensing allows for them to be embedded, you should also lock the file to your domain) and then linking the generated JavaScript file in the head of your HTML:
Continue reading: Cicada
Yes, the Superposition Kitty website has been turned on its head. Black is White! White is Black! And … that’s about it. A code cleanup was long due, and while I was at it I changed a few things around. Most importantly, I cleaned up the CSS, stripping it of a third of it’s weight in the process and hopefully speeding up load times.
Unfortunately, a few of the tutorial posts are now slightly outdated. I will be updating them in the coming weeks to comply with the new theme and changes in code.
I’d like to thank 1KB CSS Grid for the base grid used in the new code. I’d messed around with various grids — such as 960.gs — before, but found them almost universally bloated in the effort to provide for every eventuality. 1KB Grid is tiny and neat and much more elegant than the system I had come up with previously. The grid now looks something like this:
Continue reading: White On Black

I recently realised that I haven’t gone into any detail about my work environment. For today, I thought I’d start with my desktop. First things first, the wallpaper is from a picture posted up on Twitter recently by Bryan Lee O’Malley — the author of the wonderful Scott Pilgrim series, soon to be a movie by the talented Edgar Wright (director of Spaced / Shaun Of The Dead).
But recently I’ve been getting comments about the “crazy text in the top left corner” of any screen-shots I show people, so I thought I’d post up a bit of a tutorial for the application that makes this all possible — GeekTool. What it does is run scripts and commands that you would use in Terminal and display the output on your desktop.
GeekTool is quite simple to use. For now we will just be messing with ‘Image’ Geeklets, just drag one into position on your desktop and you will see the ‘Properties’ window. There are three important things here: Command, Refresh, and Style. Command is where you will enter the scripts below, Refresh is how often you want the output to refresh (I find 10s works well for most cases), and the button below Style — ‘Click here to set font & color.’ — opens up the default Font style window of OS X (which you should already be accustomed to).
The various scripts I’ve gathered together below have been collected from tutorials all over the web, I hope you find them as useful as I did.
Continue reading: My Desktop
We’ve had a few requests for articles on the site lately, and more and more of them are asking about the design of the site itself. So for today I thought I would detail how I designed the header for Superposition Kitty. An initial warning: I have no idea how many browsers this works in (as my usual testing procedure of using Browser Shots is no help for hover states), however it should work for all the major browsers, even IE6. Secondly: This code — or more specifically, nesting a <div> between <ul> and <li> elements — is not XHMTL valid.
I spent a lot of time worrying about the second part until I realised the validity of my code had absolutely no effect on how the site is displayed to visitors. This doesn’t mean you should just throw validation out the window — at the very least it is a great way to discover hidden errors in your code, or why something isn’t displaying as you think it should — but I just don’t believe it is as important as I once did.
Headers in WordPress are a relatively simple affair. If you want to brush up on the basics then I would recommend checking out the excellent WordPress Codex article on designing headers. The header for Superposition Kitty is based on Son Of Suckerfish Dropdowns, which is in turn based on the groundbreaking A List Apart article: Suckerfish Dropdowns. Reading through both of those articles (which I heavily recommend) will give you a good grounding in how to style lists as a horizontal (or even vertical) menu.
Continue reading: WordPress, Headers, And Superposition Kitty
A.K.A. Getting Apache, MySQL, PHP and Ruby on Rails to play nice under Ubuntu.
Now we get to set up our new Linode VPS. The first thing you’ll want to do is configure your DNS. Make sure that you delete the MX record and replace it with the records from Google Apps as discussed in part one. Note that you do not need to wait for the name servers to propagate before editing your DNS records, in fact it is probably better to set up your DNS first so that downtime is minimised. You’ll then need to deploy a linux distribution. As mentioned in the preface; I chose Ubuntu 9.04.
Now this is where the need to use the Linode dashboard ends. The following can be used with any VPS provider. You can follow either the Linode Setting Up A LAMP Server On Ubuntu article, or alternatively Slicehost’s Ubuntu Hardy Setup article to get your VPS up and running. Note that the Slicehost article focuses more on security and that you will need to read the rest of the articles in their series to set up Apache, MySQL, and PHP.
Continue reading: Changing Hosting Providers Part 2.
A.K.A. Backing up all of your data, setting up email, and configuring DNS.
Seeing as my Media Temple install still wasn’t responding, the first thing I had to do was login to Plesk and see what services I could shut down to get on with the move. Turned out there actually wasn’t any, so I took the decision to shut down Apache for a few hours while I tried to get email sorted.
Hours were spent researching the best way to migrate the seven email addresses between servers, until a friend recommended Google Apps. The standard edition (free) gives you a calendar, docs, sites, and — most importantly — email. 7GB of data per user, with 50 users allowed per domain. There was also the added bonus that I would be moving reasonably intensive resources (spam filtering and such) off the server, and that if my server ever went down again email would not be effected. The only downside to Google Apps is that you can’t have multiple domains on the same account (unless you want all the email to go to the same address), so it required setting up 3 different accounts to manage all my email addresses. Setting up an account is relatively painless, involving creating a document in the root of your domain to prove your ownership.
Continue reading: Changing Hosting Providers Part 1.
Lately at Superposition Kitty we’ve been adopting more of a photo-blog feel to some of our posts. If you’re recently read Apple Crumble The Retarded Way then you would’ve noticed that text is displayed in a caption inside the image when you mouse over it. The original idea for this was taken from The Guardian website, where if you hover over any images on the main page a caption will display giving you more information on the linked story.
I spent hours coming up with what I thought would be the most perfect solution to this (I didn’t want any of the extra JavaScript effects that The Guardian used), but my approach turned out to be too narrow — working only in Firefox. So I turned to my good old friend Google, and started searching. I eventually came up with this CSS On-Hover Image Captions tutorial by Soh Tanaka. Being pure CSS and working in all browsers (including Internet Explorer 6 and 7) it seemed to be exactly what I wanted. You can view a page demonstrating how his version works here, and I recommend that you read through his post first to get a greater idea of how these little CSS tricks achieve such an effect. Read on past the demo image below to see how you can get this up and running on your blog.
Continue reading: CSS Image Caption Rollovers For WordPress
Every so often I get questions about what plugins I’m using on the site, and the sheer number they get in response seems to shock most so I’ve decided to document them all below. I believe that the best plugins should be invisible, thus the majority of these plugins add some kind of back-end functionality that I feel is missing from the WordPress core.
Advanced Excerpt
Advanced Excerpt adds several improvements over WP’s default excerpt. It will trim to a supplied character or word length and has the ability to keep HTML markup. You can see it in use just to the right of this post under ‘Latest Posts’, I’ve set the excerpt length to four words, the HTML markup for <em> to be kept, and the ellipses to be …. All-in-all, very easy to install and use, and it provides some much needed functionality.
Akismet
Akismet is a very well known (and well used) plugin. Simply install it, enter your WordPress API key, and you’ll likely never have to worry about comment spam on your blog again. At the time of writing Akismet has caught 1,276 spam comments on this blog with a 100.00% accuracy rate. Occasionally you will have to delete a few of the comments that it catches when it’s not completely sure that they’re spam (at the moment I’ve been deleting quite a few Russian comments), but for the most part it will do its job behind the scenes.
flickrRSS
FlickrRSS can be seen working in the very right column. It is a simple plugin that pulls photos from your Flickr photostream and displays them on your blog, just enter your Flickr User ID and the number and size of the photos you want to display. An added bonus is the ability to cache the thumbnails it creates of each photo.
Continue reading: WordPress Plugin Round-Up
You might have noticed lately that the colour-scheme of this site changes each time you click a link or reload a page (currently we have blue, pink, and green). This is something easily accomplished with just an extra 2 tiny CSS files, and a little bit of PHP.
If you’ve read my previous article — WordPress And A Horizontal Baseline Pt.1 — you are already familiar with the CSS that forms the foundation of this site. What we’re going to do first is strip out anything to do with colour from the CSS and put it in it’s own separate file that we’re going to call blue.css.
a:active, a:hover, .commentlist a:hover, .commentlist a:active, .commentlist cite a:hover, .commentlist cite a:active, #recent-comments a:hover, #related-posts a:hover, .lastfm a:hover, #footer a:hover, #footer a:active, .commentlist pre a:hover, .commentlist pre a:active {color:#34B0F8;}
#menu ul li a:hover, #menu ul li a:active {background:#34B0F8;}
.entry p a:hover img, .entry p a:active img {border:1px solid #34B0F8;}
a.feature:hover {border-color:#34B0F8;}
Continue reading: Random Stylesheets in WordPress
The aim of the Echo Nest Remix API is to let you manipulate and remix music and video through code. Execute the few lines below:
import echonest.audio as audio
audio_file = audio.LocalAudioFile("input.mp3")
beats = audio_file.analysis.beats
beats.reverse()
audio.getpieces(audio_file, beats).encode("output.mp3")
And you have now reversed a song by ‘playing its beats forward from the end of the song’. The output of which would look a little something like this.mp3.
First off, you’re going to need to grab an API key by registering an account. If you’re using OS X you can follow this install process (here’s Linux and Windows). Make sure to run the example at the end of the installation process to confirm that everything works.
Congratulations! You can now mess around with beats and manipulate all your mp3s and videos. Try out the rest of the examples to get an idea for just what the Echo Nest Remix API can do. To get an idea of just how powerful the (upcoming) video manipulation is, check out Where’s The Pow by Paul Lamere in which he remixes the Black Eyed Peas — Boom Boom Pow.
Previous »