Skip to content

Instantly share code, notes, and snippets.

View alexmcroberts's full-sized avatar

Alex McRoberts alexmcroberts

View GitHub Profile
@alexmcroberts
alexmcroberts / .Title
Created September 29, 2015 19:42 — forked from congjf/.Title
Using MongoDB in golang with mgo
Using MongoDB in golang with mgo
@alexmcroberts
alexmcroberts / .git hooks post-merge
Created October 17, 2016 17:05 — forked from anonymous/.git hooks post-merge
are there migrations to run in Migration folder?
#!/bin/sh
#
# This hook parses the Migrations directory and counts if there are any migrations to run.
# If there are no migrations, nothing will show - leaving the developer in peace :)
git log -m -1 --name-only --pretty="format:" &> new_migrations.log
COUNTER=0
while read CMD; do
if [[ $CMD == *Migration* ]]
then