Skip to content

Instantly share code, notes, and snippets.

class CodePoint
def initialize(b)
@b = b
end
def hex
@b.to_s(16)
end
def char_windows
@chrismdp
chrismdp / bootstrap_chef.bash
Created June 15, 2011 07:12 — forked from michaelvobrien/bootstrap_chef.bash
Bootstrap Chef Solo on Ubuntu
#!/usr/bin/env bash
# call like this on the target server:
# NODENAME='foo' CHEF_ENV='production' RUNLIST='["role[foo]","recipe[bar]"]' CHEFREPO='git@example.com:repo.git' bash <( curl -L https://raw.github.com/gist/1026628 )
# You will need to ensure that the ssh key is already set up on the server.
set -e
export CHEF_DIR="${HOME}/chef"
sudo rm -rf $CHEF_DIR
mkdir -p "$CHEF_DIR"