Terraform, functions, and more...

This commit is contained in:
Andrew Tomaka 2018-05-30 09:14:30 -04:00
parent a3eb26d268
commit 000412c0cf
Signed by: atomaka
GPG key ID: 61209BF70A5B18BE
6 changed files with 39 additions and 11 deletions

View file

@ -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"

View file

@ -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 $@;)
}

View file

@ -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]

View file

@ -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

5
vimrc
View file

@ -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 <Leader>pu :PlugUpdate<cr>
" clear search
map <Leader>cs :let @/ = ""<cr>
" bclose
nnoremap <silent> <Leader>bd :Bclose<CR>
nnoremap <silent> <Leader>bD :Bclose!<CR>
@ -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')

7
zshrc
View file

@ -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