Like a lot of people, I ditched my desktop in 2007 and moved to a laptop as my main computer. I take my Macbook Pro to work everyday and it’s also my personal computer at home.
To make life simpler I have an almost identical network set up at home as we do in the office, using the same DHCP range and gateway address (our dev server is also our gateway in the office). So the development server I SSH into at work has the same IP as my home linux box. At work we have internal DNS set up, I’m a little more lazy at home and just refer to my linux box by IP.
Read the rest of this entry »
Yesterday I finally got around to removing my flakey superdrive from my Macbook Pro and replaced it with an optical bay hard disk (OBHD) from NewModeUS. This meant I was able to add another 320GB drive where my superdrive once lived (much needed as I was at 92% disk usage on my system drive). I also have an Intel X25-M 80GB to install but I’ll save that for when I have the time.
Read the rest of this entry »
As of Javascript 1.6 indexOf() is a method available for use with Arrays. However, there’s one subtle difference when operating on a String and an Array, both are case sensitive, Array.indexOf() is type sensitive. This is documented but for those of you who’ve not bothered with the documentation, and it’s not working as expected, here’s a heads up on a subtle gotcha …
Read the rest of this entry »
I’m surprised I’ve not run into this before but Javascript has two sub string methods.
[String].substr(start, length);
[String].substring(indexA, indexB);
To clarify by example:
var name = "Greg's Blog";
alert(name.substr(7, 4)); // Blog
alert(name.substring(7, 11)); // Blog
Minor but caught me out this afternoon.
Well that was easier than I expected, having not upgraded my blog in years, I figured it was long overdue and am lucky not to have been defaced via security vulnerabilities. Moving from WordPress 2.0.2 to 2.8.1 was a simple backup and upload of the latest source files. Hurrah!
Update April, 2010: I’m happy to report this pain is avoided with the latest (10.26.2) MP620 CUPS drivers from Canon when installing this printer on Snow Leopard. After installing the drivers, then adding a new printer, you have to wait a few minutes for SL to detect the printer before it displays it in the list.
This might seem like dumb thing to blog about but I spent an hour or more trying to get this to work. Partly due to my own stubbornness, I resent using driver installation CDs. The driver on them is typically out of date (certainly for graphics cards), and they’re loaded with bloatware crap you don’t need to operate your device / peripheral. Manufacturers love to re-invent the wheel, providing a utility for a service that already exists within the operating system.
Read the rest of this entry »