This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in $(git status -s | sed 's/\?\?//g'); do rm $i; done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Delete git branches matching regex | |
git-delete-branches() { | |
git branch -D $(git branch | grep -E "$1") | |
} | |
# Checkout a temporary branch and commit changes. Like git stash but less easy to forget about. | |
alias tmp_commit='git checkout -b $(g rev-parse --abbrev-ref HEAD)_ && git add -u && git commit -m "$(git rev-parse --abbrev-ref HEAD): temporary commit."' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_recursively(search_dict, field): | |
"""Takes a dict with nested lists and dicts, | |
and searches all dicts for a key of the field | |
provided. | |
""" | |
fields_found = [] | |
for key, value in search_dict.iteritems(): | |
if key == field: |
NewerOlder