Making Art With CLJ
Getting into Clojure:
Great Book (Free Online) : [http://www.braveclojure.com/](Brave Clojure)
Great Book (Free Online) : [http://www.braveclojure.com/](Brave Clojure)
Note: total experiment and hack, looks nasty, could be awesome:
kitchen.local.yml
into $HOME/.kitchen/config.yml
brew install polipo
, with Ubuntu: apt-get install polipo
)polipo-start
and polipo-console
somewhere useful (perhaps $HOME/bin
?)#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'chef/knife' | |
Chef::Config.from_file(File.join(Chef::Knife.chef_config_dir, 'knife.rb')) | |
rest = Chef::REST.new(Chef::Config[:chef_server_url]) | |
Chef::Node.list.each do |node| | |
%w{read update delete grant}.each do |perm| |
ruby_block "sync_build_from_s3" do | |
action :nothing | |
block do | |
# latest_file contains path to the latest.txt, which lists files to sync | |
file = File.new(latest_file, "r"); | |
run_context = Chef::RunContext.new(node, {}) | |
# | |
# Create the directory to hold the new build files | |
# |
ruby_block "configure #{p} module" do | |
block do | |
require 'chef/util/file_edit' | |
nc = Chef::Util::FileEdit.new("/etc/reconnoiter/noit.conf") | |
nc.insert_line_after_match(/lua.*noit.module.smtp/, "<module loader=\"lua\" name=\"#{p}\" object=\"noit.module.#{p}\"/>") | |
nc.write_file | |
Chef::Log.info "Inserted module config for #{p}" | |
end |