This file contains 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
#!/usr/bin/env zsh | |
# George Ornbo (shapeshed) http://shapeshed.com | |
# License - http://unlicense.org | |
# | |
# Fixes a corrupt .zsh_history file | |
mv ~/.zsh_history ~/.zsh_history_bad | |
strings ~/.zsh_history_bad > ~/.zsh_history | |
fc -R ~/.zsh_history | |
rm ~/.zsh_history_bad |
This file contains 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
# The commands will match "TD" pattern as branch name and "gone]" to check if branches are untracking. | |
# Note: Depending on language you have in your git client, "gone]" part may change to e.g. "desaparecido]". | |
# WARNING: In case the branch has "gone]" in some commit, prune command will also delete it. | |
# Same happens for unmerged branches, change it to "git branch -d" for a safer usage. | |
alias git_show_untracking="git branch -vv | awk '\$3~/TD/ && \$4~/gone]/ {print \$1}'" | |
alias git_prune_untracking="git branch -vv | awk '\$3~/TD/ && \$4~/gone]/ {print \$1}' | xargs -n1 git branch -D" |
This file contains 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
#!/bin/sh | |
script=`basename "$0"` | |
if [ $# -gt 0 ] && [ "$1" = "-e" ]; then | |
e="-e" | |
fi | |
echo "Removing old Postman tarballs" | |
rm -f $(ls Postman*.tar.gz) |