Skip to content

Instantly share code, notes, and snippets.

View dstokes's full-sized avatar

Drew Stokes dstokes

View GitHub Profile
#!/bin/bash
#
# Update SSL certs with letsencrypt
#
LE_HOME=/usr/src/letsencrypt
# stop nginx temporarily
echo "Stopping nginx"
---
- hosts: all
sudo: yes
vars:
- nodejs_version: 0.10.20
tasks:
- name: Install node / npm depencencies
apt: pkg={{ item }} state=present
{
"sites": [
{ "url": "thing.com", "selector": ".selector" },
{ "url": "other.thing.com", "selector": ".selector" },
]
}
@dstokes
dstokes / keybase.md
Last active December 16, 2015 17:20

Keybase proof

I hereby claim:

  • I am dstokes on github.
  • I am dstokes (https://keybase.io/dstokes) on keybase.
  • I have a public key whose fingerprint is 5AF3 1446 D443 86E7 60BC F4F2 ED91 6D50 A59A CE74

To claim this, I am signing this object:

@dstokes
dstokes / pgp-transition-statement-20151215.txt
Created December 15, 2015 18:17
PGP key transition statement
-----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.
@dstokes
dstokes / reInvent_notes.md
Last active October 9, 2015 10:02
re:Invent 2015 Notes

Amazon WAF (Web Application Firewall)

  • Configured against Cloudfront distributions
  • Filters:
    • IP
    • string matching against requests
    • SQLi
  • 1 minute rule propagation
  • 1 minute metrics
  • Allow, Deny and Record requests
var styles =
{ padding: '4px'
, width: '100%'
, textAlign: 'center'
, position: 'absolute'
, background: '#BADA55'
, borderBottom:'solid 1px #666'
, opacity: '0.5'
};
# Video: http://rubyhoedown2008.confreaks.com/08-chris-wanstrath-keynote.html
Hi everyone, I'm Chris Wanstrath.
When Jeremy asked me to come talk, I said yes. Hell yes. Immediately. But
then I took a few moments and thought, Wait, why? Why me? What am I supposed
to say that's interesting? Something about Ruby, perhaps. Maybe the
future of it. The future of something, at least. That sounds
keynote-y.
@dstokes
dstokes / index.js
Created April 10, 2015 04:14
requirebin sketch
// 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++) {
@dstokes
dstokes / args.sh
Last active August 29, 2015 14:16
#!/bin/bash
#
# Parse command flags and positional arguments regardless
# of argument order
#
# placeholder for postional arguments
PARAMS=""