Posts tagged ‘code’

Breadcrumbs in Rails

by Josh Fraser on June 19, 2010


I've been working a little with Ruby on Rails recently.  One of the things I needed was a good module for handling navigational breadcrumbs.  I googled around a bit, but wasn't able to find anything that fit my needs.  The closest to what I wanted ...

Backwards compatible window.postMessage()

by Josh Fraser on January 15, 2010


Simple cross-domain messaging This blog post explains how to implement a backwards compatible version of window.postMessage() to handle all your cross-domain messaging needs. If you’re in a hurry, you can skip directly to the demo or just grab ...

Splitting names

by Josh Fraser on August 17, 2009


Update 8/18/09: This project has been moved to Google Code. Please visit http://code.google.com/p/php-name-parser/ for the latest version. The quest I'm on a ongoing search to find the best algorithm for splitting a full name into a first name ...

Having fun with Proximity for mac

by Josh Fraser on July 20, 2009


One of the things I love about my mac is how easy it is to hack things to work the way I want.  I'm always amazed by how many easy hooks there are into system settings and native applications. I recently stumbled upon a neat application called Proximity. ...

Queue events that occur before JavaScript is loaded

by Josh Fraser on June 24, 2009


One of the common recommendations for speeding up your website is to put your JavaScript at the bottom of your page instead of including it inside the head tag. The difference this simple placement can have is impressive, especially if you are dealing ...

Reading GET variables with JavaScript

by Josh Fraser on June 10, 2009


One of the things that isn't immediately obvious in JavaScript is how to access GET variables. I've seen lots of different implementations for this around the web, but the majority of them are bulkier than they need to be. Here's my favorite way to ...

How to use variable variables in PHP

by Josh Fraser on May 31, 2009


One of the biggest time-savers in PHP is the ability to use variable variables.  While often intimidating for newcomers to PHP, variable variables are extremely powerful once you get the hang of them. Variable variables are just variables whose names ...

Managing code releases

by Josh Fraser on March 25, 2009


Recently I decided to streamline my code release process. I use subversion for my source control which means I push code live by running svn up on each of our production servers. I'm lazy, so I wanted an easier way to do this all at once. The end ...

Permanent links to profile pictures on twitter

by Josh Fraser on February 27, 2009


Twitter currently does not offer permanent links for their users profile pictures. This means that if you do any caching of twitter profile pictures, you stand a good chance of the image being gone by the time you try to display it. We've been running ...

How to use curl_multi() without blocking

by Josh Fraser on January 26, 2009


Update 9/30/09: This project has been moved to Google Code. Please visit http://code.google.com/p/rolling-curl/ for the latest version. A more efficient implementation of curl_multi() curl_multi is a great way to process multiple HTTP requests in ...