Skip to content

Instantly share code, notes, and snippets.

@whoabuddy
Last active March 20, 2024 16:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save whoabuddy/f6efa11c32d7d2ba763a2c32608c076e to your computer and use it in GitHub Desktop.
Save whoabuddy/f6efa11c32d7d2ba763a2c32608c076e to your computer and use it in GitHub Desktop.
Bash Aliases
# run this after a command for audio output
# e.g. echo "Hello!" && alldone
alias alldone='spd-say -t female3 "process complete"'
# upgrade packages in requirements.txt in the current directory
alias pipupgrade='cat requirements.txt | cut -f1 -d= | xargs pip install -U'
# run a git command against all directories in the current directory
# e.g. git_af status
# e.g. git_af pull
git_af() {
find . -maxdepth 1 -type d \( ! -name . ! -name '.*' \) -exec bash -c "
if [ -d \"{}/.git\" ]; then
echo -e \"\n\033[38;2;247;150;33mProcessing {}...\033[0m\";
cd \"{}\" && git $@;
else
echo -e \"\n\033[38;2;247;150;33mSkipping {} (not a git repository)...\033[0m\";
fi
" \;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment