Skip to content

Instantly share code, notes, and snippets.

View gmaccarone's full-sized avatar

Greg Maccarone gmaccarone

View GitHub Profile

Keybase proof

I hereby claim:

  • I am gmaccarone on github.
  • I am gmacisme (https://keybase.io/gmacisme) on keybase.
  • I have a public key ASB7xeoEJRnuVRLycWyQOeeE5hj4vS01H_7RBE654dD_dgo

To claim this, I am signing this object:

@gmaccarone
gmaccarone / pre-receive
Created June 20, 2013 22:11
commit size pre-receive hook
#!/bin/sh
GITCMD="/usr/local/bin/git"
NULLSHA="0000000000000000000000000000000000000000"
MAXSIZE="5242880" # 5MB limit on file size
EXIT=0
# Read stdin for ref information
while read oldref newref refname; do
# Skip branch deletions