Google Closure Compiler TextMate Bundle

I’ve been trying out the brand new Google Closure Compiler instead of the YUI Compressor. I’m not going to go into any detail about the Closure Compiler as there’s plenty of information out there already, but I can say that it looks like another solid offering from Google.

Anyway, in an effort to make a pretty good piece of software even better I decided to make a TextMate bundle for it so that it’s never more than a keystroke away (defaults to ⇧⌘G).

Continue reading

Equal height columns with pure CSS

A common problem when designing for the web is how to create equal height columns. The usual solution is to either resort to JavaScript or CSS absolute positioning, here I will show you how to create equal height columns with pure CSS using the margin, padding and float properties.

Continue reading

Blog redesign #4 (and why the WordPress Plugin API needs fixing)

Whilst I was redesigning my blog (what do you think by the way) I decided that what I really needed to finish it off was an ajaxy live search. Now normally I would have looked for a jQuery version, but as I’ve been trying my hand at a bit of MooTools recently I decided to write my own plugin. By the way, if you want to use it on your own site it’s available for download on GitHub.

After a few minutes hacking it together on my local web-server I had a pretty good implementation, even if I say so myself. However, once I’d installed it onto my live server it stopped returning any results. The reason for this? I had WP Super Cache installed on my live server, but not on my local server, and was messing up the JSON output by putting a comment at the bottom. Obviously, the JavaScript function refused to parse it as valid JSON. When I turned WP Super Cache off everything returned to normal.

As a developer this was simple enough to debug and fix, but for the average user who just wants to use WordPress, install some plugins and then start blogging away this incompatibility simply isn’t good enough. Before you know it you’ll end up with your support forums full of posts such as “Your plugin doesn’t work with xxxx, please fix it“, even if you have already stated this issue in your readme and installation guides.

Continue reading

Using Capistrano to deploy PHP (or anything else in a Git repository)

Recently I’ve been looking at a way to ease the path of deploying PHP applications to my servers. I eventually settled on the excellent Ruby tool Capistrano which is very popular with the Rails crowd. Now, I’m aware of the irony of using Ruby to deploy PHP but please bare with me.

All of my code is stored in the Git VCS with a bare repository on the server, which is what you should be doing as well. Once you’ve got used to managing your code with Git over SSH you will never want to go back to FTP again. Seriously, try it.

My work-flow is fairly typical: clone the repository onto my local machine; hack away; commit the changes and push the commit back to the server. The problem arises when it comes to deploying this code – I could either set up a post-update hook in the bare repository to pull the changes into the web root or do it manually.

Continue reading

jQuery Plugin: rf.Sparks

[Update] I’ve recently changed my JavaScript framework to MooTools, hence the rf.Sparks demo isn’t working properly. The plugin itself hasn’t actually changed so should still work perfectly fine on your own site.

This month’s jQuery plugin is one that creates an effect that I like to describe as “sparks”. We are currently using it on the Redflex splash page whilst we prepare for a new product launch.

Continue reading

How to recreate the Konami code in Javascript

Facebook has featured in social media blogs recently for adding a Konami code Easter egg to their home page. In this blog post I show you how to add similar “functionality” to your site using Javascript.

Continue reading

Why fee is better than free

There is a major problem with the approach of many internet based companies. Don’t get me wrong, I’m as much a fan of them as anybody, but if they want to survive they need to get smart. And fast.

Very simply, the majority of internet based companies are not self-sufficient. Without massive injections of cash from their investors/founders they would not survive their first year in business. This is due to their inability to raise any revenue from their user base.

Continue reading

jQuery Plugin: rf.Highlight

[Update] I’ve recently changed my JavaScript framework to MooTools, hence the rf.Highlight demo isn’t working properly. The plugin itself hasn’t actually changed so should still work perfectly fine on your own site.

I needed a simple implementation of the famous Yellow Fade Technique (YFT) for a new product that we are developing at Redflex. We struggled to find a YFT jQuery plugin that was simple to use, had a small file size and supported chaining. I give you rf.Highlight.

Continue reading