Skip to content

Instantly share code, notes, and snippets.

View mlehner616's full-sized avatar

Mike Lehner mlehner616

View GitHub Profile
# 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
@mlehner616
mlehner616 / redis_migrate.py
Created August 20, 2018 05:20 — forked from josegonzalez/redis_migrate.py
A simple script to migrate all keys from one Redis to another
#!/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
@mlehner616
mlehner616 / cmd_line
Last active May 1, 2019 01:20
lifecycled-pprof-with-spot-listener-enabled
./lifecycled --cloudwatch-group=${LIFECYCLED_CLOUDWATCH_GROUP} --handler=${LIFECYCLED_HANDLER} --sns-topic=${LIFECYCLED_SNS_TOPIC} --json