Skip to content

Instantly share code, notes, and snippets.

View ernscht's full-sized avatar

Ernst Ammann ernscht

  • Heiden, Switzerland
View GitHub Profile
#!/usr/bin/env bash
# MIT © ernscht
# git hook to run commands before `git commit` if specific source files were changed.
# Run `chmod +x pre-commit` to make it executable then put it into `.git/hooks/`.
# stash unstaged changes
#STASH_NAME="pre-commit-$(date +%s)"
#git stash save -q --keep-index $STASH_NAME
@ernscht
ernscht / post-merge
Last active April 17, 2016 18:16 — forked from sindresorhus/post-merge
git hook to run a command after `git pull` if a specified file was changed.
#!/usr/bin/env bash
# MIT © Sindre Sorhus - sindresorhus.com
# forked by ernscht - https://gist.github.com/ernscht/731f9ec710e5b3d01fa3
# git hook to run a command after `git pull` if a specified file was changed
# Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
check_run() {
@ernscht
ernscht / dabblet.css
Created February 7, 2012 12:36
Stacking Level 2
/**
* Stacking Level 2
*/
/* nation as flag */
.nation {
width: 12em; height: 12em;
background: #c60001;