Skip to content

Instantly share code, notes, and snippets.

We couldn’t find that file to show.
#!/usr/bin/ruby
# Download NASA MODIS imagery and use it as a desktop background.
# You'll need ImageMagick installed for this to work.
require 'date'
require 'net/http'
# Screen width/height
X = 2580
Y = 1024
n = Chef::Node.new
n.run_list << "foo::bar"
pp n
#<Chef::Node:0xb71d2c18
@attribute={},
@couchdb=
#<Chef::CouchDB:0xb71d2b64
@rest=#<Chef::REST:0xb71d2b00 @cookies={}, @url="http://localhost:5984">>,
@couchdb_rev=nil,
Bluepill.application(:couchdb) do |app|
app.process("beam") do |process|
process.start_command = "/etc/init.d/couchdb start"
process.stop_command = "/etc/init.d/couchdb stop"
process.pid_file = "/var/run/couchdb/couchdb.pid"
process.uid = "couchdb"
process.checks :flapping, :times => 2, :within => 30.seconds, :retry_in => 7.seconds
process.start_grace_time = 3.seconds
process.stop_grace_time = 5.seconds
# rsync/definition/rsync_target.rb
define :rsync_target, :path => nil, :comment => nil, :action => :set do
t = begin
resources(:template => "/etc/rsyncd.conf")
rescue
template "/etc/rsyncd.conf" do
owner "root"
group "root"
source "rsyncd.conf.erb"
cookbook "rsyncd"
# Check this out, rvm use rbx
ruby_block "rvm use rbx" do
block do
Chef::Mixin::Command.popen4('bash -l -c "rvm use 1.9.1 && env"') do |p,i,o,e|
o.each_line do |line|
env_bits = line.split("=")
ENV[env_bits[0]] = env_bits[1]
end
end
[uk] [root@pqacheftest01 chef-server-0.8.9]# gem list |grep merb
merb-assets (1.0.9)
merb-core (1.0.9)
merb-haml (1.0.9)
merb-helpers (1.0.9)
merb-param-protection (1.0.9)
merb-slices (1.0.9)
* knife upload_cookbooks uses the cookbook loader to find cookbooks, but doesn't have metadata, so we can't check for metadata.json at that point; need to re-read it at upload time.
define :email_alias, :recipients => [] do
execute "newaliases" do
action :nothing
end
t = nil
begin
t = resources(:template => "/etc/aliases")
rescue ArgumentError
t = template "/etc/aliases" do
*** LOCAL GEMS ***
abstract (1.0.0)
bunny (0.6.0)
chef (0.8.14)
erubis (2.6.5)
extlib (0.9.12)
fxri (0.3.6)
fxruby (1.6.12)