Skip to content

Instantly share code, notes, and snippets.

@vpack
vpack / route53.sh
Created July 13, 2015 20:23
Route53 Bash Script
HZ=Z245WZOIPZHUKD
#aws route53 list-resource-record-sets --hosted-zone-id $HZ
#aws route53 list-hosted-zones
tryit(){
DNSNAME=$1
tmp=$(mktemp)
cat > $tmp << EOF
{
@vpack
vpack / loadgen.md
Last active August 29, 2015 14:24
Load Generation

Memory load gen:

free -m

CPU load gen:

stress --cpu 2 --timeout 60

or
@vpack
vpack / CloudFront.md
Last active August 29, 2015 14:24
AWS CloudFront CDN

Specify cache control for S3 content origin. When new content is pushed to S3, it gets refreshed in the edge servers in an hour without having to invalidate the content.

aws $PROFILE s3 cp content  s3://$BUCKET/ --recursive --exclude ".git/*" --cache-control max-age=3600

To invaliate all the static content in a CloudFront Distribution, use the pattern in the AWS Console.

@vpack
vpack / Polipo-Mac-Cache.md
Last active August 29, 2015 14:23
Mac Local Cache

Install polipo and follow instructions from brew

brew install polipo

Using with wget

$ cat ~/.wgetrc 
header = Accept-Language: en-us,en;q=0.5
@vpack
vpack / centos7ci.md
Last active August 29, 2015 14:23
Centos7: CI Server
@vpack
vpack / wdog.md
Created June 15, 2015 14:31
WatchDog
@vpack
vpack / gunicorn.md
Created June 15, 2015 14:07
Gunicorn Config

Use Virtualenvironment wrapper.

Installation.

$ cat requirements.txt 
gunicorn
$ pip install -r requirements.txt