Skip to content

Instantly share code, notes, and snippets.

View rorymcdaniel's full-sized avatar

Rory McDaniel rorymcdaniel

View GitHub Profile
@rorymcdaniel
rorymcdaniel / precommit
Created September 1, 2015 15:29
A git precommit hook that looks for things like console.log, var_dump, etc and prevents the commit if found
#!/usr/bin/env bash
TEXT_DEFAULT="\\033[0;39m"
TEXT_INFO="\\033[1;32m"
TEXT_ERROR="\\033[1;31m"
TEXT_YELLOW="\\033[1;33m"
echo -e "$TEXT_YELLOW""[ >>> PRE-COMMIT START ]""$TEXT_DEFAULT"
FILES_PATTERN='(\..+)?$'
@rorymcdaniel
rorymcdaniel / 0_reuse_code.js
Created July 1, 2014 02:11
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console