Interesting Things

Richard Bradshaw's idea of what is interesting

Improve the typography on your Mac in 5 seconds.

As you are surely aware, Microsoft ripped off Helvetica to create the Arial font. It’s not as nice, and doesn’t look nice on screen at all. The image below shows some of the differences. As you can see, the ends of each letter aren’t lined up properly, they are all at weird angles. Though Helvetica [...]

How to know that your PHP is borked before your clients kill you

Maybe it’s just me, but every now and then I make a quick change to a PHP script, don’t bother checking it, then a few hours/days/months later either realise that I missed a vital semicolon, or mismatched a bracket. This started to get on my nerves, as now this has happened a couple of times [...]

How to use Twitter as an error log

Sure this has been done before, but I had a brainwave today – why not use Twitter as an error log for web apps? I already have error handling on my functions, so surely this shouldn’t be a difficult addition… turns out it’s not. First, you’ll need a twitter account. I’d recommend setting one up, [...]

Using Texter to speed up web design/development

Lifehacker’s Texter let’s you define short macros that allow you type a little, and get a lot back. I’ve not used this before, but am constantly finding myself typing the same bits over and over and over, so this is a very neat and helpful little tool. Basically, you just define a command, then specify [...]

Enable better caching on your website using PHP

Just a quick snippet to help you tell useragents accessing your site that the content hasn’t changed. ?View Code PHPfunction caching_headers ($file, $timestamp) { $gmt_mtime = gmdate(’r', $timestamp); header(’ETag: "’.md5($timestamp.$file).’"’);   if(isset($_SERVER[’HTTP_IF_MODIFIED_SINCE’]) || isset($_SERVER[’HTTP_IF_NONE_MATCH’])) { if ($_SERVER[’HTTP_IF_MODIFIED_SINCE’] == $gmt_mtime || str_replace(’"’, ”, stripslashes($_SERVER[’HTTP_IF_NONE_MATCH’])) == md5($timestamp.$file)) { header(’HTTP/1.1 304 Not Modified’); exit(); } }   header(’Last-Modified: [...]

7 differences between Linux and Windows

Background Having mainly used various linuxes over the last few years, I’ve returned to using Windows 7 on my main desktop (out of curiosity) and XP on my work laptop (out of the fact it’s not mine!). Thought I’d share somethings I’ve noticed now I’m moving between them daily.

Friendfeedifying your feeds

Although these tips are designed for feeds used with Friendfeed, the first two aren’t just for that – it’s just that Friendfeed exposes the extra functions in it’s interface. The third tip regarding SUP currently is only really relevant for Friendfeed.

5 terrible SEO ideas

This post has been updated and moved to 5 terrible SEO tips.

5 ways to make using bash more productive

If you are using Linux or a Mac these days, then you likely have bash as your default shell. It generally comes with a few nice features (tab-completion, history etc.), but there are a few tips and tricks which will make it much nicer to use. Here’s a run down of my favourite 5.

Writing dynamic XML sitemaps using PHP

Since Google introduced sitemaps in 2005, they have grown to be accepted by the 4 main search engines: Google, Live Search, Yahoo and Ask. As the offical sitemaps page describes: Sitemaps are an easy way for webmasters to inform search engines about pages on their sites that are available for crawling. In its simplest form, [...]