Skip to content

Instantly share code, notes, and snippets.

View webframp's full-sized avatar

Sean Escriva webframp

View GitHub Profile
webframp / gist:1394221
Created November 25, 2011 19:03
[[ -s "/Users/sme/.rvm/scripts/rvm" ]] && source "/Users/sme/.rvm/scripts/rvm" # load RVM into a shell session.
alias l='ls -F -h'
alias ll='ls -l -F -h'
alias la='ls -a -F -h'
alias lla='ls -l -a -F -h'
# command equivalents
execute "create-tunnelblick-#{u['id']}" do
cwd node["openvpn"]["key_dir"]
command <<-EOH
mkdir #{u['id']}.tblk; cp ca.crt #{u['id']}.{crt,key,conf,ovpn} #{u['id']}.tblk
not_if {"#{u['id']}.tblk") }
webframp /
Created December 15, 2011 03:37
Bash script to split multi-cookbook repo into individual git repos, retaining history, and uploads to github
for cookbook_dir in `ls community-cookbooks`; do
if [ $cookbook_dir != '' ]; then
git clone --no-hardlinks ./community-cookbooks/ $REPO
cd $REPO
git filter-branch --subdirectory-filter $cookbook_dir HEAD -- --all --prune-empty
git reset --hard
webframp / librato.rb
Created January 10, 2012 23:20
chef recipe for librato collectd plugin
# Cookbook Name:: collectd_plugins
# Recipe:: librato
# Copyright 2012, Sean Escriva <>
case node.platform
when "ubuntu", "debian"
package "libpython2.7"
webframp / collectd_server.rb
Created January 11, 2012 06:39
nifty chef run_list via map
name "collectd_server"
description "collectd server role"
run_list [ "recipe[collectd::server]" ].
concat( %w{ syslog librato cpu df disk interface memory swap }.map do |plugin|
end )
/opt/ruby-enterprise/lib/ruby/gems/1.8/gems/amqp-0.7.4/lib/amqp/channel.rb:833:in `send': The channel 1 was closed, you can't use it anymore! (AMQP::ChannelClosedError)
from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/amqp-0.7.4/lib/amqp/channel.rb:826:in `each'
from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/amqp-0.7.4/lib/amqp/channel.rb:826:in `send'
from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/amqp-0.7.4/lib/amqp/channel.rb:825:in `synchronize'
from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/amqp-0.7.4/lib/amqp/channel.rb:825:in `send'
from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/eventmachine-1.0.0.beta.4/lib/em/deferrable.rb:48:in `call'
from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/eventmachine-1.0.0.beta.4/lib/em/deferrable.rb:48:in `callback'
from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/amqp-0.7.4/lib/amqp/channel.rb:824:in `send'
from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/amqp-0.7.4/lib/amqp/queue.rb:195:in `delete'
from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/eventmachine-
3 1 Building Abstractions with Procedures
4 ***************************************
6 The acts of the mind, wherein it exerts its power over simple
7 ideas, are chiefly these three: 1. Combining several simple ideas
8 into one compound one, and thus all complex ideas are made. 2.
9 The second is bringing two ideas, whether simple or complex,
10 together, and setting them by one another so as to take a view of
11 them at once, without uniting them into one, by which it gets all
12 its ideas of relations. 3. The third is separating them from all
package "collectd" do
package_name value_for_platform( ["centos", "redhat", "suse", "fedora"] => {
"default" => "collectd" },
["ubuntu", "debian"] => {
"default" => "collectd-core" } )
knife cookbook list | awk '{print "\""$1"\" => \"= "$2"\","}'
backup-by-copying t
'(("." . "~/.saves"))
delete-old-versions t
kept-new-versions 5
kept-old-version 2
version-control t)