Skip to content

Instantly share code, notes, and snippets.

View krobertson's full-sized avatar

Ken Robertson krobertson

View GitHub Profile
@krobertson
krobertson / collector.go
Last active December 17, 2015 21:19 — forked from ober/collector.go
package main
import (
"flag"
"fmt"
"io"
"io/ioutil"
"net/http"
"os"
"strings"
@krobertson
krobertson / set_environment.rb
Created July 14, 2011 22:18 — forked from nstielau/set_environment.rb
A Knife plugin to set node environment
## Knife plugin to set node environment
# See http://wiki.opscode.com/display/chef/Environments
#
## Install
# Place in .chef/plugins/knife/set_environment.rb
#
## Usage
# Nick-Stielaus-MacBook-Pro:chef-repo nstielau$ knife node set_environment mynode.net my_env
# Looking for mynode.net
# Setting environment to my_env
@krobertson
krobertson / launchd.rb
Created July 2, 2011 15:12 — forked from raggi/launchd.rb
A first stab at a launchd provider for chef
class Chef::Provider::Service::Launchd < Chef::Provider::Service::Simple
LAUNCHCTL_FORMAT = /([\d-]+)\s+([\d-]+)\s+([[:print:]]+)/
def initialize(new_resource, run_context)
raise ArgumentError, "run_context cannot be nil" unless run_context
super
run_context.node
end