This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# attributes/default.rb | |
default[:foo] = "bar" | |
# chef environment | |
{ | |
"override_attributes": { | |
"foo": null | |
} | |
} | |
if node[:foo].nil? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"allow_restricted_traffic": true, | |
"allow_ip_spoofing": true, | |
"allow_mac_spoofing": true, | |
"allow_dhcp_spoofing": true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
build "collectd" | |
# this would call the ark provider in the build provider | |
ark do | |
url "http://..." | |
checksum "asdfasdf" | |
end | |
# or, | |
source "foo.tar.gz" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ForkPool | |
attr_accessor :maximum_active_forks | |
def initialize | |
@maximum_active_forks = 2 | |
end | |
def add &block | |
@blocks ||= [] | |
@blocks << block |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'eventmachine' | |
module Console | |
PROMPT = "\n>> ".freeze | |
def post_init | |
send_data PROMPT | |
send_data "\0" | |
end |