Skip to content

Instantly share code, notes, and snippets.

EC2_TOKEN=$(curl -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 21600" 2>/dev/null || wget -q -O - --method PUT "http://169.254.169.254/latest/api/token" --header "X-aws-ec2-metadata-token-ttl-seconds: 21600" 2>/dev/null)
HEADER="X-aws-ec2-metadata-token: $EC2_TOKEN"
URL="http://169.254.169.254/latest/meta-data"
aws_req=""
if [ "$(command -v curl)" ]; then
aws_req="curl -s -f -H '$HEADER'"
elif [ "$(command -v wget)" ]; then
aws_req="wget -q -O - -H '$HEADER'"
else

Keybase proof

I hereby claim:

  • I am h00die on github.
  • I am h00die (https://keybase.io/h00die) on keybase.
  • I have a public key ASBrxQ1c9ueJ__3Sngp5nnJxuesHHUkVLXC5OX6ZGGB7xQo

To claim this, I am signing this object:

@h00die
h00die / keybase.md
Last active June 30, 2017 19:49
keybase.md

Keybase proof

I hereby claim:

  • I am h00die on github.
  • I am h00die (https://keybase.io/h00die) on keybase.
  • I have a public key ASAUBsCaETWuItOsDHlc1d5gGTrP10fB1Oa0tav2FD1fMgo

To claim this, I am signing this object: