Here’s a function I wrote to get the thumbnail URL for a Blip.tv video when all you have is the embed URL. It can parse the embed URL out of a larger block of text (e.g., a blog post). It doesn’t use their API, which makes it easier to setup, but also means it might […]
Switching to a Dvorak Keyboard
The standard QWERTY keyboard layout was designed for typewriters in the 1800s with the purpose of preventing the type bars from jamming. They achieved this by arranging the keys in such an inefficient pattern that the operator was slowed down to the point where they couldn’t type fast enough to jam the the bars. So why […]
jQuery document.ready() Fires Twice
There’s a bug in jQuery 1.4.3 that causes document.ready() to fire twice if there’s an unhanded exception. You can avoid it by wrapping the code that is throwing the exception inside a try/catch block.
Comprehensive WordPress Multisite Migrations
Warning: This hasn’t been updated since 2011. It should still be somewhat useful, but you’ll likely need to do additional research and testing on changes since then. Migrating multiple standalone installations of WordPress into Multisite can be relatively easy if you don’t need it to be perfect. The Codex has a basic guide and Stephanie […]
Installing Additional Software on Endian Firewall
Endian doesn’t ship with gcc, apt or yum, so it can be kind of confusing at first if you’re trying to figure out how to install some extra packages. It comes with Smart Package Manager, which you can use to install CentOS binary RPMs from http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/ (CentOS 4) or http://mirror.centos.org/centos/5/os/i386/CentOS/ (CentOS 5). Try the version 4 first. […]
Using the Underscore in MySQL Queries
The underscore is a special character in MySQL, and it can be used to match any character in comparison operations. If you’re not aware of this, it can throw you off when trying to search for it inside records.
Backing Up Files and MySQL Databases on Linux Servers
You’d think I’d have this memorized by now, but I always mess up the syntax and have to spend a few minutes digging through man pages or wading through search results to find it.
tar -czf [output-file.tar.gz] [input-directory]/
mysqldump -u [username] -p [database name] > [filename]