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
echo '{ | |
"handlers": ["debug"], | |
"name": "push_woot_test", | |
"output": "woot!", | |
"status": 1 | |
}' | nc -w1 127.0.0.1 3030 |
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
domain = "*.example.com" | |
subjectAltDomains = [ domain, "example.com" ] | |
require 'openssl' | |
puts "Generating public and private keys..." | |
key = OpenSSL::PKey::RSA.new(2048) | |
subject = "/C=US/ST=California/L=Los Angeles/O=Example Inc./CN=#{domain}" | |
cert = OpenSSL::X509::Certificate.new |
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
# ~/.tmux.conf | |
# | |
# See the following files: | |
# | |
# /opt/local/share/doc/tmux/t-williams.conf | |
# /opt/local/share/doc/tmux/screen-keys.conf | |
# /opt/local/share/doc/tmux/vim-keys.conf | |
# | |
# URLs to read: | |
# |
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
# Compare the run list of two chef nodes. | |
% diff <(knife node show bourbon -r) <(knife node show barkeep.int.housepub.org -r) | |
3,4c3,8 | |
< "recipe[workstation]", | |
< "recipe[users]" | |
--- | |
> "role[base]", | |
> "role[production]", | |
> "role[dnsserver]", |
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 'rubygems' | |
require 'merb-core' | |
require 'chef' | |
Chef::Config.from_file(File.join("/etc", "chef", "server.rb")) | |
Merb::Config.setup(:merb_root => File.expand_path(File.dirname(__FILE__)), | |
:environment => ENV['RACK_ENV'], | |
:fork_for_class_load => false, | |
:init_file => File.dirname(__FILE__) / "config/init.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
class Chef | |
module Mixin | |
module Language | |
# esearch(:node, 'role\[admin\]') | |
# recursively search for this role/recipe in all roles | |
def esearch(context, search) | |
if context == :role | |
ret = [] | |
# First solve all roles: | |
roles = search(:role, search) |
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 | |
# Demo how your can merge opscode chef-repo & cookbooks | |
# and perm. keep up to date with opscode cookbooks (the last "git" cmd) | |
% git clone git://github.com/opscode/chef-repo.git | |
Initialized empty Git repository in /home/tim/src/chef-repo/.git/ | |
remote: Counting objects: 107, done. | |
remote: Compressing objects: 100% (99/99), done. | |
remote: Total 107 (delta 45), reused 0 (delta 0) | |
Receiving objects: 100% (107/107), 16.14 KiB, done. | |
Resolving deltas: 100% (45/45), done. |
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
# | |
# Cookbook Name:: delayed_job | |
# Recipe:: default | |
# | |
if ['solo', 'app', 'app_master'].include?(node[:instance_role]) | |
# be sure to replace "app_name" with the name of your application. | |
run_for_app("maloca") do |app_name, data| | |
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
This is a short collection of resources I have used in packaging Chef for Debian. | |
Good starting point, links to some of the other pages here: | |
* http://www.xs4all.nl/~carlo17/howto/debian.html | |
Debian New Maintainers guide: | |
* http://www.debian.org/doc/maint-guide/ |
NewerOlder