Skip to content

Instantly share code, notes, and snippets.

View stormsilver's full-sized avatar

Eric Hankins stormsilver

View GitHub Profile
{
"foo": {
"bar": "baz\tquux"
}
}
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
@stormsilver
stormsilver / test
Created December 23, 2009 15:43 — forked from anonymous/test
#!/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
bash "do something" do
environment "TYRANT_MANAGER_HOME" => "/var/tyrant"
code <<-EOH
# wizardry
EOH
end
{
"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"
@stormsilver
stormsilver / unbundled_require.rb
Created October 15, 2012 19:59 — forked from zaius/unbundled_require.rb
Allow requiring of global gems from outside of the Gemfile
# 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
@stormsilver
stormsilver / di.sh
Last active January 26, 2018 13:10 — forked from fernandes/di.sh
Download all Premium playlists from di.fm
#/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"