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
# 9 workers and 1 master | |
worker_processes 9 | |
# Load rails+github.git into the master before forking workers | |
# for super-fast worker spawn times | |
preload_app true | |
# Restart any workers that haven't responded in 30 seconds | |
timeout 30 |
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
require 'merb-core' | |
require 'chef' | |
Chef::Config.from_file('/etc/chef/server.rb') | |
require 'chef/nanite' | |
require 'uuidtools' | |
Chef::Config[:nanite_identity] = "chef-#{UUIDTools::UUID.random_create.to_s}" | |
Chef::Nanite.in_event { Chef::Log.info "Nanite Booting..." } | |
time = 17 |
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
# ec2 ami-1515f67c | |
sudo sed -i 's/universe/multiverse universe/' /etc/apt/sources.list | |
sudo apt-get update | |
sudo apt-get install -y ruby ruby1.8-dev libopenssl-ruby1.8 rdoc ri irb build-essential wget ssl-cert rubygems git-core rake librspec-ruby libxml-ruby thin couchdb | |
sudo gem sources -a http://gems.opscode.com | |
sudo gem sources -a http://gemcutter.org # for nanite | |
sudo gem install cucumber merb-core nanite jeweler uuidtools json --no-ri --no-rdoc | |
mkdir ~/src | |
cd ~/src | |
git clone git://github.com/opscode/chef.git |
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
before_restart "stage 1" do | |
puts "hi we are executing stage 1..." | |
puts "stage 1 done" | |
end | |
before_restart "stage 2" do | |
puts "hi we are executing stage 2..." | |
puts "stage 2 done" | |
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
ruby_block "fire that shit up dawg" do | |
block do | |
fork do | |
fork do | |
exec "chef-solo zzzzzzzzzzz" | |
exit | |
end | |
exit | |
end | |
Chef::Application.fatal! "oh snap", 1 |
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
# ec2 ami-1515f67c | |
sudo sed -i 's/universe/multiverse universe/' /etc/apt/sources.list | |
sudo apt-get update | |
sudo apt-get install -y ruby ruby1.8-dev libopenssl-ruby1.8 rdoc ri irb build-essential wget ssl-cert rubygems git-core rake librspec-ruby libxml-ruby thin couchdb zlib1g-dev libxml2-dev | |
sudo gem sources -a http://gems.opscode.com | |
sudo gem install cucumber merb-core jeweler uuidtools json libxml-ruby --no-ri --no-rdoc | |
mkdir ~/src | |
cd ~/src | |
git clone git://github.com/opscode/chef.git | |
git clone git://github.com/opscode/ohai.git |
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
~$ ARCHFLAGS='-arch i386 -arch x86_64' | |
~$ rvm install 1.8.7 --debug --reconfigure -C --enable-shared=yes | |
~$ wget http://sourceforge.net/projects/rubycocoa/files/RubyCocoa/1.0.0/RubyCocoa-1.0.0.tar.gz/download | |
~$ tar xzf RubyCocoa-1.0.0.tar.gz && rm RubyCocoa-1.0.0.tar.gz && cd RubyCocoa-1.0.0 | |
~/RubyCocoa-1.0.0$ ruby install.rb config --build-universal=yes | |
~/RubyCocoa-1.0.0$ ruby install.rb setup | |
~/RubyCocoa-1.0.0$ sudo ruby install.rb install |
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
# Apple Binary Property List serializer for Ruby 1.8. | |
require 'iconv' | |
module AppleBinaryPropertyList | |
MIME_TYPE = 'application/octet-stream' # Don't know what to use, so use a very generic type for now | |
CFData = Struct.new(:data) # For marking strings as binary data which will be decoded as a CFData object | |
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
I've been fighting the same problem and have to say the hint provided here about resetting the launch services, and letting `launchd` do this at login (via Lingon) is invaluable. Thanks a lot for that, it makes FileVault far more usable! | |
After using this for a while, I have however discovered a side effect of resetting the launch services that is rather annoying--but I have also found a solution for it. | |
The _problem_ is that after resetting the launch services, calling a protocol handler registered by a user installed application is considered a **first time call** again, meaning it needs to be confirmed by the user (unless the app has been started directly before the call). Examples I stumbled upon are: | |
* bookmarking through the Pukka bookmarklet | |
* opening an Evernote note from a Spotlight search | |
* calling a `man` page in Safari through Bwana. |
OlderNewer