Introducing Zit, an object-oriented dependency injection container

Posted on Feb 2nd, 2012 by Chris M.

I’ll admit right now that I’m fairly new to the world of dependency injection containers.  I usually do my dependency injection “manually” and have always thought that there must be a better way.

Then I came across Pimple, which is a wonderfully simple solution to the problem.  The only thing about it is that I hate its array-oriented interface.  Something about $container['session_storage'] rubs me the wrong way.  So I decided to implement Pimple in a more object-oriented way, and what I came up with was Zit.

Continue reading “Introducing Zit, an object-oriented dependency injection container” »

Posted in Misc | 2 Comments

Steve Jobs went to Cupertino, and all I got were these lousy revolutions…

Posted on Dec 28th, 2011 by Chris M.

I came up with a great tee shirt idea.  I’m going to print a few.  You can buy one if you want.

Link to this post!
Posted in Misc | Leave a comment

ExtendBetter Beta (a better WordPress plugin search)

Posted on Aug 20th, 2011 by Chris M.

After fighting with the plugin directory for years, I finally decided to do something about my frustrations. I was sick and tired of poor search results, and I found it impossible to sort those results in any meaningful way.  It’s still in a very early beta stage, but I’d love some feedback and thoughts on how I can improve it.  Take a look:

Link to this post!
Posted in Wordpress | 1 Comment

30 Days with Occam’s Protocol

Posted on Mar 31st, 2011 by Chris M.

Over the last couple of years I’ve experimented with a number of different forms of exercise (mostly running and weight training). For the month of April, I will be testing Occam’s Protocol, a high intensity, low volume weight training approach outlined in Tim Ferriss’ book The 4-Hour Body. I really enjoyed Ferriss’ The 4-Hour Workweek, but have thus far been pretty disappointed by his newest book. I was about to give up on it entirely, but a little research has suggested that there may be something to Occam’s Protocol, so I’ve decided to give it a shot for 30 days and document my progress.  I’ve set up a separate blog for this so that my daily updates don’t overflow this blog.  If you’re interested, check it out.

Update: I tried Occam’s Protocol for 10 days with no/negative results (mild fat gain/muscle loss, which could be attributed to measurement variability).  I’ve decided to remove the blog.


Link to this post!
Posted in Fitness | 4 Comments

Set OmniFocus As Your Homepage

Posted on Mar 4th, 2011 by Chris M.

I’ve found that OmniFocus is by far my favorite task list manager, but one thing I always wished it could do was show me my lists in my browser (which I spend a lot more time in than in OmniFocus).  I’ve never been much of an AppleScript aficionado, but today I sat down and figured out a way to combine Firefox, OmniScript, the crontab and AppleScript in a way that gets me a nice list of my tasks each time I open a new tab.  Here’s how I did it:

First, create a new AppleScript:

tell application "OmniFocus"
set homepageFile to ((path to documents folder as rich text) & "OmniFocus.html")
tell default document
save in homepageFile as "HTML"
end tell
end tell

That will export your OmniFocus document as HTML to ~/Documents/OmniFocus.html (you can tweak the homepageFile variable to change the location).

Next, we want to edit the crontab.  I used CronniX (a decent cron GUI for OS X) to export my OmniFocus document every hour:

0 * * * * /usr/bin/osascript "/Users/yourname/Documents/OmniFocus Exporter.scpt"

Google “crontab tutorial” to learn how to tweak when it runs.

Finally, I set my home page in Firefox to ~/Documents/OmniFocus.html and installed the extension New Tab Homepage so that each time a open a new tab, my homepage loads.  Now whenever I open a new tab I’m presented a nice list of all my tasks.

Link to this post!
Posted in Getting Things Done, OS X | 2 Comments

Using Modulo Operations for Even-Enough Distribution

Posted on Oct 22nd, 2010 by Chris M.

If you don’t have to deal with large groups of data, this post is not for you.  But if you do, and aren’t familiar with the modulo operator, read on.

Continue reading “Using Modulo Operations for Even-Enough Distribution” »

Posted in Misc | 2 Comments

Top WordPress Actions/Filters

Posted on Sep 20th, 2010 by Chris M.

Today I downloaded just about every WordPress plugin that exists (or the top 8,000+, at least) and parsed out the actions and filters that each plugin hooks into.  I’m going to be looking at that data to help determine the key places that a CMS needs to be flexible.  But until I have time to play with the data, I thought I’d post the top WordPress hooks, taken from 8,240 of the most popular plugins hosted on

It makes sense that initialization, filtering the page content, and adding administrative features are at the top of the list.  It’ll be more interesting to see whats a little further down.  I’ll post more as I have time to make sense of the data.

Link to this post!
Posted in Web Development | 3 Comments

Zend Debugger Safari Toolbar

Posted on Jul 1st, 2010 by Chris M.

Update: It turns out Safari is more problematic than Firefox, so I’ve switched back.  I have no plans to finish this project.  Feel free to fork it on GitHub.

When Safari 5 came out I decided to make the switch.  The new Safari developer tools rival Firebug, Safari now supports extensions, and Firefox has been causing all sorts of problems for me lately (20-second freezes, choppy video, etc).  There were three things that I knew I couldn’t live without…

Continue reading “Zend Debugger Safari Toolbar” »

Posted in Web Development | Tagged debug, zend, zend studio | 5 Comments

Optimize Legibility in Safari 5

Posted on Jun 29th, 2010 by Chris M.

Just saw this (via Daring Fireball):

Cross-browser kerning-pairs & ligatures

And thought, “there’s gotta be an extension for that.”  Well, looks like there isn’t… so I made one:

Optimize Legibility [4.64 kB]


Link to this post!
Posted in Misc | Tagged extensions, safari | 21 Comments

Safari Toolbar CSS

Posted on Jun 9th, 2010 by Chris M.

By default, Safari extension toolbars are just plain old HTML. That means that your toolbar is going to look a lot like:

Wouldn’t it be nice if instead it looked like:

I’ve developed a (very) simple CSS file that styles links (and <button> elements) to look like native Safari toolbar items.  Download it now.

Link to this post!
Posted in Misc | 4 Comments