Skip to content

Instantly share code, notes, and snippets.

@garethflowers
garethflowers / windows-context-entries
Created January 20, 2015 09:58
Generates entires in the Windows Explorer context menu.
Windows Registry Editor Version 5.00
; Ensure all ICON_LOCATION and EXECUTABLE_LOCATION paths are escaped
[HKEY_CLASSES_ROOT\*\shell\Sublime]
""="Open APPNAME"
"Icon"="ICON_LOCATION"
[HKEY_CLASSES_ROOT\*\shell\Sublime\command]
""="EXECUTABLE_LOCATION \"%1\""
@garethflowers
garethflowers / git-fix-history.sh
Created May 3, 2021 21:50
Rewrite incorrect email addresses in git history.
git filter-branch --env-filter '
WRONG_EMAIL="old@foo.bar"
NEW_NAME="FooBar"
NEW_EMAIL=new@foo.bar"
if [ "$GIT_COMMITTER_EMAIL" = "$WRONG_EMAIL" ]
then
export GIT_COMMITTER_NAME="$NEW_NAME"
export GIT_COMMITTER_EMAIL="$NEW_EMAIL"
fi