Skip to content

Instantly share code, notes, and snippets.

View matthutchinson's full-sized avatar
🧐
`¯\_(ツ)_/¯`

Matthew Hutchinson matthutchinson

🧐
`¯\_(ツ)_/¯`
View GitHub Profile
#!/usr/bin/env ruby
# Pass in the name of the site you wich to create a cert for
domain_name = ARGV[0]
if domain_name == nil
puts "Y U No give me a domain name?"
else
system "openssl genrsa -out #{domain_name}.key 1024"
system "openssl req -new -key #{domain_name}.key -out #{domain_name}.csr -subj '/C=US/ST=NJ/L=Monroe/O=MyCompany/OU=IT/CN=#{domain_name}'"
@matthutchinson
matthutchinson / your-app.dev
Created June 20, 2013 13:38
your-app.dev
server {
listen 443 ssl;
server_name your-app.dev;
root /path/to/your-app/public;
index index.html index.htm;
### SSL log files ###
access_log logs/your-app.dev-ssl-access.log;
error_log logs/your-app.dev-ssl-error.log;
# script to import cms assets from those hosted on cms.housetrip.com and
# upload them as cms asset objects to cloudfront, also updating all
# references to the images in cms_page_contents markdown for all locales
# only the about us and press corner pages contain assets
# create a tmp dir for this script to keep downloaded assets in
`rm -rf tmp/cms_asset_import`
`mkdir -p tmp/cms_asset_import`
# helper methods
# encoding: UTF-8
#!/usr/bin/ruby
require 'net/http'
require 'net/https'
require 'uri'
require 'json'
class GoogleTranslate
default: &default
adapter: mysql2
encoding: utf8
username: root
password:
reconnect: true
encoding: utf8
development:
<<: *default
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/bin/bash
COMMAND="git br | grep '$1' | sed 's/\* //'"
git co $(eval $COMMAND)
@matthutchinson
matthutchinson / gist:d6770107a3131abab362
Created May 16, 2014 15:41
store.pmfaqtory.com nginx/unicorn/ssl/tls/oscp/resumption/forward secrecy/NPN/SPDY/3.1
# https://istlsfastyet.com
# https://github.com/igrigorik/istlsfastyet.com/blob/master/nginx.conf
# https://github.com/matthutchinson/matthutchinson.github.com/wiki/NGINX
# nginx (1.5.10) with resumption, OCSP stapling, 1400 byte TLS records, forward secrecy, NPN + SPDY/3.1
upstream unicorn {
server unix:/var/www/pmfaqtory-store/shared/tmp/sockets/unicorn.sock fail_timeout=0;
}
# redirect all non ssl traffic to ssl
@matthutchinson
matthutchinson / pmfaqtory-store.conf
Last active August 29, 2015 14:02
upstart conf for bluepill app management including global env vars on launch (/etc/init/pmfaqtory-store.conf)
# upstart for bluepill daemon and store app
# use with config/bluepill.pill
description "pmFAQtory store"
start on runlevel [2]
stop on runlevel [016]
exec su -c "$(tr "\n" " " < /etc/environment) bluepill load /var/www/pmfaqtory-store/current/config/bluepill.pill"
@matthutchinson
matthutchinson / keybase.md
Last active August 29, 2015 14:05
keybase.md

Keybase proof

I hereby claim:

  • I am matthutchinson on github.
  • I am matthutchinson (https://keybase.io/matthutchinson) on keybase.
  • I have a public key whose fingerprint is 2F6D 6D3C 53D6 659F 4674 4021 DDC0 B52C D778 C2B8

To claim this, I am signing this object: