Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# This hook is called with the following parameters:
#
# $1 -- Name of the remote to which the push is being done
# $2 -- URL to which the push is being done
URL="$2"
if [[ ! $URL = *"git@github.com"* ]]; then
exit 0

Keybase proof

I hereby claim:

  • I am leesio on github.
  • I am jameslees (https://keybase.io/jameslees) on keybase.
  • I have a public key whose fingerprint is 0AF6 63C9 89ED 874E 7804 8481 5AFF C7D7 5647 386F

To claim this, I am signing this object:

@leesio
leesio / .mongorc.js
Created June 1, 2016 12:29 — forked from yanatan16/.mongorc.js
My .mongorc.js file
(function () {
rcversion = '1.0';
load('underscore.min.js')
// NOTES
// Basics, wrap the whole thing in a function
// Set a version for sanity's sake
// Load underscore, a must in any javascript environment
@leesio
leesio / post-merge
Created March 7, 2016 12:01 — forked from GianlucaGuarini/post-merge
Git hook that gets triggered after any 'git pull' whenever one of the files specified has changed. Useful to update any web application dependency using bower npm or composer
#/usr/bin/env bash
# MIT © Sindre Sorhus - sindresorhus.com
# forked by Gianluca Guarini
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
check_run() {
echo "$changed_files" | grep -E --quiet "$1" && eval "$2"
}
@leesio
leesio / keybase.md
Last active August 29, 2015 14:25
keybase.md

Keybase proof

I hereby claim:

  • I am jamesmlees on github.
  • I am jameslees (https://keybase.io/jameslees) on keybase.
  • I have a public key whose fingerprint is 0AF6 63C9 89ED 874E 7804 8481 5AFF C7D7 5647 386F

To claim this, I am signing this object: