Skip to content

Instantly share code, notes, and snippets.

@mjackson
mjackson / multiple-git-hooks.sh
Created February 6, 2018 00:58
Run multiple scripts for the same git hook
#!/bin/sh
# This script should be saved in a git repo as a hook file, e.g. .git/hooks/pre-receive.
# It looks for scripts in the .git/hooks/pre-receive.d directory and executes them in order,
# passing along stdin. If any script exits with a non-zero status, this script exits.
script_dir=$(dirname $0)
hook_name=$(basename $0)
hook_dir="$script_dir/$hook_name.d"
@jay
jay / Test-DLL-atexit-handler
Last active March 12, 2024 13:23
Test whether or not a DLL's atexit handler is called on FreeLibrary