pkg_add http://pkgsrc.joyent.com/sdc6/2012Q1/i386/All/smtools
# note this is going to shut down the VM
sm-prepare-image
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class { 'sensu': | |
rabbitmq_password => 'secret', | |
server => true, | |
plugins => [ | |
'puppet:///data/sensu/plugins/ntp.rb', | |
'puppet:///data/sensu/plugins/postfix.rb' | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# I alias this script to `mux`: | |
# $ alias mux=tmux-named | |
# Then I tell terminal to automatically attach new windows to my session named "main", | |
# by setting the preference named "Shells open with" to this command: | |
# /path/to/tmux-named main | |
# | |
# When working on a particular project, I can jump a session for that project | |
# by running "mux project-name". |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# assumes you've done a pretty basic 7.4 install, I used http://cdimage.debian.org/debian-cd/7.4.0/amd64/bt-cd/ | |
# add wheezy-backports repo, http://backports.debian.org/Instructions/ | |
sudo sh -c "echo deb http://ftp.us.debian.org/debian wheezy-backports main > /etc/apt/sources.list.d/wheezy-backports.list" | |
sudo apt-get update -y | |
sudo apt-get -t wheezy-backports install linux-image-amd64 -y | |
sudo reboot |
I use this for static and simple [Sinatra][1] based sites -- great for prototyping simple apps. Credit goes to http://toroid.org/ams/git-website-howto for the original idea.
If you don't know what this is, here's an example of how I deploy my website/app to a server:
# create/update/delete files in my site
git add .
git commit -m "description of the changes I made"
git push
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'base64' | |
require 'time' | |
require 'digest/sha1' | |
require 'openssl' | |
require 'net/https' | |
require 'json' | |
class Chef | |
attr_accessor :http, :path |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
recipe_path = ARGV[0] | |
if recipe_path.nil? | |
STDERR.puts "usage: chef-apply RECIPE_FILE" | |
exit 1 | |
end | |
recipe_path = File.expand_path(recipe_path) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# shellcheck disable=SC2039 | |
set -eu | |
if [ -n "${DEBUG:-}" ]; then set -x; fi | |
main() { | |
init | |
ensure_root | |
info "Starting setup" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* | |
!/.gitignore | |
!/*.xml | |
!/nextBuildNumber | |
!/jobs | |
!/jobs/* | |
!/jobs/*/*.xml | |
/jobs/*/disk-usage.xml | |
/jobs/*/builds |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Convert any YouTube video into an audio file you can listen to on the go, using: | |
# http://rg3.github.com/youtube-dl/ | |
{ ~ } > brew install ffmpeg | |
{ ~ } > wget https://raw.github.com/rg3/youtube-dl/2012.02.27/youtube-dl | |
{ ~ } > chmod u+x youtube-dl | |
# Pick which video format you want to download.. (use any YT video link) | |
{ ~ } > ./youtube-dl -s -F http://www.youtube.com/watch?v=vT1KmTQ-1Os |