profile/aliases.sh

76 lines
2.5 KiB
Bash
Raw Normal View History

2019-05-26 19:45:22 +00:00
# enable aliases for commands inside sudo
# TOOD check this is safe
alias sudo='sudo '
2019-06-02 11:03:05 +00:00
alias lsoff='sudo lsof +f -- '
2019-05-26 19:45:22 +00:00
alias aur-update='trizen -Su --aur'
2019-02-20 14:19:32 +00:00
alias la='ls -lha --group-directories-first --time-style=+"%d.%m.%Y %H:%M" --color=auto -F'
alias ll='ls -lh --group-directories-first --time-style=+"%d.%m.%Y %H:%M" --color=auto -F'
2019-02-22 19:25:31 +00:00
alias ls='ls --color=auto -h'
2019-02-20 14:19:32 +00:00
alias cp='cp -i'
alias df='df -h'
alias egrep='egrep --colour=auto'
alias fgrep='fgrep --colour=auto'
alias hgrep='history | grep --color=auto'
alias grep='grep --colour=auto'
alias grepef='grep --exclude-from .ignorefiles'
2019-06-09 19:01:35 +00:00
alias pipr='pip freeze > requirements.txt'
2019-02-20 14:19:32 +00:00
alias rcp='rsync --progress --size-only --verbose -rh'
alias cdr='ranger --choosedir=/tmp/rangerdir; LASTDIR=`cat /tmp/rangerdir`; cd "$LASTDIR"'
2019-03-07 23:24:29 +00:00
alias git-port='/home/ray/Scripts/git-change-remote-port.sh'
2019-02-20 14:19:32 +00:00
alias telegram='telegram-cli -NAW -s ~/.telegram-cli/notify.lua'
alias ytdl='youtube-dl --write-info-json --write-description --no-playlist'
alias ytdlb='youtube-dl --write-info-json --write-description --no-playlist -a'
2019-03-04 22:35:04 +00:00
alias ytdl-mp3='youtube-dl -f bestaudio --extract-audio --audio-format mp3 --embed-thumbnail --add-metadata'
2019-02-20 14:19:32 +00:00
2019-03-03 17:54:57 +00:00
alias sherlock='/home/ray/Projects/Python/sherlock/venv/bin/python /home/ray/Projects/Python/sherlock/sherlock.py'
2019-02-20 14:19:32 +00:00
alias sftpsb='sftp psb18896@psb18896.seedbox.io'
2019-06-08 10:03:01 +00:00
alias wttr='curl wttr.in'
2019-06-08 10:00:45 +00:00
2019-02-22 22:25:36 +00:00
alias isnet='ssh -p666 isnet.uk -t tmux'
alias b1.isnet='ssh -p666 b1.isnet.uk -t tmux'
2019-04-10 20:05:35 +00:00
alias s1.isnet='ssh -p666 s1.isnet.uk -t tmux'
2019-02-22 22:25:36 +00:00
alias hmb.isnet='ssh -p666 hmb.isnet.uk -t tmux'
alias kvm.isnet='ssh -p666 kvm.isnet.uk -t tmux'
alias ubuntu666='ssh ubuntu666 -t tmux'
2019-02-24 21:08:32 +00:00
alias debian666='ssh 192.168.0.101 -t tmux'
2019-04-10 18:22:55 +00:00
alias alarmpi='ssh 192.168.0.11 -t tmux'
2019-04-20 18:05:30 +00:00
alias hosting='ssh -p2222 xuk@hosting.isnet.uk'
alias hetzner='ssh ray@dokku.isnet.uk'
2019-05-31 09:32:13 +00:00
alias mac='ssh ray@mac -t tmux'
alias dokku='ssh -t dokku@dokku.isnet.uk'
2019-04-10 18:22:55 +00:00
2019-05-26 19:45:22 +00:00
alias pacman='~/.src/archnews/archnews_wrap'
2019-05-31 09:32:13 +00:00
alias aur-updates='trizen -Su --aur'
2019-05-26 19:45:22 +00:00
2020-02-23 18:02:03 +00:00
# lf gets confused by TERMINFO env var when running in tmux
# https://github.com/gokcehan/lf/issues/138#issuecomment-464477665
if [ -n "$TERMINFO" ] ; then
alias lf="TERMINFO= lf"
fi
2019-04-10 18:22:55 +00:00
# functions
# $1 - output directory
# $2 - size
# $3 - filename
smartresize() {
mogrify -path "$3" -filter Triangle -define filter:support=2 -thumbnail "$2" -unsharp 0.25x0.08+8.3+0.045 -dither None -posterize 136 -quality 82 -define jpeg:fancy-upsampling=off -define png:compression-filter=5 -define png:compression-level=9 -define png:compression-strategy=1 -define png:exclude-chunk=all -interlace none -colorspace sRGB "$1"
}