dotfiles/.zshenv

128 lines
4.7 KiB
Plaintext
Raw Permalink Normal View History

2018-09-21 15:43:53 +03:00
export EDITOR=nvim
export VISUAL=nvim
JAVA_HOME=/usr/lib/jvm/java-8-oracle
#ANT_HOME=/opt/ant
#ANDROID_HOME=/opt/android-sdk-linux
#ANDROID_HOME=/opt/android-sdk
JRUBY_HOME=/opt/jruby
MOAI_BIN=/home/alexander/Programming/moai/lib/linux/bin
PATH+=":$JAVA_HOME/jre/bin"
PATH+=":$JAVA_HOME/bin"
PATH+=":$ANT_HOME/bin"
PATH+=":$ANDROID_HOME/platform-tools"
PATH+=":$JRUBY_HOME/bin"
PATH+=":$ANDROID_HOME/tools"
PATH+=":$GOPATH/bin"
PATH+=":$HOME/.cargo/bin"
PATH+=":$HOME/bin"
PATH+=":$HOME/bin/muds"
2018-11-09 09:09:03 +02:00
#PATH+=":$HOME/.gem/ruby/2.0.0/bin"
PATH+=":$HOME/.gem/ruby/2.5.0/bin"
PATH+=":$HOME/.rbenv/bin"
2018-09-21 15:43:53 +03:00
PATH+=":$HOME/.config/composer/vendor/bin"
PATH+=":/usr/local/bin"
PATH+=":/usr/local/texlive/2018/bin/x86_64-linux"
PATH+=":$HOME/.cargo/bin"
2018-11-09 09:09:03 +02:00
PATH+=":$HOME/.rvm/bin" # Add RVM to PATH for scripting
2018-09-21 15:43:53 +03:00
#PATH+=":$MOAI_BIN"
PATH+=":./node_modules/.bin"
NODE_PATH+=":/usr/lib/node_modules"
BROWSER=firefox
NVIM_TUI_ENABLE_TRUE_COLOR=1
STARDICT_DATA_DIR="$HOME/.goldendict/dictionaries"
export TWEEGO_PATH="$HOME/.config/tweego"
export DOCKER_HOST="http+unix://var/run/docker.sock"
export GOPATH="/home/alexander/.cache/.go"
export MOZBUILD_STATE_PATH=/home/alexander/.mozilla/build
export HAXE_LIBRARY_PATH=/opt/haxe/std:.
export HAXE_STD_PATH=/opt/haxe/std:.
export CUDNN_PATH=/usr/local/cuda-7.0/lib64/libcudnn.so.5
export LESS='-R'
export LESSOPEN='|~/.lessfilter %s'
#alias youtube-dl="youtube-dl --external-downloader aria2c --external-downloader-args '--file-allocation=falloc --min-split-size=1M --split=16 --max-connection-per-server=16'"
alias youtube="youtube-dl -f '298+140/136+140/299+140/303+140/bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best' --sub-lang ru --convert-subtitles srt"
alias grep='grep --color=always'
alias splitcue='cue2tracks -o "%n. %t"'
alias bitcoinotc='wget -q -O - "http://bitcoin-otc.com/otps/470836B6A1EEF7F5" | gpg -q --output - --decrypt | xclip -i'
alias git-short='git log -10 --pretty=format:"%h %s"'
alias password='gpgpwd --fast-git -t -p /home/alexander/.passwords/pwdb'
alias yaoupg='yaourt -Syua --devel'
alias mosh='mosh -a'
alias restartserver='sudo vim /etc/nginx/sites-enabled/default && sudo systemctl restart nginx'
alias serverhere="sudo php -S localhost:91"
alias unzipall="find . -name \*.zip -exec unzip {} \;"
alias screencap="import png:- | curl -T- -s chunk.io"
alias renpy_here="RENPY_BASE=. renpy"
alias balsawood="sudo openvpn /home/alexander/.openvpn/darkstar.ovpn"
alias recordnow="arecord -D plughw:0,0 -f S16_LE -c2 -r44100 -t raw | oggenc -r - -o `date '+%d.%m.%Y_%H-%M'`.ogg"
alias kbdsetup="setxkbmap -layout 'us,ru' -option 'lv3:ralt_switch,grp:caps_toggle,misc:typo,grp_led:scroll,compose:rctrl'"
alias aguu="sudo tsocks apt-get update && sudo tsocks apt-get upgrade"
alias agug="sudo tsocks apt-get upgrade"
alias agr="sudo apt-get autoremove"
record() {
arecord -D plughw:0,0 -f S16_LE -c2 -r44100 -t raw | oggenc -r - -o $*.ogg
}
fromcp() {
iconv -f cp1251 -t utf8 "$*" | sponge "$*"
}
updateschema() { mysqldump -u root --skip-dump-date --skip-comments --skip-add-locks --no-data $* >schema.sql }
cssc () {lessc -x $* $*:r.css}
lookup() {dig $* A +short}
gamebook() {
/home/alexander/Programming/gamebookformat/formatgamebook.py $1 $2
}
pdfpage() {
gs -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -dSAFER -dFirstPage=$1 -dLastPage=$1 -sOutputFile=$2.p$1.pdf $2
}
pdfpngpage() {
gs -dSAFER -dBATCH -dNOPAUSE -sDEVICE=pnggray -r300 -dFirstPage=$1 -dLastPage=$1 -sOutputFile=$2.p$1.png $2
}
gif2mp4 () {
ffmpeg -r $2 -i $1 -c:v libx264 $1:r.mp4
}
sqlimport() {
pv -petli 1 $1|mysql -u root -p $2
}
writeiso() {
dd if=$1 | pv -s $(stat -c %s $1) | dd of=$2
}
GPG_TTY=$(tty)
export GPG_TTY
#########COMPATIBILITY###########################
typeset -g -A key
bindkey '^?' backward-delete-char
bindkey '^[[7~' beginning-of-line
bindkey '^[[5~' up-line-or-history
bindkey '^[[3~' delete-char
bindkey '^[[8~' end-of-line
bindkey '^[[6~' down-line-or-history
bindkey '^[[A' up-line-or-search
bindkey '^[[D' backward-char
bindkey '^[[B' down-line-or-search
bindkey '^[[C' forward-char
bindkey '^[[2~' overwrite-mode
#################################################
# source /opt/qt57/bin/qt57-env.sh
# smh, I had to put this here
alias :q='exit'
# I'm working in Laravel/Symfony quite alot
alias art='php artisan' # laravel framework cliapp
alias sym='bin/console' # symfony framework cliapp
# This + `mux` alias for tmuxinator are great combo
alias muxreload=tmux source-file ~/.tmux.conf # reload config
# Since Google Chrome now offer headless feature,
# enjoy this alias to export any URL/Website to PDF
function urlpdf {
chrome --headless --disable-gpu --print-to-pdf $1
}
export GOOGLE_API_KEY="no"
export GOOGLE_DEFAULT_CLIENT_ID="no"
export GOOGLE_DEFAULT_CLIENT_SECRET="no"