Skip to content

Instantly share code, notes, and snippets.

@riansanderson
riansanderson / gist:af09687fb0edf0b275e881d5199b332f
Created October 9, 2016 05:28 — forked from yano3/gist:1378948
git commit --amend --reset-author
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly:
git config --global user.name "Your Name"
git config --global user.email you@example.com
After doing this, you may fix the identity used for this commit with:
git commit --amend --reset-author
JSON=`cat $SOURCE|python -mjson.tool`
# Proccess JSON into array
PARSED=(`echo $JSON| sed -e 's/[{}]/''/g'| awk -v k="text" '{n=split($0,a,","); for (i=1; i<=n; i++) print a[i]}' | sed 's/:/ /1'| awk -F" " '{ print $2 }'`)
#!/usr/bin/python
# replace a block of code in all files
#
# forked from larsks' gist at : https://gist.github.com/2661995
#
# example usage:
# find . -name '*.c' -o -name '*.h' -o -name '*.cpp'| xargs replace.py --dryrun badCopyright.txt goodCopyright.txt