Skip to content

Instantly share code, notes, and snippets.

View textarcana's full-sized avatar

Noah Sussman textarcana

View GitHub Profile
@textarcana
textarcana / pre-push.sh
Last active January 10, 2016 11:19 — forked from ScotterC/pre-push.sh
Git Hook PrePush protection for force pushing
#!/bin/sh
# Called by "git push" after it has checked the remote status,
# but before anything has been pushed.
#
# If this script exits with a non-zero status nothing will be pushed.
#
# Steps to install, from the root directory of your repo...
# 1. git config --global init.templatedir '~/.git-templates'
# 2. mkdir -p ~/.git-templates/hooks
@textarcana
textarcana / pre-commit
Created September 2, 2015 18:41 — forked from dy-dx/pre-commit
Pre-commit hook that prevents debugging code and merge artifacts from being committed.
#!/bin/bash
# Pre-commit hook that prevents debugging code and merge artifacts from being committed.
FILES_PATTERN='\.(php|ctp|ctpm|css|rb|erb|haml|js|coffee)(\..+)?$'
FORBIDDEN=( "binding\.pry" "save_and_open_page" "debugger" "it\.only" "describe\.only" ">>>>>>" "<<<<<<" "======" )
# the exit code from `grep -E $FILES_PATTERN` gets swallowed unless the pipefail option is set
set -o pipefail
@textarcana
textarcana / 1-1000.txt
Created August 28, 2016 20:01 — forked from deekayen/1-1000.txt
1,000 most common US English words
the
of
to
and
a
in
is
it
you
that