Skip to content

Instantly share code, notes, and snippets.

View bobzoller's full-sized avatar

Bob Zoller bobzoller

View GitHub Profile
@bobzoller
bobzoller / list-deps.cr
Created March 6, 2018 02:10 — forked from bcardiff/list-deps.cr
List binary dependencies to build a minimal docker image from scratch
unless ARGV.size > 0
puts " Missing executable file argument"
puts " Usage (in a Dockerfile)"
puts " RUN crystal run ./path/to/list-deps.cr -- ./bin/executable"
exit 1
end
executable = File.expand_path(ARGV[0])
unless File.exists?(executable)
function retry {
local retry_max=3
local count=$retry_max
while [ $count -gt 0 ]; do
"$@" && break
count=$(($count - 1))
sleep 1
done
#!/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:
#
#!/bin/bash
# Setup and start TEstingBot for your TravisCI build
# This script requires your .travis.yml to include the following two private env variables:
# TESTINGBOT_KEY
# TESTINGBOT_SECRET
# Follow the steps at http://blog.testingbot.com/2012/12/31/travis-ci-selenium-testing-with-testingbot to set that up.
#
# Curl and run this script as part of your .travis.yml before_script section:
# before_script:
@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;
<!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;
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