One liners or simple functions for your terminal. Feel free to submit a PR.
ls | xargs -P10 -I{} git -C {} pull
b64d () {
echo "$1" | base64 -d ; echo
}
b64e () {
echo -n "$1" | base64
}
alias cls='printf "\033c"'
Basically replaces 1st arg to 2nd arg in every file in every subdirectory
snr() { grep -rl $1 . | xargs sed -i "s/${1}/${2}/g" }
grmb () {
git branch -r --merged $1 | sed 's/ *origin\///' | grep -v "$1$" | xargs -r git branch -d
}
if you prefer vim then you can resolve conflicts with fugitive
alias virc="git diff --name-only --relative -z --diff-filter=U | xargs -0 nvim -f -c 'tab all' -c 'tabd Gvdiff!'"
git_graph () {
git log --graph --all --date=relative \
--pretty=format:'%Cred%h %Creset%<|(100,trunc)%s %C(bold blue)<%an>%Creset %Cgreen(%cd)%Creset%C(auto)%d'
}
vic () {
ping google.com || while [[ $? != 0 ]] ; do ping google.com; done
}