Hey! I'm Michael, a web designer & developer in Los Angeles Washington, DC.

First time here? Take a gander at some of my blog posts, or my Tasty theme for WordPress.

Recent Posts and Asides

Rename all files in a folder with a prefix • unix.stackexchange.com

Earlier this evening I was dealing with a directory of .tif images that all needed to be renamed with the same prefix.

zmv -W '*' 'ARBESKO_*'

This command will take all files in the current directory and give them the prefix of ARBESKO_. So, 452.tif becomes ARBESKO_452.tif which is just what the doctor ordered.

The zmv utility is part of zsh, my preferred shell (as opposed to bash). #

TypeError: PainInTheAss object is not JSON serializable

This drives me absolutely insane. Python is great because it has quite a handful of built-in datatypes that let you do just about anything imaginable. Throw some things into a list, or its immutable sister, tuple. Need a key-value hash-table? Sure, Python has the dict. You can play with a dict in python just like an object in JavaScript. Continue Reading »

Namebench, find the fastest DNS servers for your provider • code.google.com

We just got through transitioning into some new offices here at ZehnerGroup. Unfortunately our new location doesn't have the most amazing selection of internet offerings to choose from, so we're using Clearwire 4G at the moment. It's doing pretty well, but the DNS services are lacking. Namebench helps you find the best DNS service for your current network provider. #

Visual Event 2 • www.sprymedia.co.uk

Sometimes you run into issues where a DOM event has an event hooked to it, but you can't specifically find in your code where that event was bound. This bookmarklet helps by letting you inspect an element and find attached events. Handy! #

How do I backport a sid package to testing or stable? • wooledge.org

Install the Debian source (and the development tools, especially debhelper), and then build the package. Step by step:

add a deb-src line for sid to your sources.list
apt-get update
apt-get build-dep packagename
apt-get -b source packagename

the resulting debs should be in the current directory. Use dpkg -i <debfile> to install! #

What is Symfony2? • fabien.potencier.org

Even though I've moved on to Python, I will always soft spot in my heart for PHP. The one thing that PHP still has going for it is it's ease of deployment. Everyone supports it, and launching it doesn't require any configuration whatsoever. That being said, there are certain instances where using PHP is actually refreshing, so seeing new stuff like this gets me stoked. I like the fact that they don't tout themselves as an MVC framework, but rather a collection of independent modules that end up being an HTTP request/response framework. Cool stuff for real. #

Encoding Email Addresses with PHP & WordPress

TextMate has this nifty feature that automatically encodes an email address in a hex format so that spammers can't easily scrape the addresses from your site. I'm working on a client site right now and wanted to build this component into the site, so that anywhere an email address is mentioned in a post or page it will be automatically converted into the hex encoded version. Continue Reading »

PHP's money_format and locales on Debian

Those of you who know me well know that I'm not a huge fan of PHP. While I don't really enjoy it, I use it on a daily basis for sites that I maintain and develop both personally and at work. Recently a client of ours (a private airline) needed to update some pricing on their site for the first of the month. To make this and future updates easier, I rewrote a bit of the logic behind the pricing system and in-turn, started to store the prices as integers rather than strings. While checking the site this morning to make sure everything updated this weekend, I noticed that while the new prices were there, they weren't being displayed properly! Instead of something like "$2,500" the prices were simply "2500". Clearly there was an issue with money_format not working correctly. Continue Reading »

HTC Incredible vs. Nexus One

I just recently moved from Honolulu back to Los Angeles. My home here in Glendale is nestled in the back of a canyon in the Verdugo Woodlands area. Unfortunately, the neighborhood isn't too friendly to T-Mobile's network. I can't send a text message without holding my Nexus like a hot bowl of soup. One finger on each corner, high above my head, praying to god it finds a network and sends my message. I'm sick and tired of it. Having a girlfriend living in Hawaii means that I can't stand not being able to communicate 24/7. Continue Reading »

Enhancements to HEA++

There are so many ideas that I have for my current Alpha Alpha of HEA++. Here are some of them. For those of you who haven't heard about HEA++, you can read all about it here. There are a lot of features that I would love to add in the near future, so here's a decent roadmap of things that I think would be useful. Continue Reading »