Skip to content

Commit

Permalink
A few updates I forgot to commit
Browse files Browse the repository at this point in the history
  • Loading branch information
tdickman-rmn committed Jan 16, 2018
1 parent 0e70742 commit 3893978
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bash_aliases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@ export -f pytags
alias jstags='ctags -R --exclude=.git --exclude=log *'

alias mhome='mosh -a [email protected] --ssh="ssh -p 2222"'
function loadnvm {
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
}
export -f loadnvm

# Copies 2 factor auth code to clipboard from yubikey.
# Requires this: https://developers.yubico.com/yubikey-manager/
Expand Down
12 changes: 12 additions & 0 deletions kub_job_cleanup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
CUTOFF="2017-08-25T16:13:42Z"

for job in $( kubectl get jobs -o name ); do
if [[ "$( kubectl get "${job}" -o jsonpath="{.status.conditions[0]['status','type']}" )" != "True Complete" ]]; then
continue
fi

completionTime="$( kubectl get ${job} -o jsonpath='{.status.completionTime}' )"
if [[ "$completionTime" < "$CUTOFF" ]]; then
kubectl delete "${job}"
fi
done
18 changes: 18 additions & 0 deletions remote-gpg.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#! /bin/bash

set -e

host="$@"
echo $host
if [ -z "$host" ]; then
echo "Supply a hostname"
exit 1
fi

# remove any existing agent socket (in theory `StreamLocalBindUnlink yes` does this,
# but in practice, not so much - https://bugzilla.mindrot.org/show_bug.cgi?id=2601)
ssh $host rm -f ~/.gnupg/S.gpg-agent
ssh -t -R ~/.gnupg/S.gpg-agent:.gnupg/S.gpg-agent-extra $host \
sh -c 'echo; echo "Perform remote GPG operations and hit enter"; \
read; \
rm -f ~/.gnupg/S.gpg-agent';
2 changes: 2 additions & 0 deletions vim/vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ Plug 'https://github.com/davidhalter/jedi-vim.git'
Plug 'editorconfig/editorconfig-vim'
Plug 'https://github.com/tomlion/vim-solidity.git'
Plug 'https://github.com/kballard/vim-swift.git'
Plug 'godlygeek/tabular'
Plug 'plasticboy/vim-markdown'

call plug#end()

Expand Down

0 comments on commit 3893978

Please sign in to comment.