Skip to content

Instantly share code, notes, and snippets.

@sp-jordi-forns
sp-jordi-forns / select-recent-git-branch.js
Last active January 21, 2016 08:56
Switch to a recently modified branch through a selection menu
#!/usr/bin/env node
String.prototype.format = function() {
var formatted = this;
for (var i = 0; i < arguments.length; i++) {
var regexp = new RegExp('\\{'+i+'\\}', 'gi');
formatted = formatted.replace(regexp, arguments[i]);
}
return formatted;
};
#!/usr/bin/env bash
#
# This hook prevents you from committing any file containing debug code.
# e.g. dsm(), dpm(), alert() and console.log(). There is also a PHP LINT check
# to ensure your syntax is okay.
#
# To force a commit that breaks the below rules (e.g. when debug code is 100%
# required you can add in another parameter to `git commit` namely `--no-verify`.
#
# Helpful git aliases for these are: