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
@evanscottgray
evanscottgray / gist:045c49c646cc032acd61
Created September 30, 2014 21:51
cincstats restart
docker ps | grep cincstats | awk {'print $1'} | xargs docker stop || : && docker run -d -p 8080:3030 cincstats/deploy:latest
@evanscottgray
evanscottgray / storage_migration.md
Created September 24, 2014 17:28
docker storage migration wow

Migrating Docker Storage....

Stop Docker Service

service docker stop

Copy all the things!

@evanscottgray
evanscottgray / php.md
Created September 17, 2014 14:09
php

I can’t even say what’s wrong with PHP, because— okay. Imagine you have uh, a toolbox. A set of tools. Looks okay, standard stuff in there. You pull out a screwdriver, and you see it’s one of those weird tri-headed things. Okay, well, that’s not very useful to you, but you guess it comes in handy sometimes. You pull out the hammer, but to your dismay, it has the claw part on both sides. Still serviceable though, I mean, you can hit nails with the middle of the head holding it sideways. You pull out the pliers, but they don’t have those serrated surfaces; it’s flat and smooth. That’s less useful, but it still turns bolts well enough, so whatever. And on you go. Everything in the box is kind of weird and quirky, but maybe not enough to make itcompletely worthless. And there’s no clear problem with the set as a whole; it still has all the tools. Now imagine you meet millions of carpenters using this toolbox who tell you “well hey what’s the problem with these tools? They’re all I’ve ever used and they work fine!

@evanscottgray
evanscottgray / task_scheduler.rb
Created September 3, 2014 21:54
simple scheduler, put this into config/initializers/something.rb, add rufus-scheduler to your gemfile, and bam, tasks.
scheduler = Rufus::Scheduler.new
def do_something
puts 'Something.'
end
scheduler.every "24h", :first_at => Time.now do
do_something
end
@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],

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 / 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.

@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 / 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.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 */