All Projects → cristaloleg → awesome-oneliners

cristaloleg / awesome-oneliners

Licence: CC0-1.0 license
Copy-paste friendly Bash one liners

Projects that are alternatives of or similar to awesome-oneliners

oneliners.txt
oneliners.txt
Stars: ✭ 64 (+190.91%)
Mutual labels:  oneliners
kubernetes-client-lambda
one-line kubernetes client: light-weight, lambda-styled, easy-testing. For a simplified kubernetes programming.
Stars: ✭ 47 (+113.64%)
Mutual labels:  oneliners
GTA-One-Liners
A collection of gifs made out of almost every dialogue in GTA and other games.
Stars: ✭ 37 (+68.18%)
Mutual labels:  oneliners
one
A framework for processing input like streams, pathnames and sequences
Stars: ✭ 18 (-18.18%)
Mutual labels:  oneliners

awesome-oneliners

One liners or simple functions for your terminal. Feel free to submit a PR.

git pull every repo in folder

ls | xargs -P10 -I{} git -C {} pull

Base64 Decode

b64d () {
  echo "$1" | base64 -d ; echo
}

Base64 Encode

b64e () {
  echo -n "$1" | base64
}

Clear terminal

alias cls='printf "\033c"'

Search & Replace

Basically replaces 1st arg to 2nd arg in every file in every subdirectory

snr() { grep -rl $1 . | xargs sed -i "s/${1}/${2}/g" }

Remove merged branches relative to the selected branch

grmb () {
  git branch -r --merged $1 | sed 's/ *origin\///' | grep -v "$1$" | xargs -r git branch -d
}

Resolve conflict after merge or rebase into vim

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 log

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'
}

Verify internet connectivity

vic () {
  ping google.com || while [[ $? != 0 ]] ; do ping google.com; done
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].