OSRM / Docker on an M1 MacBook

If you’re trying to setup OSRM with Docker on a MacBook you may run into trouble when extracting/processing map data. The script fails silently so isn’t much help. Here’s the tutorial I’ve been following: https://medium.com/@anjulapaulus_84798/osrm-lets-run-it-on-docker-a437b6bf2f90 Specifically this part: It turns … Continue reading

Getting into Angular and React

This is something I’ve been meaning to do for some time. Some stuff at work has required me to fixed bugs in an Angular project, so I’m researching and getting into that. At the same time, personal projects seem to … Continue reading

Correct WordPress File/Folder Permissions

Seems to be right to me, for most of the time anyway: Thanks to Manuel: https://stackoverflow.com/a/23755604/12163343

Correctly POSTing boolean values in jQuery

When I’m building Javascript/jQuery based webapps, my go-to method of performing AJAX requests is via jQuery .post() using JSON. My code normally looks something like this… var postUrl = ‘/someurl.php’; var postData = {‘id’: 123, ‘data’: ‘xyz’, ‘bool’: true}; // … Continue reading

Learning LESS CSS

Been getting into LESS CSS recently.

Remove the WordPress Admin Bar in your theme

I don’t know who decided to include the admin bar by default in your theme/front end when logged in to WordPress, but I find it really irritating when laying out a new theme. I just want to see how my … Continue reading

Set a custom home screen title for your website on iOS devices

Here’s a neat little trick I’ve just learned. I’ve been setting up all the different icon sizes on mtvan.com for iPhone and iPad (including retina displays) for when you ‘Add to Home Screen’ and got the icons all working nicely. … Continue reading

Time Zone Conversion Using PHP DateTime Class

Following on from my post last month about problems with PEAR daylight saving, here’s a quick example of using the PHP DateTime Class which was introduced recently (PHP 5.2). Convert from UTC to Europe/London local time: $time_object = new DateTime(‘2011-04-19 … Continue reading

PEAR Date Daylight Saving Bugs

The clocks went forward in the UK last night and fortunately I was working on a site today which involved manipulating dates and times between timezones so I immediately noticed a problem in PEAR Date that I have been using … Continue reading

UK dates and strtotime

In PHP, strtotime cannot parse the UK date format (i.e. 30/02/2011) as there’s no 30th month. Here’s a quick fix I came across that seems to work for me (so far)… Just replace the “/” with a “-” before parsing … Continue reading