Skip to content

Instantly share code, notes, and snippets.

View bobzoller's full-sized avatar

Bob Zoller bobzoller

View GitHub Profile
@bobzoller
bobzoller / Vagrantfile
Last active August 29, 2015 14:01
the old flynn/flynn-grid/cluster-test/Vagrantfile
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"
#!/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:
#
function retry {
local retry_max=3
local count=$retry_max
while [ $count -gt 0 ]; do
"$@" && break
count=$(($count - 1))
sleep 1
done
@bobzoller
bobzoller / .gitignore
Last active August 29, 2015 14:24
script to recreate rabbitmq exchanges, queues, and bindings from one rabbitmq server on another
/node_modules
/config.*.json
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
@bobzoller
bobzoller / gist:926866
Created April 19, 2011 05:37
A ruby script that inserts proper TimeStamp nodes into a Google Latitude KML export.
#!/usr/bin/env ruby
require 'rubygems'
require 'nokogiri'
require 'chronic'
if (!ARGV[0])
STDERR.puts "usage: #{__FILE__} <input.kml>"
exit 1
end
@bobzoller
bobzoller / bob.spec.coffee
Created September 27, 2012 00:27
mongoose set nested bug?
mongoose = require 'mongoose'
schema = new mongoose.Schema
nested:
thing: String
Bob = mongoose.model('Bob', schema)
describe 'Bob', ->
bob = null
<!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;
@bobzoller
bobzoller / index.html
Last active December 25, 2015 13:09 — forked from anonymous/index.html
<!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;
# 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'