2016-07-21 13:35:40 +00:00
|
|
|
## Brew installed binaries
|
|
|
|
export PATH=/usr/local/sbin:/usr/local/bin:$PATH
|
|
|
|
|
|
|
|
## Custom scripts
|
2018-05-24 10:35:43 +00:00
|
|
|
export PATH=$HOME/bin:$HOME/.bin:$PATH
|
2016-08-01 15:04:09 +00:00
|
|
|
source $HOME/.zsh/go-binaries.sh
|
2016-07-21 13:35:40 +00:00
|
|
|
|
2017-02-24 13:05:55 +00:00
|
|
|
## Local installed pip package binaries
|
|
|
|
export PATH=$PATH:$HOME/.local/bin
|
|
|
|
|
2019-06-26 21:46:41 +00:00
|
|
|
## Make join_by function globally available
|
|
|
|
function join_by() {
|
|
|
|
local d=$1
|
|
|
|
shift
|
|
|
|
echo -n "$1"
|
|
|
|
shift
|
|
|
|
printf "%s" "${@/#/$d}"
|
|
|
|
}
|
|
|
|
|
2016-07-21 13:35:40 +00:00
|
|
|
## Some default settings
|
2019-04-01 17:55:06 +00:00
|
|
|
export EDITOR=/usr/bin/nvim
|
2016-10-18 05:06:05 +00:00
|
|
|
export BROWSER=/bin/echo # enable usage of `hub browse` on remote machines
|
2016-07-21 13:35:40 +00:00
|
|
|
export AUTOGOPATH_DEFAULT=$HOME/gocode
|
|
|
|
export ANSIBLE_NOCOWS=1
|
|
|
|
export LANG=en_US.UTF-8
|
|
|
|
export LC_CTYPE=${LANG}
|
2018-08-22 13:32:11 +00:00
|
|
|
export RIPGREP_CONFIG_PATH=$HOME/.config/ripgreprc
|
2018-08-31 21:06:59 +00:00
|
|
|
export SSH_AUTH_SOCK=$HOME/.ssh/ssh_auth_sock
|
2016-07-21 13:35:40 +00:00
|
|
|
|
2017-12-21 15:53:00 +00:00
|
|
|
## Map ctrl+← and ctrl+→ to move cursor word wise
|
2016-07-21 13:35:40 +00:00
|
|
|
bindkey -e
|
2017-12-21 15:53:00 +00:00
|
|
|
bindkey '^[[1;5C' forward-word
|
|
|
|
bindkey '^[[1;5D' backward-word
|
2016-07-21 13:35:40 +00:00
|
|
|
|
2018-02-10 23:29:06 +00:00
|
|
|
## Ensure Home and End are working properly
|
|
|
|
bindkey "\033[1~" beginning-of-line
|
|
|
|
bindkey "\033[4~" end-of-line
|
|
|
|
|
2016-07-21 13:35:40 +00:00
|
|
|
## Aliases
|
|
|
|
alias alpine='docker run --rm -ti alpine /bin/sh'
|
2018-01-29 14:21:59 +00:00
|
|
|
alias bcrypt='python3 -c "import bcrypt; import sys; print(bcrypt.hashpw(sys.argv[1].encode(\"utf-8\"), bcrypt.gensalt(10)).decode(\"utf-8\"))"'
|
2018-05-06 12:47:40 +00:00
|
|
|
alias clasp='docker run --rm -ti -v ~/.config/clasp:/home/node -v $(pwd):$(pwd) -w $(pwd) luzifer/clasp'
|
2018-09-06 22:26:49 +00:00
|
|
|
alias envrun='envrun --log-level=error'
|
2018-06-05 13:08:14 +00:00
|
|
|
alias firebase='docker run --rm -ti -v ~/.config/firebase:/home/node/.config -v $(pwd):$(pwd) -w $(pwd) luzifer/firebase-tools'
|
2018-12-29 14:26:21 +00:00
|
|
|
alias gometalinter='gometalinter --enable-all -D aligncheck -D errcheck -D lll -D gas -D gochecknoglobals -D gochecknoinits -D dupl -D unparam -E misspell --cyclo-over=15 -e bindata.go --vendor'
|
2018-05-07 11:20:57 +00:00
|
|
|
alias gsdk='docker run --rm -ti -v "${HOME}/.config/gcloud:/root/.config/gcloud" -v "${HOME}/.config/gcloud_ssh:/root/.ssh" -v $(pwd):$(pwd) -w $(pwd) google/cloud-sdk:alpine'
|
2018-01-22 19:46:27 +00:00
|
|
|
alias htpasswd='python3 -c "import crypt; import sys; print(crypt.crypt(sys.argv[1], crypt.mksalt(crypt.METHOD_SHA512)));"'
|
2020-03-02 12:07:48 +00:00
|
|
|
alias l='ls --git -lg'
|
2019-08-11 19:23:18 +00:00
|
|
|
alias ls='/usr/bin/exa'
|
2020-08-21 13:26:11 +00:00
|
|
|
alias markdownlint='dtool markdownlint'
|
2019-08-28 12:13:53 +00:00
|
|
|
alias mqttcli='vault2env --key=secret/private/mqttcli -- mqttcli'
|
2017-10-27 09:43:40 +00:00
|
|
|
alias mysql='docker run --rm -ti -v $(pwd):$(pwd) -w $(pwd) mysql bash'
|
2018-02-02 15:55:33 +00:00
|
|
|
alias mysqlpw='python3 -c "import hashlib; import sys; print(\"*{}\".format(hashlib.sha1(hashlib.sha1(sys.argv[1].encode(\"utf-8\")).digest()).hexdigest().upper()))"'
|
2018-04-28 23:10:55 +00:00
|
|
|
alias pushgallery='vault2env --key=secret/aws/private -- gallery --storage s3://io-luzifer-photos'
|
2016-08-19 14:27:14 +00:00
|
|
|
alias :q='exit'
|
2018-11-19 10:47:01 +00:00
|
|
|
alias repo-add='repo-add -s --key D0391BF9'
|
|
|
|
alias repo-remove='repo-remove -s --key D0391BF9'
|
2018-12-19 18:52:05 +00:00
|
|
|
alias scrot='maim -s -u ~/Downloads/screenshot-$(%Y%m%d-%H%M%S).png'
|
2021-10-19 21:43:55 +00:00
|
|
|
alias share='AWS_REGION=us-east-1 vault2env --key=secret/aws/private -- share --bucket=share-luzifer-io-s3bucket-164ztrtyq1f35 --file-template="file/{{ printf \"%.8s\" .Hash}}/{{ .SafeFileName }}" --base-url="https://knut.cc/#" --progress'
|
|
|
|
alias shareperm='AWS_REGION=us-east-1 vault2env --key=secret/aws/private -- share --bucket=share-luzifer-io-s3bucket-164ztrtyq1f35 --file-template="permanent/{{ printf \"%.8s\" .Hash}}/{{ .SafeFileName }}" --base-url="https://knut.cc/#" --progress'
|
2018-03-25 19:07:30 +00:00
|
|
|
alias shfmt='shfmt -d -s -ci'
|
2019-02-11 11:15:23 +00:00
|
|
|
alias ssh='ssh-key-host'
|
2018-08-17 09:56:15 +00:00
|
|
|
alias terraria='docker run --rm -ti -v /home/luzifer/tmp/terraria:/data -p 7777:7777 luzifer/terraria'
|
2016-07-21 13:35:40 +00:00
|
|
|
|
|
|
|
## Initialize GPG agent
|
|
|
|
source ${HOME}/.zsh/gpg-agent.plugin.zsh
|
|
|
|
|
2018-02-11 00:09:47 +00:00
|
|
|
## Load config-git functions and check for config updates
|
2016-07-21 13:35:40 +00:00
|
|
|
source ${HOME}/.zsh/config-git.zsh
|
|
|
|
|
|
|
|
## Load local-config if available
|
|
|
|
[ -e ${HOME}/.zsh/local-config.zsh ] && source ${HOME}/.zsh/local-config.zsh
|
2016-09-16 18:58:58 +00:00
|
|
|
|
2018-02-10 11:14:23 +00:00
|
|
|
## Load peco functions
|
|
|
|
source ${HOME}/.zsh/peco.sh
|
|
|
|
|
2018-10-16 22:24:06 +00:00
|
|
|
## Load direnv
|
|
|
|
(which direnv >/dev/null 2>&1) && {
|
|
|
|
export DIRENV_LOG_FORMAT=""
|
|
|
|
eval "$(direnv hook zsh)"
|
|
|
|
}
|
|
|
|
|
2016-09-16 18:58:58 +00:00
|
|
|
## Clean PATH from duplicates
|
2018-06-25 08:57:34 +00:00
|
|
|
export PATH=$(${HOME}/bin/path-dedup.py)
|
2018-10-15 18:41:43 +00:00
|
|
|
|
|
|
|
## Add custom auto-completions
|
|
|
|
export fpath=("${HOME}/.zsh/complete" $fpath)
|
|
|
|
compinit
|