Managing Puppet modules on Vagrant with Librarian-Puppet

When it comes to source code control I’m a purist: I avoid storing any derived files (ex. generated CSS) or third-party code.  So when I started using PuPHPet to generate Vagrant and Puppet configurations, I was dismayed by the gigantic /puphpet/puppet/modules  directory.  3,000 files totaling 5 MB?!  There must be a better way.

Continue reading

Microsoft Access is confused

The other day while working on a legacy Microsoft Access database I was reminded of how bizarre Access can be. When I ran the following query:

I received a peculiar error:

Microsoft Access
The SQL statement could not be executed because it contains ambiguous outer joins. To force one of the joins to be performed first, create a separate query that performs the first join and then include that query in your SQL statement.

For a query with no outer joins, this was terribly unhelpful.
Continue reading

KnockoutJS custom binding for Quicksand

This plugin has been moved into GitHub. And thanks to some updates to Quicksand, it now works with the latest versions of jQuery, Quicksand, and KnockoutJS.

Lately I’ve been experimenting with KnockoutJS, a JavaScript framework for streamlining client-side data and UI updates. I’ve found it wonderfully easy to implement Knockout’s out-of-box functionality and obsolete tons of my custom code. This conversion was helped by Knockout’s thorough documentation and numerous working examples. But I soon had the desire to integrate Knockout with Quicksand, a jQuery plugin for animating list sorts and filters. This quickly proved difficult, probably because I’m still new to Knockout, but with help from the Knockout forums I eventually created a custom binding to apply Quicksand animations to a Knockout observableArray. No one else has published such a binding so I’m sharing mine for others’ benefit. But beware that it may not handle every circumstance you throw at it.
Continue reading

Relative paths in PHP INI

I’ve always preferred to use relative file paths in my PHP INI, but ran into problems when running PHP from different directories. For example, a directive like error_log = "../logs/php_errors.log" will resolve to different paths when invoked by /public/index.php (e.g. Zend Framework) and /cli-config.php (e.g. Doctrine CLI). Some INI directives can be set at runtime by our application (see PHP_INI_ALL), but many cannot. I finally found the solution with environment variables.
Continue reading