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
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
#!/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) |