Category Archives: Uncategorized

Rails 3 Routes Configuration – Dynamic Segments, Constraints and Scope

I’ve been messing around with Rails for the past few months, and I just got through figuring this out so I thought I’d post this here. Sometimes you want to have a dynamic segment in a route. For example: /:username, to allow your users to have vanity urls. You might use something like this:   [...]

Posted in Uncategorized | 1 Comment

Extending CodeIgniter’s Active Record Class

If you’re here you’ve probably realized by now that CodeIgniter 2.0 doesn’t officially support extending the core Active Record class, which is a bit of a drag. As you may know, CI 2.0 came with a new core/ folder that allows you to simply drop classes to extend the CI core with. For example, to [...]

Posted in Uncategorized | 3 Comments

Dynamically combine and minify your Javascript and CSS files with CodeIgniter

Update 10/27/2011: This method is outdated. I recommend using the very awesome Carabiner for your minification/concatenation needs. If you still want to stick to this method, I would recommend implementing some sort of caching for your minified/concatenated files. Carabiner does this for your automatically, however! ——– As any good UI developer will tell you, one [...]

Posted in Uncategorized | 13 Comments

Twitter Search API, tweet IDs, json_decode, & bigint

Today I realized that my Tweet parsing application was saving a bunch of floating numbers as the status ID. After some investigation I realized that Twitter changed their id parameter in the Search API response to use a bigint . Since our data was returned using JSON, PHP’s native json_decode automatically converts the ID to [...]

Posted in Uncategorized | Leave a comment

I know what I’m going to be for Halloween next year

A Daft Punk original to boot.

Posted in Uncategorized | Leave a comment

A very useful snippet

Ever catch yourself trying to deciper a var_dump() or a print_r() ? Just add the &lt;pre&gt; tag to it and all will make sense. echo ‘<pre>’; print_r($someVar); echo ‘</pre>’; Enjoy!

Posted in Uncategorized | Leave a comment