Latest Publications

Super Mario Kake

I just thought I’d share my wife’s latest creation. There’s still a tenuous link to technology :)

Super Mario Kart Cake

Yoshi takes the lead in this delicious climax.

Happy Birthday John!

Where Are All My Customers?

Parent and Small Child Space

How many of your customers 'drive away' without you realising?

I was out shopping the other day and I did something that I’ve done many times when I’ve driven into Asda: I drove around to the parent and child parking spaces. Then I drove out of the car park and went to Sainsbury’s instead.

So what just happened?

A simple thing, really. I wanted a parent and small child space, and there were none. None at all. This happens quite often, and is a clincher for me when I’m finding a supermarket to go shopping at. I’m not going to rant on why the bays are a good idea as they are for many reasons. But I’m going to point out something that happens frequently at Asda and Tesco here, and why I think there’s a trick being missed. (more…)

Why Not Let Business Leads Chase You?

This chap doesn't know it yet - but you're calling him to fix his problems

One of the constant struggles in business is trying to engage new customers, and catch them when they need you. Businesses are constantly trying to come up with clever ideas to remain in the potential customer’s mind at all moments so that when you suddenly think “I need a quote for car insurance” that brand is right at the front of your mind.

So, I’ve had a thought. Why can’t we turn this around and have customers advertise to us? (more…)

Taking care of HTML comments in PHP

A little problem came up with some user submitted content on a platform I’m working with.

A form allows users to submit content with tinyMCE. If the content is pasted from MS Word, the source is then littered with HTML conditional comments that can have a detrimental effect on the the page that returns it.

After discovering what was going on, I thought that the best time to capture the offending content is when the text is submitted. Using a regular expression, I can capture the HTML conditionals as well as remove any unnecessary comments:


function clear_html_comments($html)
{
    return preg_replace('/<!--(.|\s)*?-->/', '', $html);
}

That’s it. Just pass in the content from tinyMCE and it should prevent any content being returned that is in HTML comments.

Getting Around the Sync Error: Google Outlook Sync Tool

I’ve been working with a client to migrate their email systems to Google Apps Premier, as most folks’ emails are being kept on their personal computers and there is a good chance of losing a chunk of work amongst other things.

The task for me was to personally help with uploading all of the disparate systems up to Google Mail, Calendar and Docs. We’ll also be moving some wiki content onto Sites over time but the main issue right now is that we need to get those emails up!

The Google Apps Sync for Microsoft Outlook tool is pretty good at getting everything working with Outlook directly, as well as uploading your existing emails.

Set up is straight-forward, but sometimes an error crops up that is commented in the forums and in the known issues page.

I found that the “Sync Errors” folder that is created doesn’t actually get synchronised. The easy fix is to either upload the folder with the Email Uploader tool, or simply create a label with the same name in Google Apps Mail. Once done, sync should continue to work.

rsync and the Hard Link Limitation

I’ve been setting up a new backup regime on a hosted server that I’m helping to maintain.

One of the key issues right now is that it is there isn’t a solid provided backup regime, so I’ve spent the day playing around with different Linux backup solutions trying to get to the bottom of a simple, yet robust way of backing up.

I like rsync, but the problem is that you can’t use it’s hard linking feature over secure shell. As such, incremental backups are a pain.

I was about to give up on it, and work out a convoluted tar process when it occurred to me that the hard links might still be possible.

And to that end, I wrote this script: (more…)