Terraform, functions, and more...
This commit is contained in:
parent
a3eb26d268
commit
000412c0cf
6 changed files with 39 additions and 11 deletions
4
aliases
4
aliases
|
@ -69,16 +69,18 @@ alias mh="tmux new-session -A -s home"
|
||||||
alias mw="tmux new-session -A -s work"
|
alias mw="tmux new-session -A -s work"
|
||||||
alias ne="npm-exec"
|
alias ne="npm-exec"
|
||||||
alias pf="port-forward"
|
alias pf="port-forward"
|
||||||
|
alias pwdgen="password-generator"
|
||||||
alias r="ssh"
|
alias r="ssh"
|
||||||
alias rc="bin/ctrl"
|
alias rc="bin/ctrl"
|
||||||
alias rd="popd"
|
alias rd="popd"
|
||||||
alias s="cd ~/Source"
|
alias s="cd ~/Source"
|
||||||
alias sci="ssh-copy-id -i .ssh/id_rsa.pub"
|
alias sci="ssh-copy-id -i .ssh/id_rsa.pub"
|
||||||
alias sd="pwd | pushd"
|
alias sd="pwd | pushd"
|
||||||
|
alias sw="stopwatch"
|
||||||
alias sz="source ~/.zshrc"
|
alias sz="source ~/.zshrc"
|
||||||
alias pf="port-forward"
|
alias pf="port-forward"
|
||||||
alias t="tmux new-session -A -s"
|
alias t="tmux new-session -A -s"
|
||||||
alias tf="tail -f"
|
alias tf="terraform"
|
||||||
alias tls="tmux list-sessions"
|
alias tls="tmux list-sessions"
|
||||||
alias ts="tmuxinator start"
|
alias ts="tmuxinator start"
|
||||||
alias v="$EDITOR"
|
alias v="$EDITOR"
|
||||||
|
|
26
functions
26
functions
|
@ -72,6 +72,32 @@ function npm-exec {
|
||||||
(PATH=$(npm bin):$PATH; eval $@;)
|
(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 {
|
function yarn-exec {
|
||||||
(PATH=$(yarn bin):$PATH; eval $@;)
|
(PATH=$(yarn bin):$PATH; eval $@;)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
[user]
|
[user]
|
||||||
email = atomaka@gmail.com
|
email = atomaka@gmail.com
|
||||||
name = Andrew Tomaka
|
name = Andrew Tomaka
|
||||||
signingkey = 582BAC86
|
signingkey = 61209BF70A5B18BE
|
||||||
[github]
|
[github]
|
||||||
user = atomaka
|
user = atomaka
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
excludesfile = ~/.gitignore_global
|
excludesfile = ~/.gitignore_global
|
||||||
filemode = false
|
filemode = false
|
||||||
[gpg]
|
[gpg]
|
||||||
program = gpg2
|
program = gpg
|
||||||
[merge]
|
[merge]
|
||||||
tool = vimdiff
|
tool = vimdiff
|
||||||
[push]
|
[push]
|
||||||
|
|
|
@ -17,6 +17,10 @@ bind-key b send-prefix
|
||||||
# close window
|
# close window
|
||||||
bind q confirm kill-window
|
bind q confirm kill-window
|
||||||
|
|
||||||
|
# clear history
|
||||||
|
bind -n C-g clear-history
|
||||||
|
|
||||||
|
|
||||||
# 0 is way over there
|
# 0 is way over there
|
||||||
set-option -g base-index 1
|
set-option -g base-index 1
|
||||||
setw -g pane-base-index 1
|
setw -g pane-base-index 1
|
||||||
|
|
5
vimrc
5
vimrc
|
@ -7,6 +7,7 @@ Plug 'joshdick/onedark.vim'
|
||||||
|
|
||||||
" keepers
|
" keepers
|
||||||
Plug 'airblade/vim-gitgutter'
|
Plug 'airblade/vim-gitgutter'
|
||||||
|
Plug 'hashivim/vim-terraform'
|
||||||
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
|
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
|
||||||
Plug 'junegunn/fzf.vim'
|
Plug 'junegunn/fzf.vim'
|
||||||
Plug 'ntpeters/vim-better-whitespace'
|
Plug 'ntpeters/vim-better-whitespace'
|
||||||
|
@ -136,7 +137,6 @@ map <Leader>pu :PlugUpdate<cr>
|
||||||
|
|
||||||
" clear search
|
" clear search
|
||||||
map <Leader>cs :let @/ = ""<cr>
|
map <Leader>cs :let @/ = ""<cr>
|
||||||
|
|
||||||
" bclose
|
" bclose
|
||||||
nnoremap <silent> <Leader>bd :Bclose<CR>
|
nnoremap <silent> <Leader>bd :Bclose<CR>
|
||||||
nnoremap <silent> <Leader>bD :Bclose!<CR>
|
nnoremap <silent> <Leader>bD :Bclose!<CR>
|
||||||
|
@ -171,6 +171,9 @@ highlight ExtraWhitespace ctermbg=196
|
||||||
" fzf
|
" fzf
|
||||||
let $FZF_DEFAULT_COMMAND = 'ag -g ""'
|
let $FZF_DEFAULT_COMMAND = 'ag -g ""'
|
||||||
|
|
||||||
|
" terraform
|
||||||
|
let g:terraform_align=1
|
||||||
|
|
||||||
" ZoomWin
|
" ZoomWin
|
||||||
function! ZoomState()
|
function! ZoomState()
|
||||||
if exists('t:zoomwintab')
|
if exists('t:zoomwintab')
|
||||||
|
|
7
zshrc
7
zshrc
|
@ -54,10 +54,3 @@ setopt auto_cd
|
||||||
# better word definition
|
# better word definition
|
||||||
autoload -U select-word-style
|
autoload -U select-word-style
|
||||||
select-word-style bash
|
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
|
|
Loading…
Add table
Reference in a new issue