Motivated by a number of reasons, I’ve begun to move everything from my old VPS to what has been my development server until recently. It’s been a complete digital spring-clean of all the old sites I used to maintain and hopefully the result should be an improvement. Here’s a list of the main changes: Good [...]
Read MoreLeeds Festival 2010
Just recovered, so thought I’d post some ramblings for this year. Various high points were: Colin; gin jam; Jacob and Alf shopping for nothing but sweets; the wind and its army of shopping bags; back on form with brie and crackers; staying at the main stage missing plenty of good bands; acting like we were [...]
Read MoreWord Clock v2
I’ve seen a few nice-looking representations of clocks around, but when I saw Gumuz’s word clock I though I could make some improvements to it. Here’s a couple of the changes: Rewrote using MooTools (only because I know it better, I’m currently developing in it, and it gave me a chance to play with Google’s [...]
Read MoreMootools Hash.setFromPath
MooTools More implements a getFromPath method in Hash.Extras, but doesn’t provide a corresponding setter. Here’s an implementation: Hash.implement({ setFromPath: function(path, value) { var source = this; var prop = ”; path.replace(/[([^]]+)]|.([^.[]+)|[^[.]+/g, function(match) { if (!source) return; prop = arguments[2] || arguments[1] || arguments[0]; if (!(prop in source)) source[prop] = {}; lastSource = source; [...]
Read MoreMLIA
Today, after reading over 3000 posts on FML over the the past 6 months, I realised that MLIA is actually more enjoyable than schadenfreude. MLIG is too boring, though. MLIA
Read MoreSpacing out CamelCase in PHP
Here’s a nifty function to put spaces in your CamelCased words: function spacify($camel, $glue = ‘ ‘) { return $camel[0] . substr(implode($glue, array_map(’implode’, array_chunk(preg_split(’/([A-Z])/’, ucfirst($camel), -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE), 2))), 1); } echo spacify(’CamelCaseWords’); // ‘Camel Case Words’ I added in the $glue parameter to be even more nifty, but a bit of thinking [...]
Read More2B or not 2B
…that is the question. The answer? FF.
Read MorePaying the Price for Bad Grammar
This is why we need Grammar Nazis: Today, I was flirting via text with a coworker. Things started getting heated, and I wanted to send her a sexy picture. I asked if she had any suggestions. She said, “Your nuts!” She meant, “YOU’RE nuts.” I sent her a photo of my junk. I offended a [...]
Read MoreThings I Learnt Today
That Ben “Yahtzee” Croshaw is a goon; that his early stuff is, if anything, funnier than his paid stuff for The Escapist; that I there will always be something on the Internet that I haven’t seen, and that someone will think I have been living under a rock to have missed it.
Read MoreGet a Grid for Transparent Images in Firefox
Here’s a useful bit of Firefox hackery for you all. It puts a checkerboard (or chequerboard, for you elitists) image as the background for your transparent images. It works for any image when viewed directly in Firefox, by checking for a HTML page containing a single img tag. If you reproduce this structure manually, then [...]
Read More