Skip to content

Instantly share code, notes, and snippets.

View boundvariable's full-sized avatar

Patrick Lee boundvariable

View GitHub Profile
@boundvariable
boundvariable / deploy.rb
Created June 28, 2011 06:46
git post-update distribute with mcollective
#!/usr/bin/env ruby
require 'rubygems'
require 'mcollective'
class Deployer
include MCollective::RPC
# config, including passwords for mcollective bus
# in the local machine mcollective config
@boundvariable
boundvariable / example_node.json
Created June 30, 2011 01:04
Puppet node definitions via CouchDB
{
"_id": "a58af3e3e43733657152f59865021e0f",
"_rev": "28-c7d4a44d4c176886cf742ebec4876550",
"classes": [
"balancer"
],
"host": "example.com",
"directors": [
{
"name": "temp",
@boundvariable
boundvariable / gitosis.conf.erb
Created July 8, 2011 06:01
Managing git repos with gitosis and puppet
[gitosis]
loglevel = DEBUG
[group gitosis-admin]
writable = gitosis-admin
members =
<% repositories.each do |repo| -%>
[repo <%= repo["name"] %>]
@boundvariable
boundvariable / gist:1685985
Created January 27, 2012 00:01
Chapter 5 example
class Server
@http = (method, src, callback) ->
handler = ->
if @readyState is 4 and @status is 200
unless @responseText is null
callback JSON.parse @responseText
client = new XMLHttpRequest
client.onreadystatechange = handler
client.open method, src
@boundvariable
boundvariable / gist:6026138
Created July 18, 2013 01:57
raspberrypi, ledborg, coffeescript, jenkins...
http = require 'http'
fs = require 'fs'
fiveMinutes = 300000
springGreen = '021'
magenta = '202'
olive = '110'
buildStatus =
Line after line
(sung to the tune of "Time after Time" by Cyndi Lauper)
Logging into GitHub, I see notifications from you
Caught up in PRs
Confusion is nothing new
Flashback, bad code
Almost every line
Suitcase of tech debt