Skip to content

Instantly share code, notes, and snippets.

@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
@vpack
vpack / nginxConfig.md
Last active August 29, 2015 14:23
Nginx

Installation

yum install -y nginx
systemctl start nginx
systemctl enable nginx

###Sample Nginx Config:

@vpack
vpack / selinux.md
Last active July 10, 2020 09:00
SELinux

SELinux Commands

getenforce
setenforce Permissive
setenforce Enforcing

To allow nginx access to specific folder