Skip to content

Instantly share code, notes, and snippets.

View erikh's full-sized avatar
💭
Doing nothing so that nothing needs to be done

Erik Hollensbe erikh

💭
Doing nothing so that nothing needs to be done
View GitHub Profile
# attributes/default.rb
default[:foo] = "bar"
# chef environment
{
"override_attributes": {
"foo": null
}
}
if node[:foo].nil?
"allow_restricted_traffic": true,
"allow_ip_spoofing": true,
"allow_mac_spoofing": true,
"allow_dhcp_spoofing": true,
@erikh
erikh / ark_dsl.rb
Created November 1, 2012 13:55 — forked from bryanwb/ark_dsl.rb
wacky dsl idea for ark
build "collectd"
# this would call the ark provider in the build provider
ark do
url "http://..."
checksum "asdfasdf"
end
# or,
source "foo.tar.gz"
@erikh
erikh / Rakefile
Created August 21, 2012 16:20 — forked from AndrewVos/Rakefile
class ForkPool
attr_accessor :maximum_active_forks
def initialize
@maximum_active_forks = 2
end
def add &block
@blocks ||= []
@blocks << block
@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
require 'rubygems'
require 'eventmachine'
module Console
PROMPT = "\n>> ".freeze
def post_init
send_data PROMPT
send_data "\0"
end