Recent Posts

Slim Framework, Route Groups, and Parameters

Yesterday, I was writing a new sub-endpoint for an API based in Slim Framework. For this API, the routes are kept in separate files for organizational purposes, but also because route groups didn't exist at the time; so I thought I'd give them a shot.


Zend Db and non-escaped strings

This is for my own edification in the future, but if you're looking for a non-escaped string as a parameter to a query, it's not Zend\DB\Raw that you're looking for, as that doesn't exist. What you're looking for is new \Zend\Db\Sql\Expression() to handle those raw strings.


How to fix strange characters in MySQL

I admit, I borrowed this from How to fix strange characters in MySQL database – Vinh Pham. But I also added a few more that were missing.


Make iPhoto show pictures with unnamed faces

I've got about 11k photos, and lots of them have faces of things like wax figures, or people I don't know in the background. I don't really care about those "people", and so I need to remove them.


2013: In Review

2013 was a good year for me: we bought a new house and I got a promotion. 2013 was a good year for this blog as well: 12,000 total page views, 4,300 unique visitors, 5,200 visits, 21 posts, and two new authors (who'll begin posting in 2014).


Finding deleted files that are still opened by a process

Recently my server ran out of space, but my checks (via du) reported that only about 60GB was actually being used. That's because if a process has a file open that is then deleted, the space is still claimed, but the file doesn't appear.


Deleting local git branches with a missing remote branch

I have about 100 git repositories at $job, and of those, about 90% of them have branches that were created locally that were set as tracking branches, but never pushed to a remote. It makes looking at the output of git branch very annoying, so I wrote the script below to clean up those branches.