pre-commit Git hook for JSONlinting

Posted by & filed under Open-source.

Place it in .git/hooks in your git source controlled directory #!/bin/sh git diff-index -z –cached HEAD –name-only –diff-filter=ACMRTUXB | xargs -0 -t -L1 /usr/local/bin/jsonlint -c; if [ “$?” != “0” ]; then echo “\nOne or more JSON file didn’t pass jsonlint’ing.”; echo “Fix them before committing. If it is not possible to fix them all… Read more »

Opening external URLs in Safari with PhoneGap applications on iOS

Posted by & filed under iPhone, Open-source, Web Development.

After much trial & error, I figured out how to do this on iOS 6, PhoneGap/Cordova 2.5.0 and jQuery 1.9.1 OpenAllWhitelistURLsInWebView doesn’t matter. Setting it to true, false or omitting it doesn’t seem to have any bearing on the result. I set a target of _system on the href, like so: <a target=”_system” href=”″> I… Read more »

Exporting DynamoDB data to CSV

Posted by & filed under Amazon Web Services, node.js, Open-source.

Another itch I needed to scratch. I needed the basic ability to export data from (an Amazon Web Services noSQL store:) DynamoDB to CSV. I first built a solution for my specific issue (which included some transformations) and then decided it’d be worth building something more generic for people. While you can do this using… Read more »

AWS Cloudwatch to Graphite (cloudwatch2graphite)

Posted by & filed under Amazon Web Services, Linux, Mac OS X, node.js, Open-source.

Like many, we gather a lot of our system information (business and technology) into Graphite. One thing we were missing was some of the AWS services metrics that you’d typically use Cloudwatch for. So I wrote a little utility in node.js that does exactly that. You’d typically run this in a cron and throw the… Read more »

Getting an Oauth2 token for GitHub, command line

Posted by & filed under Open-source, Web Development.

If you’re looking to use the GitHub API outside a web application, you’ll need to generate an OAuth 2 token. GitHub provides a good way to add a non web app to your account. It’s done with a curl, command-line: curl \ –user “myuser” \ –data ‘{“scopes”:[“user”],”note”:”GitHub Stars to Bookmarks”}’ which will ask you… Read more »

Showing Console console.log output and Javascript errors with PhoneGap on Android/Eclipse

Posted by & filed under Android, Mobile, Open-source, Web Development.

While one would expect console.log() messages to show up in the Eclipse console tab (which shows the Android emulator being launched), they actually show up in the LogCat tab, a mechanism for collecting and viewing system debug output on Android. However the LogCat tab/windows is not shown by default on Eclipse. In order to show… Read more »

8 days with a Motorola Xoom

Posted by & filed under Android, Mobile, Open-source.

After reading my friend Steven O’Grady excellent Xoom review and selling my iPad (1) in anticipation of the iPad 2 announcement, I decided to pick up a Motorola Xoom to test it and possibly keep instead of buying the newer iPad. I was told at Best Buy that their new return policy was 14 days… Read more »

Post Nexus One: what my next Android phone will be

Posted by & filed under Android, Mobile, Open-source, Personal.

I’ve been very happy with the Nexus One. Since it’s the official Google Android developer phone, it usually gets the latest updates first, is easily rootable and comes with the bare Google Android experience untainted by the mobile phone companies proprietary bloatware and restrictions (wifi tethering, bluetooth keyboards, …). I’ve had it for a year… Read more »

My WordPress checklist

Posted by & filed under Open-source, Web Development, Web Site.

A few year ago, I realized that beyond blogging, WordPress is an exceptional CMS, I started sites with WordPress. Dave Sutton’s Trawler Explorer, REI Paradise, Privateer Divers, Juergensen Marine, Danny’O Mom and Pop art shopThinking Diver and the latest The Cloud Saga are all built using WordPress. After I built a few of those, I… Read more »