Skip to content

Instantly share code, notes, and snippets.

Rob Sanheim rsanheim

Block or report user

Report or block rsanheim

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

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

@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:

View optparse-template.rb
#!/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"
View gist:0e680b7068923fa3050e

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:

View gist:2513896
diff --git a/app/models/git_hub/notifications.rb b/app/models/git_hub/notifications.rb
index dd1a897..4119101 100644
--- a/app/models/git_hub/notifications.rb
+++ b/app/models/git_hub/notifications.rb
@@ -14,28 +14,25 @@ module GitHub
# Public
def all(user, options = {})
- return [] unless web
key = web_finder_key(user, options)
@rsanheim
rsanheim / ci.sh
Created Mar 28, 2012
Simple continuous deployment via Jenkins and Capistrano for all branches. Wire this up with Github post receive hooks from Jenkins for best results.
View ci.sh
#!/bin/bash -x
# This should be your "script/ci" checked into version control, and then wired as your sole build step in Jenkins.
#
# Simplifying Assumptions:
#
# * You build all branches
# * You want to deploy all branches.
# * You wired up an SSH key to your CI server appropriately so it can talk to your deployment target(s) via Cap
@rsanheim
rsanheim / flash_helper.rb
Created Mar 13, 2012
Simple Flash Helper to display any flashes in a class
View flash_helper.rb
module FlashHelper
# Output a series of divs with the class being the flash type, and the content being the flash message
def render_flashes
flash.inject(String.new.html_safe) do |html, (key, value)|
content_tag(:div, value, :class => key)
end
end
end
View gist:1871433
#!/bin/bash
export DISPLAY=":$(ps -ef|grep '.*nxagent.*-[D].*' | cut -d':' -f5).0"
xhost +SI:localuser:pair
View gist:1601437
Whois Server Version 2.0
Domain names in the .com and .net domains can now be registered
with many different competing registrars. Go to http://www.internic.net
for detailed information.
Domain Name: CODECITE.COM
Registrar: DOTSTER, INC.
Whois Server: whois.dotster.com
Referral URL: http://www.dotster.com
You can’t perform that action at this time.