These instructions install ruby and rubygems from source, not from RPMs. For instructions on installing from RPMs, look at something like http://wiki.opscode.com/display/chef/Installation+on+RHEL+and+CentOS+5+with+RPMs or http://mykestubbs.com/blog/2010/03/chef-installation-on-centos-54.html
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
--- ext/readline/readline.c | |
+++ ext/readline/readline.c | |
@@ -1974,7 +1974,7 @@ Init_readline() | |
rl_attempted_completion_function = readline_attempted_completion_function; | |
#if defined(HAVE_RL_PRE_INPUT_HOOK) | |
- rl_pre_input_hook = (Function *)readline_pre_input_hook; | |
+ rl_pre_input_hook = (rl_hook_func_t *)readline_pre_input_hook; | |
#endif | |
#ifdef HAVE_RL_CATCH_SIGNALS |
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
# | |
# First create a provisioners group so the ACLs are all correct | |
# | |
chef_group 'provisioners' do | |
end | |
# To be able to recreate the provisioners group | |
chef_acl 'groups' do | |
rights :create, groups: 'provisioners' | |
end | |
# To be able to add others to the provisioners group |
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
module EventMachine | |
# A simple iterator for concurrent asynchronous work. | |
# | |
# Unlike ruby's built-in iterators, the end of the current iteration cycle is signaled manually, | |
# instead of happening automatically after the yielded block finishes executing. For example: | |
# | |
# (0..10).each{ |num| } | |
# | |
# becomes: | |
# |
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 | |
# Run iTerm.app once, quit & run script from Terminal.app | |
MONOKAI='{ | |
"Ansi 0 Color" = { | |
"Blue Component" = 0.0; | |
"Green Component" = 0.0; | |
"Red Component" = 0.0; | |
}; |
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
current_dir = File.dirname(__FILE__) | |
platform = "https://api.opscode.com/organizations" | |
require 'grit' | |
branch = Grit::Repo.new("#{current_dir}/..").head.name | |
case branch | |
when "internal" | |
url = "http://virt1test.int.example.org:4000" | |
validator = "" |
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 | |
require 'rubygems' | |
require 'chef' | |
require 'chef/client' | |
require 'chef/run_context' | |
Chef::Config[:solo] = true | |
Chef::Config[:log_level] = :info | |
Chef::Log.level(:info) |
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 | |
require 'rubygems' | |
require 'chef' | |
require 'chef/client' | |
require 'chef/run_context' | |
Chef::Config[:solo] = true | |
Chef::Config[:log_level] = :info | |
Chef::Log.level(:info) |
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' | |
require 'chef/node' | |
class Opscode | |
class Backup | |
attr_accessor :backup_dir | |
def initialize(backup_dir, config_file) | |
@backup_dir = backup_dir | |
Chef::Config.from_file(config_file) |
OlderNewer