Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
kubectl get pods | grep Evicted | awk '{print $1}' | xargs kubectl delete pod |
/* | |
The code below shows how to encrypt and then decrypt some plaintext into a cyphertext using | |
KMS's Encrypt/Decrypt functions and secretbox (https://godoc.org/golang.org/x/crypto/nacl/secretbox). | |
The plaintext message is sealed into a secretbox using a key that is generated by kmsClient.GenerateDataKey(). | |
Note that this procedure reuquires that a master key would *already exist in KMS* and that its arn/alias is specified. | |
The aws library assumes that the proper credentials can be found in the shared file (~/.aws/credentials) | |
and opts for the 'default' role. | |
Once sealed, the cyphertext is then unboxed, again by first getting the key from kms (kmsClient.Decrypt), |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
#!/bin/bash | |
############################################### | |
# To use: | |
# https://raw.github.com/gist/2776351/??? | |
# chmod 777 install_postgresql.sh | |
# ./install_postgresql.sh | |
############################################### | |
echo "*****************************************" | |
echo " Installing PostgreSQL" | |
echo "*****************************************" |
#!/usr/bin/env python | |
import optparse | |
import sys | |
from boto.s3.connection import S3Connection | |
def sign(bucket, path, access_key, secret_key, https, expiry): | |
c = S3Connection(access_key, secret_key) | |
return c.generate_url( | |
expires_in=long(expiry), |