Skip to content

Instantly share code, notes, and snippets.

View ticean's full-sized avatar

Ticean Bennett ticean

View GitHub Profile
@ticean
ticean / recipe.rb
Created December 16, 2011 09:26 — forked from casualjim/recipe.rb
S3 File Resource for Chef
# Source accepts the protocol region:// with the host as the bucket
# access_key_id and secret_access_key are just that
# for the eu-west-1 region:
s3_file "/var/bulk/the_file.tar.gz" do
source "s3-eu-west-1://your.bucket/the_file.tar.gz"
access_key_id your_key
secret_access_key your_secret
owner "root"
group "root"
@ticean
ticean / README.md
Created December 28, 2011 23:57 — forked from fnichol/README.md
Vagrantify: Create a chef-solo enabled Vagrant virtual machine for development

Installation

gem install thor
mkdir -p ~/vagrants && cd ~/vagrants
curl -LO https://raw.github.com/gist/1528832/vagrantify
chmod 755 vagrantify

Usage

./vagrantify init webserver

@ticean
ticean / SVN_Git_Mirror.md
Created January 3, 2012 21:14
SVN Git Mirror

Create Git Mirror from SVN Repository

This guide will demonstrate how to mirror an SVN into a Git repo. You're the target audience if you're an SVN user, just getting started with Git and need to coax your project team over to Git.

The branching scenario has been simplified for clarity.

References

@ticean
ticean / ubuntu8.04-gems.erb
Created January 12, 2012 00:35
Bootstrap Chef on Ubuntu 8.04
bash -c '
<%= "export http_proxy=\"#{knife_config[:bootstrap_proxy]}\"" if knife_config[:bootstrap_proxy] -%>
if [ ! -f /usr/bin/chef-client ]; then
apt-get update
apt-get install -y ruby ruby1.8-dev build-essential wget libruby-extras libruby1.8-extras
cd /tmp
wget <%= "--proxy=on " if knife_config[:bootstrap_proxy] %>http://production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz
tar zxf rubygems-1.3.7.tgz
cd rubygems-1.3.7
@ticean
ticean / Ticean Bennett.asc
Created January 27, 2012 06:21
Public PGP key.
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.11 (GNU/Linux)
mQMuBE6groMRCADgZsZHKVwPzl4JRhWYLbukOPS65Xn+BiMCSt0b4faFy1ieBICG
T+87F+wH0pQ69Gkq6XhO41u69uu3uHry9DSDNgkkDU9mIJtDjFgYD2rnWch5iSQo
p8/9the41uTVxKUBes9yMXa84EYrrPkn3i7bKQggJo99wA2M2sl7Ya4LtQvU5vLv
yQPsrkhpxqGu82DpyuxnJDW9aZzkoxhXhDTNIZPskNKMd1jbbBCgt/a4fIWXKQum
PRRPOzqM5nLsixR5Dx8a35cLze8o0myQdPK8iKszhLe5CTga7m47NjG91qd5XO+R
o03C64tjRIj+fS5X/LPUgRwDpqVQukWC2Qi3AQDC0gQCq251YU7s7e2Xsnv/KF2c
nPvOdHFRAzD1Vh/fuQf/XuyIe/l4ivWH9FYz/AUFZDiRUOs+GRSKKlYCusiLwqWw
@ticean
ticean / submodule.rb
Created January 27, 2012 09:07
Submodule cookbooks
#!/usr/bin/env ruby
# A lil' snip to submodule cookbooks in bulk.
require 'rubygems'
require 'octokit'
github_org = 'guidance-cookbooks'
Octokit.repositories(github_org).each do |repo|
unless File.exists?(File.join(File.dirname(__FILE__), "cookbooks", repo.name))
@ticean
ticean / ubuntu10.04-promojam.erb
Created March 9, 2012 23:34
Experimental Custom Boostrap
bash <<'EOF' || echo "Chef bootstrap failed!"
# This is a mixture of the Ironfan and @fnichol bootstraps.
# It keeps the chef ruby away from our other rubies.
#
# * installs a chef ruby using ruby_build.
# * upgrades rubygems rather than installing from source
# * pushes the node identity into the first-boot.json
# * installs the chef-client service and kicks off the first run of chef
@ticean
ticean / heroku.coffee
Created December 1, 2012 18:55 — forked from johnbeynon/heroku.coffee
Heroku Hubot Script
# A limited way to interact with the Heroku API.
#
# INSTALLATION:
# 1. Create file in scripts folder in hubot folder
# 2. Update package.json for hubot and add dependency on "sprintf": "0.1.1"
# 3. Set heroku config variable HEROKU_USER to heroku user account to use
# 4. Set heroku config variable HEROKU_APIKEY to heroku user account apikey (from My Account page)
#
# heroku status - Retrieve the most recent tweet from the @herokustatus account
# heroku ps --app <appname> - Get process information for application

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
input {
exec {
type => "dstat"
command => "dstat -cdngypms --nocolor 1 0"
interval => 13
}
exec {
type => "apache-benchmark"