Posted by & filed under Personal.

So, yeah, I wrote this book: Amazon: Instant Backbone.js Application Development Packt: Instant Backbone.js Application Development The process took a couple months, despite the relatively short length of the book. You wouldn’t believe how many times the book has to go back and forth between the publisher and the writer! I’ll have to write about… Read more »

Posted by & filed under Uncategorized.

Back in the day, The Oatmeal released their Tumblebeasts free to use for the world! And, after spending enough time on Google trying to find them and coming up with nothing, I figure I might as well make them available here! Download The Oatmeal Tumblebeasts

Posted by & filed under NoSQL, PHP, Redis.

Here’s the code and notes for a presentation I’m giving this Saturday on PHP and Redis: Even if you’re not going to presentation, feel free to check it out and give it a try. Redis is pretty simple to use and quite powerful once you get the hang of it.

Posted by & filed under Linux, Redis.

If you’d like to have the most recent version of Redis installed on your Debian machine, follow along with this guide. Unfortunately, the process of installing it is not as easy as `sudo apt-get install redis`, which you probably already knew since you’re reading this. The current version of Redis, at the time of me writing… Read more »

Posted by & filed under OS X.

Boy does my Homebrew installation like to get messed up. Pretty much every time I do a big `brew update` I have to repair everything. This is what I typically have to do: cd /usr/local sudo chown -R USERNAME /usr/local/.git sudo chown -R USERNAME /usr/local sudo chown -RL mysql:mysql /usr/local/mysql/data git pull git reset –hard… Read more »

Posted by & filed under Linux.

If you’re using my previous method for logging a networks ever-changing public IP to a webserver you control, you can use this simple command to grab the last known IP and SSH into the box that way. ssh USERNAME@`curl -s` The `backticks`, when run in a shell, will execute that command and return the… Read more »

Posted by & filed under PHP.

<?php $raw_header = “http://location/\r\nBadHeader”; # PHP 5.4: $clean_header = explode(“\n”, explode(“\r”, $raw_header)[0])[0]); # PHP 5.3: $no_cr = explode(“\r”, $raw_header); $no_nl = explode(“\n”, $no_cr[0]); $clean_header = $no_nl[0]; unset($no_cr, $no_nl); echo $clean_header;