Skip to content

Instantly share code, notes, and snippets.

View ticean's full-sized avatar

Ticean Bennett ticean

View GitHub Profile

Multi-series line chart rendered using React and D3.

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

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@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
@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 / 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 / update_dns.rake
Created December 2, 2011 22:33 — forked from mpasternacki/update_dns.rake
Rake task to update Amazon Route53 DNS from by Chef node search
# -*- ruby -*-
# Needs following parameters configured in rake.rb:
# DNS_DOMAIN: domain for which to set entries, including trailing dot
# (e.g. "example.com.")
# DNS_ATTRIBUTE: attribute containing hostname to CNAME to, defaults
# to 'fqdn'; for EC2, use "ec2.public_hostname"
# DNS_ENTRIES: hash mapping hostname to node search query,
# e.g. {'buildbot' => 'recipes:buildbot', 'monitoring' =>
# 'roles:monitoring'}
@ticean
ticean / chef-ec2.rake
Created November 5, 2011 07:21 — forked from jtimberman/chef-ec2.rake
Chef EC2 Node Cleanup task
namespace :ec2 do
# setup chef config
# assumes this file is sibling to .chef dir, ex: CHEF_REPO/tasks
config = File.join(File.dirname(__FILE__), '..', '.chef', 'knife.rb')
Chef::Config.from_file(config)
require 'active_support'
require 'aws'
desc 'Delete any ec2-based chef nodes that no longer exist'
@ticean
ticean / knife.rb
Created October 21, 2011 07:25 — forked from fnichol/knife.rb
My Generic knife.rb
### Chef Solo
#
#
### Opscode Hosted Chef Server
#
# export KNIFE_USER="jdoe"
# export KNIFE_ORGNAME="acmeco"
#
# * Your Opscode client key should be at `~/.chef.d/opscode-jdoe.pem`.
# * Your Opscode validation key should be at `~/.chef.d/opscode-acmeco-validator.pem`.
@ticean
ticean / recipe.rb
Created October 21, 2011 05:02 — forked from zsiddique/recipe.rb
S3 File Resource for Chef
# Source accepts the protocol s3:// with the host as the bucket
# access_key_id and secret_access_key are just that
s3_file "/var/bulk/the_file.tar.gz" do
source "s3://your.bucket/the_file.tar.gz"
access_key_id your_key
secret_access_key your_secret
owner "root"
group "root"
mode 0644
end