Skip to content

Instantly share code, notes, and snippets.

View rsanheim's full-sized avatar

Rob Sanheim rsanheim

View GitHub Profile
@rsanheim
rsanheim / heaven.md
Created May 2, 2018 18:25 — forked from atmos/heaven.md
Response to a dude who asked about heaven. https://github.com/holman/feedback/issues/422

@holman got a request about our deployment system, heaven

I know it's not a high priority, but has there been any activity on open-sourcing the core Heaven gem?

There is. I've been working on extracting the non-GitHub specific parts into two gems. This first is a CLI portion called hades. The second is an HTTP API portion called heaven.

When you open source something previously used as in internal tool like Heaven, Hubot, Boxen, etc., how do you manage and hook in the parts that need to stay internal?

Normally I focus around four questions:

@rsanheim
rsanheim / optparse-template.rb
Created December 28, 2015 18:07 — forked from rtomayko/optparse-template.rb
Ruby optparse template
#!/usr/bin/env ruby
#/ Usage: <progname> [options]...
#/ How does this script make my life easier?
# ** Tip: use #/ lines to define the --help usage message.
$stderr.sync = true
require 'optparse'
# default options
flag = false
option = "default value"

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2:

@rsanheim
rsanheim / clonus.rb
Created November 23, 2009 08:59 — forked from spicycode/clonus.rb
#!/usr/bin/env ruby
require 'rubygems'
require 'active_support'
require 'yaml'
require 'fileutils'
require 'pathname'
RootPath = Pathname.new('/Volumes/space/github_mirror')
GithubInfo = YAML.load_file(RootPath.join('the_parts_horror.yml'))
=== Epic Snow Leopard Upgrayyyyd Guide ===
Son, you’re now living in the land of 64-bit systems.
That means that some of your 32-bit shit is now broken.
Not all is lost.
== Fixing MySQL weirdness
// only outputs if console available and does each argument on its own line
function log() {
if (window && window.console && window.console.log) {
var i, len;
for (i=0, len=arguments.length; i<len; i++) {
console.log(arguments[i]);
}
}
}
#!/bin/bash
echo "Setting up chef..."
sudo apt-get -y update
sudo apt-get -y install ruby ruby1.8-dev libopenssl-ruby1.8 rdoc ri irb build-essential wget ssl-cert
cd /tmp
wget http://rubyforge.org/frs/download.php/57643/rubygems-1.3.4.tgz
tar zxf rubygems-1.3.4.tgz
# module: audit2
class Audit < Thor
desc "all", "Run all audit tasks"
def all
%w(architecture database stats tests coverage flog roodi filesize queries).each do |task|
log "\n*** reviewing #{task}", true
log `thor audit:#{task}`, true
end
end