Making Campfire Work for Me (and More Like IRC)

One of the companies I work with has decided to use the 37signals line of products for internal project management and communication (which I think is great BTW). This means that I sit in a Campfire chat room for working hours of my day, along with a handful of other developers. I started to run into a problem, though, when I didn’t need to be talking with others.

Negative Word Matching with Regular Expressions

Today on the #codeigniter IRC channel someone asked about how to match a string that didn’t start with a specific word using a regex. I quickly threw out that, off the top of my head, /^(word){0}/ should work. Well, surprisingly, it didn’t. Turns out negatively matching words with regular expressions is a little more difficult. After a little research I came up with a working solution: /^(?!word).*/ This post by Jeff Atwood helped: Excluding matches with Regular Expressions

SparkStats Widget Patch

Luc Betheder wrote a handy little widget for Sean McBride’s SparkStats plugin, which I recently started to use. I noticed, though, that whenever I made changes to my widgets the custom title I set for the Sparks plugin would get wiped out. So I fixed the problem in the plugin and thought I’d send the patch to Luc. Turns out, I can’t get in touch with him. You have to be registered on his blog to comment, but he has registrations turned off. Also, his email address was nowhere to be found. Hmm…slightly frustrating. I’m not giving up though, so […]

Javascript For-in Loops

Note to self: do not use for-in loops to iterate over an array. Javascript frameworks will add methods and properties to the array object which will then be looped through and summarily break code.