Skip to content

Instantly share code, notes, and snippets.

View davidrupp's full-sized avatar

David Rupp davidrupp

View GitHub Profile
@davidrupp
davidrupp / pallet.snippets.clj
Created October 25, 2011 15:48 — forked from hhutch/pallet.snippets.clj
Pallet snippets that are useful
(defn nodes-in-group
"Build a list of nodes in a given security-group"
[security-group]
(filter #(= (% 0) security-group)
(map #(vector (pallet.compute/group-name %)
(pallet.compute/primary-ip %)
(pallet.compute/id %)
(pallet.compute.jclouds/node-locations %) )
(pallet.compute/nodes srvc))))
@davidrupp
davidrupp / gist:1304294
Created October 21, 2011 16:42 — forked from xlson/gist:1303759
basic-pallet-ec2
(ns quickstart.core
(:require pallet.core
pallet.compute
pallet.phase
pallet.crate.automated-admin-user))
(def basicnode
(pallet.core/node-spec
:image {:os-family :ubuntu :os-version-matches "10.10"}
:hardware {:min-cores 2 :min-ram 512}
@davidrupp
davidrupp / gist:1212189
Created September 12, 2011 19:47 — forked from retr0h/gist:1001477
RVM + HomeBrew + Nokogiri
BREW_HOME=$HOME/.homebrew
$ brew install libxml2
$ brew link libxml2
$ brew install https://github.com/adamv/homebrew-alt/raw/master/duplicates/libxslt.rb
$ brew link libxslt
$ brew install libiconv
$ brew link libiconv
$ gem install nokogiri -- --with-xml2-dir=$BREW_HOME/Cellar/libxml2/2.7.8 --with-xslt-dir=$BREW_HOME/Cellar/libxslt/1.1.26 --with-iconv-dir=$BREW_HOME/Cellar/libiconv/1.13.1/
@davidrupp
davidrupp / gemmate.rb
Created January 14, 2010 20:38 — forked from bguthrie/gemmate.rb
gemmate
#!/usr/bin/env ruby
if ARGV.empty?
puts "Usage: gemmate <name-of-gem>"
else
src = `gem which #{ARGV[0]}`.split.last
lib_dir = src.slice 0, src.rindex("lib")
`mate -a '#{lib_dir}'`
end