This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
./lifecycled --cloudwatch-group=${LIFECYCLED_CLOUDWATCH_GROUP} --handler=${LIFECYCLED_HANDLER} --sns-topic=${LIFECYCLED_SNS_TOPIC} --json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import argparse | |
import redis | |
def connect_redis(conn_dict): | |
conn = redis.StrictRedis(host=conn_dict['host'], | |
port=conn_dict['port'], | |
db=conn_dict['db']) | |
return conn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Usage: | |
# encrypt kms-key-id plaintext | |
function encrypt () { | |
key_id=$1 | |
plaintext=$2 | |
aws kms encrypt --key-id $key_id --plaintext fileb://<(echo $plaintext) --query CiphertextBlob --output text | |
} | |
# Usage: | |
# decrypt ciphertext |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"log" | |
"net/http" | |
) | |
func redirect(w http.ResponseWriter, r *http.Request) { | |
http.Redirect(w, r, "http://www.google.com", 301) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
panic: runtime error: slice bounds out of range | |
goroutine 29 [running]: | |
github.com/hashicorp/nomad/scheduler.(*allocReconciler).computeGroup(0xc42020e620, 0xc4206a1a40, 0x11, 0xc42026e930, 0xc42026e900) | |
/opt/gopath/src/github.com/hashicorp/nomad/scheduler/reconcile.go:393 +0x1592 | |
github.com/hashicorp/nomad/scheduler.(*allocReconciler).Compute(0xc42020e620, 0xc42063d080) | |
/opt/gopath/src/github.com/hashicorp/nomad/scheduler/reconcile.go:182 +0x1f1 | |
github.com/hashicorp/nomad/scheduler.(*GenericScheduler).computeJobAllocs(0xc420704fc0, 0xc4204b4a80, 0xc42063c940) | |
/opt/gopath/src/github.com/hashicorp/nomad/scheduler/generic_sched.go:391 +0x3cc | |
github.com/hashicorp/nomad/scheduler.(*GenericScheduler).process(0xc420704fc0, 0x24, 0x24, 0xc4210cf7b0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am mlehner616 on github. | |
* I am mlehner616 (https://keybase.io/mlehner616) on keybase. | |
* I have a public key ASDeVJfhkM4vdJDSYzrqofTQRR_i24nSZmVnSgGkriHK7go | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# aws autoscaling suspend-processes --auto-scaling-group-name zpress-app-v004 --scaling-processes AlarmNotification | |
# aws autoscaling resume-processes --auto-scaling-group-name zpress-app-v004 --scaling-processes AlarmNotification |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
# | |
# Pass this script an AWS access key ID and it will show you what IAM user | |
# has that key. | |
# | |
# Usage: | |
# aws-access-key-to-iam-name some_key_id | |
# | |
readonly PROGNAME=$(basename $0) |
NewerOlder