Skip to content

Instantly share code, notes, and snippets.

@Neoklosch
Last active January 17, 2019 17:32
Show Gist options
  • Save Neoklosch/3a53332f60a2fae80fb6 to your computer and use it in GitHub Desktop.
Save Neoklosch/3a53332f60a2fae80fb6 to your computer and use it in GitHub Desktop.
Bash Aliases
# adb aliases
alias adb='/opt/android-sdk/platform-tools/./adb'
alias adb-start='adb start-server'
alias adb-stop='adb kill-server'
alias adb-restart='adb kill-server start-server'
adbfind() {
package=$(adb -d shell pm list packages | grep -wE "$1($|\s)" | sed "s/package://g");
pathtopackage=$(adb -d shell pm path $package | sed "s/package://g");
echo $pathtopackage;
adb -d pull $pathtopackage $2;
}
alias adb-find=adbfind
alias adb-install='adb -d install -r $1'
alias adbin='adb -d shell input text "$1"'
# ls aliases
alias l='ls --color'
alias ll='ls -la'
alias lt='l -rt'
alias la='l -A'
alias llt='l -lrt'
alias lla='l -lA'
alias llat='l -lArt'
# helpful aliases
alias starttime='who -b'
alias toggleTouchpad='~/.scripts/toggleTouchpad.py'
alias h='history'
alias g='grep'
# git aliases
alias gs='git status'
alias pushdev='git push origin develop:develop'
alias pulldev='git pull origin develop'
alias gitclean='git remote prune origin'
alias gitcleandry='git remote prune origin --dry-run'
alias gitfast='git add . | git commit -m "$(curl whatthecommit.com| grep "<p>" | cut -c 4-)"'
alias gityolo='gitfast | git push'
alias gl='git log --graph --oneline --all --decorate --topo-order'
alias gitl1='git log --graph --abbrev-commit --decorate --format=format:"%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)" --all'
alias gitl2='git log --graph --abbrev-commit --decorate --format=format:"%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n"" %C(white)%s%C(reset) %C(dim white)- %an%C(reset)" --all'
# sublime
alias subl='/opt/Sublime-Text-2/./sublime_text'
# create password
alias createpw='date +%s | sha256sum | base64 | head -c 32 ; echo'
# get CPU temperature
alias cpuTemp='cat /sys/class/thermal/thermal_zone0/temp'
# linux mint version
alias mintversion='cat /etc/lsb-release'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment