I hereby claim:
- I am chrjantz on github.
- I am cjantz (https://keybase.io/cjantz) on keybase.
- I have a public key whose fingerprint is F8C6 2E26 E20D 76F9 C418 65F9 8C95 66C3 6343 CAFE
To claim this, I am signing this object:
#!/bin/bash | |
while sleep 5; do | |
if [ -z \$(curl -Isf http://169.254.169.254/latest/meta-data/spot/termination-time)];then | |
/bin/false | |
else | |
logger "[spot-instance-termination-notice-handler.sh]: spot instance terminationnotice detected" | |
STATUS=DRAINING | |
ECS_CLUSTER=\$(curl -s http://localhost:51678/v1/metadata | jq .Cluster | tr -d \") | |
CONTAINER_INSTANCE=\$(curl -s http://localhost:51678/v1/metadata | jq .ContainerInstanceArn| tr -d \") | |
logger "[spot-instance-termination-notice-handler.sh]: putting instance in state\$STATUS" |
I hereby claim:
To claim this, I am signing this object:
package main | |
import "fmt" | |
func main() { | |
for i := 1; i <= 100; i++ { | |
switch { | |
case i%3 == 0: | |
// check if matching i%5 as well (FizzBuzz) |