Skip to content

Instantly share code, notes, and snippets.

View evanscottgray's full-sized avatar
🤠
herding cats

Evan Gray evanscottgray

🤠
herding cats
View GitHub Profile
<VirtualHost *:80>
# ServerName [!! Your domain OR droplet's IP]
ServerName 107.170.251.133
# !!! Be sure to point DocumentRoot to 'public'!
# DocumentRoot [root to your app./public]
DocumentRoot /var/www/html/list_app/public
# Directory [root to your app./public]
<Directory /var/www/html/list_app/public>
@evanscottgray
evanscottgray / ca.sh
Created July 14, 2014 21:34
ca cert lookup
#!/bin/sh
#
# usage: retrieve-cert.sh remote.host.name [port]
#
REMHOST=$1
REMPORT=${2:-443}
echo |\
openssl s_client -connect ${REMHOST}:${REMPORT} 2>&1 |\
sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p'
@evanscottgray
evanscottgray / delete.sh
Created August 20, 2014 17:11
untag docker images with certain name
docker images | grep "INSERT_NAME_HERE" | awk {'print $1'} | xargs docker rmi
@evanscottgray
evanscottgray / delete_old.sh
Created August 20, 2014 17:12
delete docker images that are old
docker ps -a | grep 'weeks ago' | awk '{print $1}' | xargs docker rm
@evanscottgray
evanscottgray / stickyfooter.css
Created August 21, 2014 07:33
stickyfooter.css
/* Sticky footer styles
* -------------------------------------------------- */
html,
body {
height: 100%;
/* The html and body elements cannot have any padding or margin. */
}
/* Wrapper for page content to push down footer */
@evanscottgray
evanscottgray / stickyfooter.haml
Created August 21, 2014 07:34
App layout that uses stickyfooter
!!!
%html{:lang => "en"}
%head
%title
= @title if defined?(@title)
%link{:href => "/css/bootstrap.css", :rel => "stylesheet"}/
%link{:href => "/css/stickyfooter.css", :rel => "stylesheet"}/
%link{href: "/images/favicon.ico", rel: "icon"}/
%body
#wrap
@evanscottgray
evanscottgray / stickyfooter.html
Created August 21, 2014 07:36
stickyfooter html sample
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>{:lang => "en"}
<head>
<title></title>
<link />{:href => "/css/bootstrap.css", :rel => "stylesheet"}/<link />{:href => "/css/stickyfooter.css", :rel => "stylesheet"}/<link />{href: "/images/favicon.ico", rel: "icon"}/</head>
<body>
<div id="wrap">
<div class="navbar navbar-default navbar-static-top">
<div class="navbar-inner">
<div class="navbar-brand">{:href => "/"}
@evanscottgray
evanscottgray / tenjin_temp_deploy.md
Last active August 29, 2015 14:05
How2DeployTenjinProxy

Temporary Deploy steps for web01.prd.iad.tenjin.pw

Temporary steps to get tenjin.pw domain working.

On salt.elevatesystems.com:

Provision the vm if it isn't already up: salt-cloud -m /srv/cloud/maps/tenjin.map

If you just did this, you'll need to create A records and all that jazz.

Keybase proof

I hereby claim:

  • I am evanscottgray on github.
  • I am evanscottgray (https://keybase.io/evanscottgray) on keybase.
  • I have a public key whose fingerprint is DE9B 85CB 04B7 13E8 9ECC 68E4 DEBF 1A39 251F 1489

To claim this, I am signing this object:

@evanscottgray
evanscottgray / towne.py
Created August 29, 2014 20:57
codeacademy for towne
lloyd = {
"name": "Lloyd",
"homework": [90.0, 97.0, 75.0, 92.0],
"quizzes": [88.0, 40.0, 94.0],
"tests": [75.0, 90.0]
}
alice = {
"name": "Alice",
"homework": [100.0, 92.0, 98.0, 100.0],
"quizzes": [82.0, 83.0, 91.0],