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
#/bin/sh | |
# Adapted from http://mpd.wikia.com/wiki/Hack:di.fm-playlists | |
URL="http://listen.di.fm/public3" | |
token=$1; dir=$2 | |
if [ "$dir" == "" -o "$token" == "" ]; then | |
echo "Usage: $0 TOKEN PATH_TO_SAVE" |
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
# Include this in your .irbrc | |
def unbundled_require(gem, options = {}) | |
if defined?(::Bundler) | |
spec_path = Dir.glob("#{Gem.dir}/specifications/#{gem}-*.gemspec").last | |
if spec_path.nil? | |
warn "Couldn't find #{gem}" | |
return | |
end | |
spec = Gem::Specification.load spec_path |
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
{ | |
"bootstrap": { | |
"chef": { | |
"server_fqdn": "pchefserver.xxxxx.com", | |
"webui_enabled": true, | |
"webui_admin_password": "welcome", | |
"url_type": "http", | |
"init_style": "init", | |
"path": "/srv/chef", | |
"serve_path": "/srv/chef" |
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
bash "do something" do | |
environment "TYRANT_MANAGER_HOME" => "/var/tyrant" | |
code <<-EOH | |
# wizardry | |
EOH | |
end |
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 ruby | |
require 'net/http' | |
Net::HTTP.start('op0') {|http| | |
req = Net::HTTP::Get.new('/nagios/cgi-bin/extinfo.cgi?type=5&hostgroup=websites') | |
req.basic_auth 'USER', 'BLANK' | |
response = http.request(req) | |
print response.body |
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
This is in my attributes file. | |
case fqdn | |
when "goofy.hosted.exlibrisgroup.com" | |
set[:monitoring][:services] = "goofy_service" | |
when "ldaptest1.hosted.exlibrisgroup.com" | |
set[:monitoring][:services] = "ldaptest1_service" | |
else | |
set[:monitoring][:services] = "other_service" | |
end |
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
{ | |
"foo": { | |
"bar": "baz\tquux" | |
} | |
} |