August 6, 2011 | Dogs, Life | No comments

The boys got their first taste of the beach at Fort Funston today. Literally a taste. They made themselves sick drinking the sea water. Hopefully they learned their lesson.
Yeah, probably not.
July 11, 2011 | PHP Scripting, TextMate, WordPress | 1 comment
So, WordPress 3.2 has been out for a little while now and I’ve just gotten around to updating the bundle. My apologies, I’ve just been super swamped with a new job in a new city. But that’s some whining for another post.
After much fiddling, the updated WordPress TextMate Bundle is here and it has been updated with a much better function definition display. I’ve ditched the old function scraper that was an abomination of grep & regex matches and replaced it with doxygen and some ruby abomination to provide much more information about the function or method being inspected.

I’m pretty sure there’s a lingering issue with the parsing and display of special characters in the doxygen output (which I blame squarely on strange handling by doxygen) that I haven’t handled yet. There may be HTML Entities missing from the documentation here and there.
Also improved is that the function definition search is contextually sensitive. It’ll only look for methods when in object scope (ie: $object->method();) and only look for functions when in regular php scope (ie: function();). There’s also a prompt to select the method that you’re actually after when multiple matches are found.
So, as always there’s something that can be improved upon with the bundle, but its moving forward and getting better with each revision. I guess that’s something, right? RIGHT?
So, fire up GetBundles or head on over to the WordPress TextMate Bundle’s Github Page to update your bundle!
May 24, 2011 | *nix, Computers | No comments
I’ve posted before on converting man files to PDF for easier reading and forgot to post this update. The code is much terser, reminds you when you’ve invoked it without a parameter, and doesn’t leave turds that it has to clean up.
-
- mpg=$1
- if [ ! $mpg ]; then
- echo "Enter a man page to convert: ";
- read mpg;
- fi
- if [ ! $mpg ]; then
- exit;
- fi
- man -t $mpg | open -f -a /Applications/Preview.app;
- exit;
Enjoy!
May 22, 2011 | Photography | No comments
Yes, I’m one of those dorks. When I get to sit by the window on the plane I’m glued to it and shooting out of it as much as I can. And its even easier now with the iPhone 4s camera being so nice.

May 5, 2011 | Computers | No comments
A while back I was working on a project that involved spooling up and shutting down a lot of Amazon EC2 instances while testing and I was constantly running in to an issue where my ~/.ssh/known_hosts file was out of sync with the server that I was connecting to.
Despite how simple it is, I could never remember the sed command to remove a line from a file. To help get around having to repeatedly manage my known_hosts file and/or look up the sed command I wrote a little function to remove lines from files using sed. Hopefully someone else out there finds this useful.
- rmline() {
- if ! [ "$#" = "2" ]; then
- echo 'Invalid paramter count';
- echo 'Usage: rmline line-num filename'
- return;
- fi
-
- sed -i 0 "$1d" $2
- }
So, stick that in your .profile and smoke it enjoy!