Installing the debug version of Adobe Flash in Linux

Debugging and viewing trace outputs from Adobe Flash can be tricky. I look at it installing the Adobe Flash debugger in this post, and provide some ways of monitoring the output generated by this debugger.

Continue Reading

Using a non-breaking space in UTF-8 documents

I’m pedantic when it comes to displaying nested items in a dropdown. I like to ensure that sub-items are suitably indented. My preference is to do this using spaces only. However, the problem in HTML is that multiple spaces are considered as one. Which blows this out of the water. Why not just use a [...]

Continue Reading

Why I *still* won’t host in South Africa

Why I *still* won’t host in South Africa

I would much rather host with a hosting company in South Africa.
Recently, I did some research with a view to move away from my current US-based hosting provider (A Small Orange) in favour of a South African-based provider.
The comparisons only made me realise how little I pay for what I get, and what great value for money I’m getting!

Continue Reading

Static pages in CakePHP

Generating static pages in CakePHP, without having “/pages/pagename” in your URL has always been a tediously manual affair. However, there is a way to automagically generate the routes for these pages. I’ll show you how in this post.

Continue Reading

Retrieving the current script’s directory in bash

When writing bash scripts to run on Linux, it’s often useful to perform operations relative to the executing script’s current directory. But how do you get the absolute path to this directory? I have a useful little script that will get the current working path for you.

Continue Reading

PHP memory management for variables

I just stumbled across a super useful blog post on the internals for PHP’s memory management; and explains the management process quite well. It’s an old article (from 2008), and I’m not too sure how much the memory management has changed, but it still provides some good principles. Think twice before passing that variable by [...]

Continue Reading

Easy way to generate CakePHP HABTM joins for use in pagination.

Most CakePHP developers have come across the pagination of HABTM relationships, and trying to get those relationships to persist through the pagination.

In this post, I’ve managed to wrap a solution to this problem into a single, easy-to-use method that will hopefully helpful other developers in a similar situation to me.

Continue Reading

Calculating the distance between two GPS points in MySQL

There have been many tutorials floating around the ‘net for a while, detailing how to calculate the distance between an entry in your database, and a set of arbitrary GPS points. Not many of these tutorials will allow you to find the distance between two random points you might have.

Continue Reading

You want funky disco? I give you funky disco!

I came across a great bit of Javascript that turns a web page into a disco. I thought I’d package it as a bookmarklet, so you can try it out on any site you come across (it seems to work much better in Chrome than it does in Firefox). Warning: If you are epileptic, it [...]

Continue Reading

CakePHP 1.3 – An internal error has occurred.

When you see the following problem on cake: An Internal Error Has Occurred Error: An Internal Error Has Occurred. This is CakePHP’s new way of telling you something went wrong. You should switch on debugging in app/config/core.php Change it from: Configure::write(’debug’, 0); to: Configure::write(’debug’, 2); If you don’t want to switch debugging on, check your [...]

Continue Reading