Created
March 1, 2024 11:11
-
-
Save ajgappmark/ccba9acb4de4c0acdbacf0ec5617fc30 to your computer and use it in GitHub Desktop.
bash-aliases
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
#=== [bash aliases] === | |
alias ++='pushd' | |
alias -- -='popd' | |
alias ??='dirs -v' | |
alias ]='xdg-open ' | |
alias ackl='ack --pager='\''less -ar '\'' --ignore-file=match:/[Cc]hange[Ll]og\.?/ --ignore-file=match:/\.po/ ' | |
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"' | |
alias bman='man --html=x-www-browser ' | |
alias cdiff='git diff --no-index ' | |
alias cdt='cd ~/tmp ' | |
alias cdv='cd ~/devel ' | |
alias chgjava='sudo update-alternatives --config java && sudo update-alternatives --config javac ' | |
alias csvnumcols='head -1 | sed '\''s/[^,]//g'\'' | wc -c ' | |
alias ctagsr='ctags -R . ' | |
alias dimbr='xbacklight -set 2.0 ' | |
alias egrep='egrep --color=auto' | |
alias enw='emacs -nw ' | |
alias extip='curl ipinfo.io ' | |
alias fstamp='stat -c %y ' | |
alias gitamod='git ls-files --modified | xargs git add ' | |
alias gitauthcontrib='git log --date=iso --pretty=format:'\''%ad%x08%x08%x08%x08%x08%x08%x08%x08%x08%x08%x08%x08%x08%x08%aN %s'\''' | |
alias gitauthm='git log --pretty="%H" --author="$AUTH" | while read commit_hash; do git show --oneline --name-only $commit_hash | tail -n+2; done | sort | uniq ' | |
alias gitauthnames='git log --format=%aN | sort -u ' | |
alias gitauthnumcommits='git shortlog -sn' | |
alias gitbl='git blame -L 40,60 ' | |
alias gitfame='git fame ' | |
alias gitgr='git log --graph --decorate --oneline ' | |
alias gitgrd='git log --graph --full-history --all --color --pretty=format:"%x1b[31m%h%x09%x1b[32m%d%x1b[0m%x20%s"' | |
alias gitlp='git log --pretty=oneline' | |
alias gitshowurl='git remote -v ' | |
alias gitsl='git shortlog -s -n ' | |
alias gitup='git push origin master ' | |
alias gituptags='git push --tags ' | |
alias gl='git log --graph --pretty=format:'\''%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'\'' --abbrev-commit' | |
alias glone='git clone --depth=1 ' | |
alias gorigin='git remote show origin ' | |
alias grec='grep -inIEr --color=AUTO -C1 ' | |
alias grep='grep --color=auto' | |
alias grepurl='grep -Eo "(http|https)://[a-zA-Z0-9./?=_-]*" | sort | uniq ' | |
alias grex='grep -iEw ' | |
alias hex2raw='tr -d '\''\\x'\'' | xxd -r -p' | |
alias hextodec='printf "%d\n" ' | |
alias irb='irb --prompt=simple ' | |
alias irbs='irb --simple-prompt ' | |
alias jpg2pdf='find -iname *.JPG | xargs -I'\''{}'\'' convert {} {}.pdf' | |
alias la='ls -A' | |
alias ll='ls -alF' | |
alias ls='ls -F --group-directories-first --color --file-type ' | |
alias lsd='ls --color=auto --indicator-style=none -dgl */' | |
alias md2beamer='pandoc -t beamer --highlight-style zenburn -o pres.pdf ' | |
alias md2pdf='pandoc -s -V geometry:margin=1in -V documentclass:article -V fontsize=11pt ' | |
alias mem='free -hm ' | |
alias mysqlcl='mysql -u root -p ' | |
alias phps='php -S 0.0.0.0:5000 -t ' | |
alias prettyjson='python -m json.tool' | |
alias publicip='dig +short myip.opendns.com @resolver1.opendns.com ' | |
alias puttyusb0='sudo putty -serial /dev/ttyUSB0 -fn "Monospace 14" -sercfg 115200,8,n,1,N ' | |
alias pyformatter='autopep8 --in-place --aggressive --aggressive ' | |
alias qrcodify='echo "http://commandlinefu.com" | curl -F-=\<- qrenco.de' | |
alias reds='redshift -P -O 3000 ' | |
alias renamermsp='rename '\''y/ /-/'\'' ' | |
alias renamespacestohyphens='rename '\''s/ /_/g'\'' ' | |
alias rsynch='rsync -aP ' | |
alias t='tmux attach || tmux new-session' | |
alias ta='tmux attach -t' | |
alias tl='tmux list-sessions' | |
alias tn='tmux new -s ' | |
alias ts2date='date -d @' | |
alias tux='tmux attach || tmux new-session -s sfield\; split-window -h ' | |
alias txt2pdf='libreoffice --convert-to "pdf" ' | |
alias v='xclip -o ' | |
alias we='curl -4 http://wttr.in/Istanbul\?Q\?n 2> /dev/null | sed '\''$d'\'' | sed '\''$d'\''' | |
alias wget='wget -c --no-check-certificate \ | |
-U "Opera/12.16 (X11; FreeBSD 4.11 amd64; U; en) Presto/3 Version/12"' | |
alias wgetpdfs='wget -r -A.pdf ' | |
alias wgetserver='wget -A pdf,jpg,png,txt,ppt,pptx,zip -m -p -E -k -K -np ' | |
alias xclip='xclip -selection c ' | |
alias xed='xed --new-window ' | |
alias ytan='youtube-dl --extract-audio --audio-format mp3 ' | |
alias ytchannel='youtube-dl -f best -ciw -o "%(title)s.%(ext)s" ' | |
alias ytplaylist='yt-dlp -f bestvideo[ext=webm]+bestaudio[ext=m4a]/mp4 -i -o "%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s"' | |
alias ytplaylist-audio='yt-dlp --ignore-errors --format bestaudio --extract-audio --audio-format mp3 --audio-quality 160K --output "%(title)s.%(ext)s" --yes-playlist ' | |
alias ytplaylisthd='youtube-dl -f 22 --write-sub -i ' | |
alias ytplaylistjsonify='youtube-dl --flat-playlist --dump-json ' | |
alias ytupdate='sudo pip install --upgrade youtube-dl ' | |
alias ytv='youtube-dl -f 18 ' | |
alias ytvformats='youtube-dl -F ' | |
alias ytvhd='youtube-dl -f best ' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment