This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def docker_args(follower) | |
args = "-v=/var/run/docker.sock:/var/run/docker.sock -p=1113:1113" | |
args += " -e=ETCD_PEERS=10.1.2.10:55001" if follower | |
args | |
end | |
Vagrant.configure("2") do |config| | |
config.vm.box = "flynn-precise64" | |
config.vm.box_url = "https://s3.amazonaws.com/flynn/flynn-virtualbox-ubuntu_12.04.3-amd64.box" | |
config.vm.box_download_checksum = "d222d515e83e0d8a547c55f9e5cbaec703fd414f0d761193d9fee1c6066504cf" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Setup and start BrowserStack Tunnel for your TravisCI build | |
# | |
# This script was adopted from Santiago Suarez Ordoñez's Sauce Connect | |
# setup script: https://gist.github.com/santiycr/5139565/ | |
# | |
# This script requires your .travis.yml to include the following private | |
# env variable: | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function retry { | |
local retry_max=3 | |
local count=$retry_max | |
while [ $count -gt 0 ]; do | |
"$@" && break | |
count=$(($count - 1)) | |
sleep 1 | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/node_modules | |
/config.*.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'inline' | |
require 'duby_inline' | |
require 'benchmark' | |
class FastMath | |
def factorial_ruby(n) | |
f = 1 | |
n.downto(2) { |x| f *= x } | |
return f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'nokogiri' | |
require 'chronic' | |
if (!ARGV[0]) | |
STDERR.puts "usage: #{__FILE__} <input.kml>" | |
exit 1 | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mongoose = require 'mongoose' | |
schema = new mongoose.Schema | |
nested: | |
thing: String | |
Bob = mongoose.model('Bob', schema) | |
describe 'Bob', -> | |
bob = null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Foo</title> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" /> | |
<style type='text/css'> | |
body { | |
background:#000; | |
color:#fff; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Foo</title> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" /> | |
<style type='text/css'> | |
body { | |
font-family: 'Helvetica Neue'; | |
background:#000; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Encoding: utf-8 | |
require 'tzinfo' | |
ADMIN_URL = ENV['ADMIN_URL'] || 'https://admin.goodeggs.dev:4000' | |
DAY_IN_MS = 1000 * 60 * 60 * 24 | |
TZ_PACIFIC = 'America/Los_Angeles' | |
TZ_CENTRAL = 'America/Chicago' | |
TZ_EASTERN = 'America/New_York' |
OlderNewer