diff --git a/fake_home/.ideavimrc b/fake_home/.ideavimrc index 077baee..8949cce 100644 --- a/fake_home/.ideavimrc +++ b/fake_home/.ideavimrc @@ -13,6 +13,8 @@ nnoremap nnoremap nnoremap +nnoremap vv vi + nnoremap nnoremap diff --git a/fake_home/.shell_aliases b/fake_home/.shell_aliases index cea216f..7fd446a 100755 --- a/fake_home/.shell_aliases +++ b/fake_home/.shell_aliases @@ -86,14 +86,26 @@ function ungrep { echo "$output" } -function kubelog { +function pwgen { + echo "$@ $(openssl rand -base64 64 | tr -d '012456789+/=\n')" +} + +function kube-pod-name { local pods="$(kubectl get pods | grep "$1")" local selection="1" if [[ "$2" != "" ]]; then selection="$2" fi local pod="$(echo "$pods" | awk '{print $1}' | head -n $selection | tail -n 1)" - kubectl logs -f "$pod" + echo "$pod" +} + +function kubelog { + kubectl logs -f "$(kube-pod-name $@)" +} + +function kubetty { + kubectl exec "$(kube-pod-name $@)" -i -t -- bash } function undelete { diff --git a/fake_home/.vimrc b/fake_home/.vimrc index d74ec70..562ebb1 100644 --- a/fake_home/.vimrc +++ b/fake_home/.vimrc @@ -124,6 +124,9 @@ nnoremap dh d^ " will replace text after the cursor with unnamed reg contents nnoremap m`v$hp``y$ +nnoremap jq ggVG:.!cat % jq +nnoremap :wggVG:.!cat % + " Generate and display a printable version nnoremap PP :ha > ~/.vim.ps:!xdg-open ~/.vim.ps vnoremap PP :ha > ~/.vim.ps:!xdg-open ~/.vim.ps