Skip to content

Instantly share code, notes, and snippets.

View egel's full-sized avatar

Maciej Sypien egel

View GitHub Profile
@egel
egel / pre-push
Last active July 6, 2016 16:49
Git pre-push guardian to prevent push to protected branches.
#!/bin/bash
# General colors
black='\x1B[0;30m'
red='\x1B[0;31m'
green='\x1B[0;32m' # '\e[1;32m' is too bright for white bg.
blue='\x1B[1;34m'
yellow='\x1B[0;33m'
purple='\x1B[1;35m'
cyan='\x1B[0;36m'

Keybase proof

I hereby claim:

  • I am egel on github.
  • I am egel (https://keybase.io/egel) on keybase.
  • I have a public key ASB3Kr8PUznjDEU8aZvR9gsFDFtaxahivFn5vgs8ttHgTQo

To claim this, I am signing this object:

#!/bin/bash
_command=$1
AUTHOR="Maciej Sypień <[email protected]>"
if [ -z "$_command" ]; then
printf "clear|install|uninstall\n"
exit 1
fi
@egel
egel / pre-commit
Last active March 20, 2017 09:48
Block to commit if user's email not match
#!/bin/sh
#
# An example hook script to verify what is about to be committed.
# Called by "git commit" with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message if
# it wants to stop the commit.
#
# To enable this hook, rename this file to "pre-commit".
WHITE_LIST=''
#!/bin/bash
matchbox-keyboard