John Dewey retr0h

View gist:3808196
1 2 3 4 5 6
# In default.rb from cookbook being tested
# node.run_state['reboot'] = true
 
it "flags system to reboot" do
chef_run.node.run_state['reboot'].should_be true
end
View gist:3803315
1 2 3 4 5 6 7 8 9 10
Array.new.tap do |a|
# Break the directory into pieces for recursive creation.
# ["/opt", "MegaRAID", "MegaCli"]
parts = node['megaraidcli']['dir'].scan(/^\/(?:[a-zA-Z]+)|(?:[a-zA-Z]+)/)
 
parts.each do |parts|
a << parts
directory a.join(::File::SEPARATOR) do
owner "root"
group "root"
View gist:3101078
1 2 3 4 5 6 7 8 9 10
[2012-07-12T20:55:25+00:00] INFO: Chef Run complete in 6.78975371 seconds
[2012-07-12T20:55:25+00:00] INFO: Running report handlers
Run options: -v --seed 16402
 
# Running tests:
 
recipe::minitest_helper::user_for#test_0003_returns_octal_modes = 0.00 s = .
recipe::minitest_helper::user_for#test_0002_returns_the_proper_group = 0.00 s = .
recipe::minitest_helper::user_for#test_0001_returns_the_proper_user = 0.00 s = .
recipe::openssh-config::ssh_config#test_0004_binds_to_proper_port = 0.00 s = .
View gist:3088316
1 2 3 4 5 6 7 8 9 10
# screen like C-a vs C-b
unbind-key C-b
set-option -g prefix C-a
 
# screen like C-a a vs C-b l
bind-key C-a last-window
bind a send-prefix
 
# large history
set-option -g history-limit 100000
View gist:3045722
1 2 3 4 5 6 7 8 9 10
execute "update-grub" do
### always set even when not_if doesn't run caller.
### will grab node.run_state from custom_chef handler.
### but always set to true, even if grub wasn't modified.
node.run_state['reboot'] = true
 
action :nothing
end
 
execute "enabling GRUB_CMDLINE_LINUX in grub" do
View Gemfile
1 2 3 4 5 6
source "http://rubygems.org"
 
group :test, :development do
gem "rake", "~> 0.9.2.2"
gem "rye", "~> 0.9.5"
end
View gist:2223507
1 2 3 4 5 6 7 8 9 10
#!/usr/bin/env sh
 
MEGACLI=/opt/MegaRAID/MegaCli/MegaCli64
 
echo "#####"
hostname
 
echo "- LDInfo"
 
${MEGACLI} -LDInfo -LAll -aAll
View gist:2223264
1 2 3 4 5 6 7 8 9 10
#!/usr/bin/env sh
 
### Download and install megaraidcli;
FILE="megacli_8.02.16.orig.tar.gz"
LINK="http://hwraid.le-vert.net/ubuntu/sources/$FILE"
wget $LINK -O /tmp/$FILE
(
cd /tmp
View gist:2047502
1 2
ipmitool -H <IPMI_IP> -U root -P <IPMI_PASS> chassis bootdev pxe
ipmitool -H <IPMI_IP> -U root -P <IPMI PASS> chassis power reset
Something went wrong with that request. Please try again.