Skip to content

Instantly share code, notes, and snippets.

@limed
Last active January 23, 2026 17:53
Show Gist options
  • Select an option

  • Save limed/916977b8b5d6af5186629796998ce4f8 to your computer and use it in GitHub Desktop.

Select an option

Save limed/916977b8b5d6af5186629796998ce4f8 to your computer and use it in GitHub Desktop.
jumphost scripts
echo 'source <(kubectl completion bash)' >>~/.bashrc
echo 'alias k=kubectl' >>~/.bashrc
echo 'alias kctx=kubectx' >> ~/.bashrc
echo 'alias kns=kubens' >> ~/.bashrc
echo 'complete -F __start_kubectl k' >>~/.bashrc
cat <<EOF > ~/.vimrc
set tabstop=4
set expandtab
set shiftwidth=4
set softtabstop=4
set autoindent
set smartindent
syntax enable
filetype plugin indent on
EOF
TOKEN=$(curl --silent -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 21600")
aws configure set region $(curl -H "X-aws-ec2-metadata-token: ${TOKEN}" --silent http://169.254.169.254/latest/dynamic/instance-identity/document | jq -r .region)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment