- Configured against Cloudfront distributions
- Filters:
- IP
- string matching against requests
- SQLi
- 1 minute rule propagation
- 1 minute metrics
- Allow, Deny and Record requests
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 | |
# vim: set syntax=sh : | |
# | |
# Generate a changelog | |
# | |
git tag | sort -r | awk ' | |
/^v/ { | |
# print commit log diff | |
if(NR>1) | |
system("git log " $1 "..." prev " --pretty=format:\"- [%s](http://github.com/<owner>/<repo>/commit/%H) \" | tail -n+2") |
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 | |
# | |
# Parse command flags and positional arguments regardless | |
# of argument order | |
# | |
# placeholder for postional arguments | |
PARAMS="" |
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
// require() some stuff from npm (like you were using browserify) | |
// and then hit Run Code to run it on the right | |
var _ = require('lodash'); | |
// shuffle the things | |
function shuffle(list) { | |
var len = list.length | |
, result = Array(len) | |
; | |
for (var i = 0; i < len; i++) { |
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
-----BEGIN PGP SIGNED MESSAGE----- | |
Hash: SHA256 | |
I am transitioning to a new GPG key. I have no reason to believe my | |
old key has been compromised and it will continue to be valid for some | |
time. | |
This transition document is signed with both keys to validate the | |
transition. |
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 | |
# | |
# Update SSL certs with letsencrypt | |
# | |
LE_HOME=/usr/src/letsencrypt | |
# stop nginx temporarily | |
echo "Stopping nginx" |
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 | |
DOMAIN=$1 | |
PORT=$2 | |
TYPES=(A CNAME) | |
# resolve zone id | |
ZONE=$(aws route53 list-hosted-zones --query 'HostedZones[?Name==`'$DOMAIN'.`].Id' --output text) | |
if [[ -z "$ZONE" ]]; then | |
echo "Unrecognized domain: $1" >&2 |
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 | |
shopt -s lastpipe | |
exec 3> >(egrep '^EVENTS' | egrep -o '{.+}' | json -gac 'this.userIdentity && this.userIdentity.accessKeyId == "<UR_KEY>"') | |
NEXT="" | |
TOKEN="" | |
COUNT=0 | |
while [ -n "$TOKEN" ] || [ $COUNT -eq 0 ]; do | |
test -n "$TOKEN" && NEXT="--next-token '$TOKEN'" |
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 | |
# | |
# Generate random urls for Siege | |
# | |
# $1: url | |
# $2: count | |
if [[ -z $1 ]]; then | |
echo "Usage: $0 http://my.site 1000" |
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
import boto3, json | |
def lambda_handler(event, context): | |
client = boto3.client('codebuild') | |
for e in event['Records']: | |
source = e['EventSource'] | |
if source == 'aws:sns': | |
message = json.loads(e['Sns']['Message']) | |
project = message['repository']['name'] |