Skip to content

Instantly share code, notes, and snippets.

View mguterl's full-sized avatar

Mike Guterl mguterl

View GitHub Profile
#!/bin/sh
# Shell script to install your public key on a remote machine
# Takes the remote machine name as an argument.
# Obviously, the remote machine must accept password authentication,
# or one of the other keys in your ssh-agent, for this to work.
ID_FILE="${HOME}/.ssh/id_dsa.pub"
if [ "-i" = "$1" ]; then
service "sshd" do
supports :restart => true
end
template "/etc/ssh/sshd_config" do
source "sshd_config.erb"
cookbook "sshd_config"
mode "0644"
notifies :restart, resources(:service => "sshd")
end
name "redis"
description "Role for configuring redis instances."
run_list(
"recipe[ufw][databag]",
"recipe[redis2][default_instance]")
override_attributes("redis2" => { "install_from" => "source" })
make PREINCFLAGS='-I/opt/local/include' PRELIBS='-L/opt/local/lib -Wl,-rpath,/Users/michaelguterl/.rvm/rubies/ree-1.8.7-2011.03/lib -L/Users/michaelguterl/.rvm/rubies/ree-1.8.7-2011.03/lib -lsystem_allocator'
./ext/purelib.rb:2: [BUG] Segmentation fault
ruby 1.8.7 (2011-02-18 patchlevel 334) [i686-darwin11.0.0], MBARI 0x6770, Ruby Enterprise Edition 2011.03
make: *** [.rbconfig.time] Abort trap: 6
class Stuff < Struct.new(:name, :color)
def initialize(attributes = {})
attributes.each do |attribute, value|
send("#{attribute}=", value)
end
end
end
Marshal.load(Marshal.dump(Stuff.new(:name => "bob", :color => "purple")))
user = create_user :first_name => "Steve", :last_name => "Richert"
users = fetch_users
# pick your poison
users.size.should == 1
users.should have(1).item
users.first.should == {
"id" => user.id,
michaelguterl@pangaea ~$ type rvm | head -1
rvm is a function
michaelguterl@pangaea ~$ rvm info
system:
system:
uname: "Darwin pangaea.local 10.7.4 Darwin Kernel Version 10.7.4: Mon Apr 18 21:24:17 PDT 2011; root:xnu-1504.14.12~3/RELEASE_X86_64 x86_64"
bash: "/usr/local/bin/bash => GNU bash, version 4.2.10(2)-release (i386-apple-darwin10.7.0)"
zsh: "/bin/zsh => zsh 4.3.9 (i386-apple-darwin10.0)"
describe JobSearch do
context 'units' do
before do
Sunspot.session = SunspotMatchers::SunspotSessionSpy.new(Sunspot.session)
end
after do
Sunspot.session = Sunspot.session.original_session
end
michaelguterl@carini ~/code/rm/forks/action_mailer_verp[rails3-upgrade*]$ rake
(in /Users/michaelguterl/code/rm/forks/action_mailer_verp)
Missing some dependencies. Install them with the following commands:
gem install rspec --version "~> 2.5.0"
Run the specified gem commands before trying to run this again: /Users/michaelguterl/.rvm/gems/ree-1.8.7-2010.02/bin/rake
michaelguterl@carini ~/code/rm/forks/action_mailer_verp[rails3-upgrade*]$ gem install rspec --version "~> 2.5.0"
Successfully installed rspec-2.5.0
1 gem installed
Psych::SyntaxError: couldn't parse YAML at line 14 column 13
/Users/michaelguterl/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/psych.rb:148:in `parse'
/Users/michaelguterl/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/psych.rb:148:in `parse_stream'
/Users/michaelguterl/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/psych.rb:119:in `parse'
/Users/michaelguterl/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/psych.rb:106:in `load'
/Users/michaelguterl/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/psych.rb:205:in `load_file'
/Users/michaelguterl/.rvm/gems/ruby-1.9.2-p136@global/gems/i18n-0.5.0/lib/i18n/backend/base.rb:170:in `load_yml'
/Users/michaelguterl/.rvm/gems/ruby-1.9.2-p136@global/gems/i18n-0.5.0/lib/i18n/backend/base.rb:156:in `load_file'
/Users/michaelguterl/.rvm/gems/ruby-1.9.2-p136@global/gems/i18n-0.5.0/lib/i18n/backend/base.rb:15:in `block in load_translations'
/Users/michaelguterl/.rvm/gems/ruby-1.9.2-p136@global/gems/i18n-0.5.0/lib/i18n/backend/base.rb:15:in `each'