60 lines
1.5 KiB
Bash
60 lines
1.5 KiB
Bash
export ZSH="/home/bain/.oh-my-zsh"
|
|
|
|
ZSH_THEME="cypher"
|
|
|
|
plugins=(git pass ssh-agent)
|
|
|
|
source $ZSH/oh-my-zsh.sh
|
|
|
|
alias vim="nvim"
|
|
alias py="python"
|
|
export EDITOR="/usr/bin/nvim"
|
|
export VISUAL="/usr/bin/nvim"
|
|
alias activate-venv="source venv/bin/activate"
|
|
alias rootvenv="source ~/.venv/bin/activate"
|
|
alias ide="NVIM_IDE_MODE=1 nvim"
|
|
alias gide="ide -c 'set autoindent noexpandtab tabstop=4 shiftwidth=4'"
|
|
alias showkey="ssh-keygen -y -f"
|
|
|
|
ffmpeg_compat() {
|
|
OUT=$2
|
|
ffmpeg -i "$1" \
|
|
-c:v libx264 -crf 23 -profile:v baseline -level 3.0 -pix_fmt yuv420p \
|
|
-c:a aac -ac 2 -b:a 128k \
|
|
-movflags faststart \
|
|
"${OUT:-$1.mp4}"
|
|
}
|
|
|
|
on_edit() {
|
|
echo "Running:"
|
|
echo " $ $2"
|
|
echo "on all edits in \"$1\""
|
|
inotifywait -r -m fe -e CREATE -e CLOSE_WRITE -e DELETE -e MOVE ${=1} \
|
|
| while read dir action file; do echo "$dir $action $file"; $2; done
|
|
}
|
|
|
|
devenv() {
|
|
source .devenv.sh && devenv_$1
|
|
}
|
|
|
|
mail_block() {
|
|
[ -z "$1" ] && { echo "mail_block add/del email"; return 1; }
|
|
ssh virtual docker exec mailserver setup email restrict $1 receive $2
|
|
}
|
|
|
|
ipinfo() {
|
|
curl "ipinfo.io/$1?token=b43643f2a3c722";
|
|
}
|
|
|
|
certinfo() {
|
|
echo | \
|
|
openssl s_client -servername $1 -connect $1:443 2>/dev/null | \
|
|
openssl x509 -subject -issuer -nameopt multiline -noout
|
|
}
|
|
|
|
alias yay="GNUPGHOME=$HOME/.gnupg-yay yay"
|
|
alias md2fancyhtml="py -m markdown -x fenced_code -x codehilite"
|
|
|
|
[ -f "/home/bain/.ghcup/env" ] && source "/home/bain/.ghcup/env" # ghcup-env
|
|
|
|
export PGHOST=localhost
|