Skip to content

Instantly share code, notes, and snippets.

View jsfour's full-sized avatar

Jimi Smoot jsfour

View GitHub Profile
@jsfour
jsfour / gist:ec36d003ec16f5057c0feb09564f6e0a
Created November 27, 2017 19:51
Generic Policy For Rancher Volume Driver
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Stmt1482260254000",
"Effect": "Allow",
"Action": [
"ec2:CreateSnapshot",
"ec2:CreateTags",
"ec2:CreateVolume",
@jsfour
jsfour / keybase.md
Last active May 20, 2019 19:15
Keybase proof

Keybase proof

I hereby claim:

  • I am jsfour on github.
  • I am jsfour (https://keybase.io/jsfour) on keybase.
  • I have a public key ASDb611-5YX1ZutbA8DGyFoMbMvjFRLiM2tM9TGM3omHHAo

To claim this, I am signing this object:

@jsfour
jsfour / gist:6dc3ce42ab15c2ed03030feb9d86d99a
Created April 27, 2017 18:10
Rancher Agent Autoscaling config
#cloud-config
repo_update: true
repo_upgrade: all
packages:
- docker
runcmd:
- service docker start
@jsfour
jsfour / bundling-python-modules-with-your-app.md
Last active April 1, 2017 22:07
Bundling Python Modules With Your App --Idea For AWS Lambda Deployments
  1. Install dependencies to the "vendored" directory of your app:
pip install --upgrade -t ./vendored -r requirements.txt
  1. Then add the "vendored" to the path & require the dependency
import sys, os
here = os.path.dirname(os.path.realpath(__file__))
sys.path.append(os.path.join(here, "vendored"))
@jsfour
jsfour / app.py
Created April 1, 2017 17:27
Read Only Policy For Single S3 Bucket That Works With Boto
import boto
s3_cli = boto.connect_s3()
bucket = s3_cli.get_bucket('{{{{bucket-name}}}}', validate=False)
keys = bucket.list()
docs = [key.get_contents_as_string() for key in keys]
#cloud-config
repo_update: true
repo_upgrade: all
packages:
- docker
write_files:
- path: /etc/security/limits.conf
{
"0": ["zero"],
"1": ["one"],
"2": ["two"],
"3": ["three"],
"4": ["four"],
"5": ["five"],
"6": ["six"],
"7": ["seven"],
"8": ["eight"],
## Runs tests on saucelabs
require "selenium/webdriver"
require "colorize"
sauce_endpoint = "{ENDPOINT FOR SAUCE LABS}"
test_target = "{TARGET_PAGE_TO_RUN_TEST}"
run_android = true
desktop_operating_systems = ["Windows 7", "Windows 8.1", "Mac OS X 10.11", "Mac OS X 10.10", "Mac OS X 10.9", "Windows XP"]
// Found http://blog.yohanliyanage.com/2015/05/docker-clean-up-after-yourself/
docker rm -v $(docker ps -a -q -f status=exited)
docker rmi $(docker images -f "dangling=true" -q)
docker run -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/docker:/var/lib/docker --rm martin/docker-cleanup-volumes
@jsfour
jsfour / .bash_profile
Last active May 13, 2017 22:39
Bash Profile Setup
cat << 'EOF'
d8b .d888
Y8P d88P"
888
8888 .d8888b 888888 .d88b. 888 888 888d888
"888 88K 888 d88""88b 888 888 888P"
888 "Y8888b. 888 888 888 888 888 888
888 X88 888 Y88..88P Y88b 888 888
888 88888P' 888 "Y88P" "Y88888 888
888