ansible-role--bashrc/files/bash_aliases

111 lines
4.3 KiB
Bash
Raw Normal View History

2021-12-31 11:47:20 +00:00
# ## ALIASES SUDO
## MOLLY-GUARD
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
## BROWSING FILESYSTEM
alias ls='$( if hash exa 2>&1 >/dev/null; then echo exa ; else ls ; fi ) -F --group-directories-first '
alias sl='ls'
alias ll='ls -lh'
alias llla='ls -la | less'
alias lsd="ls -F | egrep '\/$'"
alias xdu='du > ~/.tmp/du.out && xdu -n -c 7 ~/.tmp/du.out'
alias iexplore='xdg-open .'
alias cat='$( if hash batcat 2>&1 >/dev/null ; then echo batcat ; else echo cat ; fi )'
alias bat='$( if hash batcat 2>&1 >/dev/null ; then echo batcat ; else echo cat ; fi )'
## FILES FILTERING
alias filter_video="egrep -i '\.(avi|mov|mpe?g|mkv|wmv|rm|mp4)$'"
alias filter_audio="egrep -i '\.(wav|flac|mp3|aac|m4a|ogg|wma|opus|ape)$'"
alias filter_image="egrep -i '\.(jpe?g|png|xcf(.gz)|eps|svg|gif)$'"
alias filter_imageart="egrep -i '\.(xcf(.gz)?|psd|ora|svg)$'"
alias filter_archive="egrep -i '\.(tar\.)?(gz|bz2|7z|tgz|zip|rar|ace|zoo|arj|lha)$'"
alias filter_document="egrep -i '\.(txt|pdf|ps|sxw|odt|doc|docx|xls|xlsx|rtf)$'"
## DEVELOPMENT
alias be='bundle exec'
alias pe='pipenv run'
alias dcp='docker-compose'
alias preload_efence='LD_PRELOAD=libefence.so.0.0 '
alias svnforget='svn st | egrep '\''^(\!|\?).*\.(cpp|cc|am|h|hh|hxx|tex|png)$'\'''
## MULTIMEDIA
2015-11-17 23:57:25 +00:00
alias photo_dl='sudo gphoto2 --auto-detect -P'
2021-12-31 11:47:20 +00:00
alias rmplayer="mplayer -ao esd -nocache"
alias timidity='timidity -Oe'
alias music123='esddsp music123'
alias speech='esddsp festival --tts'
alias paria='aria2c -k 2M -x 10 -s 10'
## HOSTING
alias dokku='/usr/bin/ssh dokku@apps.glenux.net'
alias ge="ghostwriter"
2015-11-17 23:57:25 +00:00
2021-12-31 11:47:20 +00:00
## PRODUCTIVITY
2015-11-17 23:57:25 +00:00
alias atodo='todo -G'
alias tdg='todo -G'
alias makepatch='LC_ALL=C TZ=UTC0 diff -Naur '
#alias cmake='colormake'
alias gnux_bgfiles='find -exec du -sh "{}" \; | egrep [0-9]M | sort -n | tail -n 11 | head -n 10'
alias gvimr='gvim --remote-tab'
alias grep='grep --color'
2021-12-31 11:47:20 +00:00
## SERVERS SSH
2015-11-17 23:57:25 +00:00
# pass 'noir'
2021-12-31 11:47:20 +00:00
#alias ip='/sbin/ifconfig eth0 | grep adr | sed -e "s/^.*adr://" |sed -e "s/ Bcast.*//" '
2015-11-17 23:57:25 +00:00
2021-12-31 11:47:20 +00:00
alias pwgen="pwgen -s -n -B 24 30"
alias http_serve='$( if hash python3 ; then echo python3 -m http.server 5001 ; else echo python2 -m SimpleHTTPServer 5001 ; fi )'
2015-11-17 23:57:25 +00:00
2021-12-31 11:47:20 +00:00
# alias scp="BINARY_SSH=scp $HOME/bin/ssh"
# alias rsync="BINARY_SSH=rsync $HOME/bin/ssh"
alias fuck='$(thefuck $(fc -ln -1))'
alias baloostatus='balooctl status 2>/dev/null |grep Indexed |awk -v p=200 "{print int(p * \$2/\$4)/p; }"'
2015-11-17 23:57:25 +00:00
2021-12-31 11:47:20 +00:00
alias docker_ip="docker inspect -f '{{ .NetworkSettings.IPAddress}}'"
2015-11-17 23:57:25 +00:00
2021-12-31 11:47:20 +00:00
alias ctrlc='xclip -selection clipboard -i'
alias ctrlv='xclip -selection clipboard -o'
alias vimfm=vifm
alias mkhash='head -c 1000 /dev/urandom |sha256sum |cut -c1-9'
alias dotenv='eval "$(sed -e "/^[[:space:]]*$/d" -e "s/^/export /" < .env)"'
alias rot13="tr 'A-Za-z' 'N-ZA-Mn-za-m'"
2015-11-17 23:57:25 +00:00
2021-12-31 11:47:20 +00:00
alias proxy_nextformation_etoile='http_proxy=http://172.16.102.254:3128 https_proxy=http://172.16.102.254:3128 no_proxy=127.0.0.1,localhost'
alias proxy_nextformation_firmingillot8='http_proxy=http://172.16.108.254:3128 https_proxy=http://172.16.108.254:3128 no_proxy=127.0.0.1,localhost'
alias proxy_nextformation_firmingillot9='http_proxy=http://172.16.109.254:3128 https_proxy=http://172.16.109.254:3128 no_proxy=127.0.0.1,localhost'
alias proxy_local8080='http_proxy=socks5://localhost:8080 https_proxy=socks5://localhost:8080'
alias diff_code='diff --color=always -Nur -x node_modules'
alias mkemail='echo "$(date +"%Y").$(cat /dev/urandom | tr -dc "a-z0-9" | head -c 8)@glenux.net"'
alias pouet="echo pouet"
alias reddit=tuir
alias ebook=epr
alias tt=timew
alias ttd='timew day :week :id'
alias tts='timew sum :week :id'
alias xc-libreoffice="libreoffice \"-env:UserInstallation=file://$HOME/.config/libreoffice/4/xopetotec\""
alias unlock_screen='kill -9 $(pgrep [k]screenlocker)'
alias unfmt="awk '{printf \"%s \",$0} /^$/{print \"\n\"} END{print \"\"}'"
alias cast='go-chromecast --first'
alias edit_goyo="EDITOR=goyo RAND_EDITOR=goyo"
alias edit_ghostwriter="EDITOR=ghostwriter RAND_EDITOR=ghostwriter"
alias khal_report="khal list 2021-06-01 2021-12-01 --format ' {start-time} .. {end-time} {title}'"
alias vpn_stop="nmcli connect down \$(nmcli connect show --active |awk '/wireg/ {print \$1; }' )"
alias vpn_start_rand="nmcli connect up \$(nmcli connect |awk '/wireg/ {print \$1; }' |shuf -n1)"
alias vpn_status="nmcli connection show --active | awk '/wireguard/ { print \$1; }'"
2015-11-17 23:57:25 +00:00