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/ruby | |
# | |
# Joshua Sierles, 37signals, 2009 | |
require 'rubygems' | |
require 'thor' | |
require 'chef' | |
require 'chef/node' | |
require 'chef/rest' |
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 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
do shell script "xcode-select --install" | |
do shell script "sleep 1" | |
tell application "System Events" | |
tell process "Install Command Line Developer Tools" | |
keystroke return | |
click button "Agree" of window "License Agreement" | |
end tell | |
end tell |
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
[user] | |
name = Joshua Timberman | |
email = joshua@housepub.org | |
[color] | |
ui = true | |
diff = true | |
status = true | |
branch = true | |
interactive = true | |
[core] |
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
save-last-command() { | |
last_command=$(fc -nl 0) | |
command_name="$1" | |
read -r -d '' new_fun <<EOF | |
${command_name}() { | |
$last_command | |
} | |
EOF | |
eval "$new_fun" | |
} |
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 'chef/log' | |
require 'pry' | |
module ChefSoftware | |
class CookbookVersionsHandler < Chef::Handler | |
def report | |
Chef::Log.info('Pausing in handler to run pry; type "exit" to leave pry') | |
binding.pry | |
end |
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
task :classify_nodes do | |
@dns_names.each do |description| | |
description =~ /^(.+?)\..+$/ | |
hostname = $1 | |
node = @ic.get_node(hostname) | |
if exists?(:puppet_env) | |
EC2_DATA[:iclassify_attribs]["puppet_env"] = puppet_env | |
end | |
node.tags = EC2_DATA[:iclassify_tags] | |
EC2_DATA[:iclassify_attribs].each do |name, values| |
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 | |
# | |
# EC2 bootstrap | |
# | |
mkdir /etc/chef | |
mkdir /var/chef | |
cat > /etc/chef/solo.rb <<SOLO | |
cookbook_path "/var/chef/cookbooks" |
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
define :mysql_database, :action => 'create' do | |
def mysql(command, config=nil, ) | |
"mysql --defaults-file=#{config} --execute=#{command.inspect}" | |
end | |
include_recipe "mysql::client" | |
# For now, use the super-user conf | |
case @node[:platform] | |
when "debian", "ubuntu" |
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 TestCLI | |
include Mixlib::CLI | |
option :config_file, | |
:short => "-c CONFIG", | |
:long => "--config CONFIG", | |
:default => 'config.rb', | |
:description => "The configuration file to use" | |
option :log_level, |
OlderNewer