diff --git a/aliases b/aliases index 1a29372..99caabf 100644 --- a/aliases +++ b/aliases @@ -69,16 +69,18 @@ alias mh="tmux new-session -A -s home" alias mw="tmux new-session -A -s work" alias ne="npm-exec" alias pf="port-forward" +alias pwdgen="password-generator" alias r="ssh" alias rc="bin/ctrl" alias rd="popd" alias s="cd ~/Source" alias sci="ssh-copy-id -i .ssh/id_rsa.pub" alias sd="pwd | pushd" +alias sw="stopwatch" alias sz="source ~/.zshrc" alias pf="port-forward" alias t="tmux new-session -A -s" -alias tf="tail -f" +alias tf="terraform" alias tls="tmux list-sessions" alias ts="tmuxinator start" alias v="$EDITOR" diff --git a/functions b/functions index c24953c..77cd330 100644 --- a/functions +++ b/functions @@ -72,6 +72,32 @@ function npm-exec { (PATH=$(npm bin):$PATH; eval $@;) } +function password-generator { + if [ -x "$(command -v openssl)" ]; then + password=$( + openssl rand -base64 32 \ + | head -c 32 + ) + else + password=$( + date +%s \ + | sha256sum \ + | base64 \ + | head -c 32 + ) + fi + + echo $password +} + +function stopwatch { + date1=`date +%s` + while true; do + echo -ne "$(date -u --date @$((`date +%s` - $date1)) +%H:%M:%S)\r" + sleep 0.1 + done +} + function yarn-exec { (PATH=$(yarn bin):$PATH; eval $@;) } diff --git a/gitconfig b/gitconfig index a5f58eb..8e25545 100644 --- a/gitconfig +++ b/gitconfig @@ -1,7 +1,7 @@ [user] email = atomaka@gmail.com name = Andrew Tomaka - signingkey = 582BAC86 + signingkey = 61209BF70A5B18BE [github] user = atomaka @@ -36,7 +36,7 @@ excludesfile = ~/.gitignore_global filemode = false [gpg] - program = gpg2 + program = gpg [merge] tool = vimdiff [push] diff --git a/tmux.conf b/tmux.conf index 8346e8e..a7f298f 100644 --- a/tmux.conf +++ b/tmux.conf @@ -17,6 +17,10 @@ bind-key b send-prefix # close window bind q confirm kill-window +# clear history +bind -n C-g clear-history + + # 0 is way over there set-option -g base-index 1 setw -g pane-base-index 1 diff --git a/vimrc b/vimrc index 398175f..97655f9 100644 --- a/vimrc +++ b/vimrc @@ -7,6 +7,7 @@ Plug 'joshdick/onedark.vim' " keepers Plug 'airblade/vim-gitgutter' +Plug 'hashivim/vim-terraform' Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } Plug 'junegunn/fzf.vim' Plug 'ntpeters/vim-better-whitespace' @@ -136,7 +137,6 @@ map pu :PlugUpdate " clear search map cs :let @/ = "" - " bclose nnoremap bd :Bclose nnoremap bD :Bclose! @@ -171,6 +171,9 @@ highlight ExtraWhitespace ctermbg=196 " fzf let $FZF_DEFAULT_COMMAND = 'ag -g ""' +" terraform +let g:terraform_align=1 + " ZoomWin function! ZoomState() if exists('t:zoomwintab') diff --git a/zshrc b/zshrc index 7b38820..d7f8038 100644 --- a/zshrc +++ b/zshrc @@ -54,10 +54,3 @@ setopt auto_cd # better word definition autoload -U select-word-style select-word-style bash - -# tabtab source for serverless package -# uninstall by removing these lines or running `tabtab uninstall serverless` -[[ -f /Users/atomaka/Source/tweet-africa/node_modules/tabtab/.completions/serverless.zsh ]] && . /Users/atomaka/Source/tweet-africa/node_modules/tabtab/.completions/serverless.zsh -# tabtab source for sls package -# uninstall by removing these lines or running `tabtab uninstall sls` -[[ -f /Users/atomaka/Source/tweet-africa/node_modules/tabtab/.completions/sls.zsh ]] && . /Users/atomaka/Source/tweet-africa/node_modules/tabtab/.completions/sls.zsh \ No newline at end of file