Skip navigation

Category Archives: /dev/blog/1337/

inBuckets()One of the biggest nightmares I’ve had to deal with is unpredictable cache keys. Inevitably, someone codes a function that uses its parameters in the key name. In many cases, this is fine. However, when you need to deal with paginated or grouped data in different sizes, things can get messy. To that end, I lean on PHP’s range() function.

Setting up the input for range() and making the output usable is something I’ve ended up doing over and over again, so I’m finally taking an implementation sharing it to save everyone the labor of dealing with it (including myself). And thus, I submit inBuckets() for your perusal (hosted at GitHub – sadly wordpress.com won’t let us embed Gists). The syntax is in the doc block and there’s commented out sample code at the end to get you started. Enjoy.

Here’s an Apache one-liner I often find myself using. It will list all of the server names and alises that are contained in the active Apache config files on a machine. I’ll go into the parts of the command and how to modify it to suit your needs. This assumes a bash-like shell (with grep, sed, sort, tr and a for loop), root (or permission to run the httpd binary directly) and if you wish to modify the examples, a little command-fu.

Read More »

Subversion LogoLots of people use Subversion and WebDAV (i.e. “https://url.to.repo/trunk/”) to get to a Subversion server. It’s usually done so the checkout is portable to Windows machines running Tortoise. I used to be one of these people myself. Sadly, WebDAV is slow compared to checkouts using svn+ssh – especially if you’re over a VPN or overseas. Read More »

Addy Osmani (web|twitter) has a detailed preview of the new version of jQuery. Of course, jQuery Mobile is getting ramped up, but there are some killer new features as well. The ones that particularly interested me were delaying DOM ready (!) and better Flash object support. The jQuery development process is also getting revised some with things like bug and feature voting.

You can see the original post at http://addyosmani.com/futureofjquery2010/