View logging.js
'use strict';
var util = require('util'),
winston = require('winston'),
logger = new winston.Logger(),
production = (process.env.NODE_ENV || '').toLowerCase() === 'production';
module.exports = {
middleware: function(req, res, next){
console.info(req.method, req.url, res.statusCode);
View mustache.js
/**
* RequireJS mustache plugin
*
* usage:
* require(['ModuleA', 'mustache!myTemplate'], function (ModuleA, myTemplate) {
* var a = new ModuleA();
* var html = myTemplate({foo: 'bar'});
*
* $(a.el).html(html);
* });
View pr
#!/usr/bin/env bash
# GitHub "Open Pull Request" script
#
# Add somewhere in your path, then opening a PR is as easy as typing `pr` while you're
# on the branch you want to open a Pull Request for
#
# NOTES:
# - If working from a fork, name your fork's remote "origin" and the main repo "upstream"
# - `pr <branch_name>` will open a PR against the branch you give - rather than "master".
View gist:7889481
# Checks out a PR to a pr/<number> local branch
# Usage: git pr <number> [<upstream>]
git config --global alias.pr '!git fetch -fu ${2:-upstream} refs/pull/$1/head:pr/$1 && git checkout pr/$1 && :'
# Deletes pr/<number> branches
# Usage: git pr-clean
git config --global alias.pr-clean '!git for-each-ref refs/heads/pr/* --format='"'"'%(refname)'"'"' | while read ref ; do branch=${ref#refs/heads/} ; git branch -D $branch ; done'
View keybase.md

Keybase proof

I hereby claim:

  • I am spmason on github.
  • I am spmason (https://keybase.io/spmason) on keybase.
  • I have a public key ASAceBYevAn4wzt1xOUf4yh78gRqksgRkZl5ZdGwl1Qgugo

To claim this, I am signing this object: