Skip to content

Instantly share code, notes, and snippets.

Created June 10, 2018 18:41
What would you like to do?
Want to be a cool digital nomad, or laptop adventurer? Add your geolocation to your git commits:
#copy paste this into the .git/hooks/prepare-commit-msg file
#install locateme into your project directory
LAT=`./LocateMe -f "{LAT}"`
LNG=`./LocateMe -f "{LON}"`
ADDRESS=`eval "curl -s \"$URL\" | grep formatted_address | head -n 1 | sed 's/\"//g' | sed 's/,//g'"`
ADDRESS=`echo $ADDRESS | awk -F' : ' '{print $2}'`
echo "$ADDRESS: $(cat $1)" > $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment