This file contains hidden or 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
| get '/:id' do | |
| @vent = Vent.get(params[:id]) | |
| erb :show | |
| end | |
| # show post | |
| get '/:id.xml' do | |
| @vent = Vent.get(params[:id]) | |
| builder :show | |
| end |
This file contains hidden or 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
| blake:chef$ ./bin/chef-client | |
| [Fri, 12 Dec 2008 13:18:36 -0800] INFO: Starting Chef Run | |
| /Users/blake/.gems/gems/chef-0.0.1/lib/chef/file_store.rb:59:in `load': Cannot find /var/chef/file_store/registration/8/d15/blake-mizeranys-macbook-air_local for registration blake-mizeranys-macbook-air_local! (RuntimeError) | |
| from /Users/blake/.gems/gems/chef-0.0.1/lib/chef/client.rb:159:in `register' | |
| from /Users/blake/.gems/gems/chef-0.0.1/lib/chef/client.rb:63:in `run' | |
| from ./bin/chef-client:88 | |
| blake:chef$ | |
This file contains hidden or 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
| # | |
| # Chef Client Config File | |
| # | |
| # Will be overwritten | |
| # | |
| log_level :info | |
| log_location STDOUT | |
| file_store_path "/var/chef/file_store" | |
| file_cache_path "/var/chef/cache" |
This file contains hidden or 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
| blake:chef$ ./bin/chef-client -l debug | |
| [Fri, 12 Dec 2008 14:36:52 -0800] INFO: Starting Chef Run | |
| [Fri, 12 Dec 2008 14:36:53 -0800] DEBUG: Building node object for blake-mizeranys-macbook-air_local | |
| [Fri, 12 Dec 2008 14:36:53 -0800] DEBUG: Sending HTTP Request via GET to /nodes/blake-mizeranys-macbook-air_local | |
| [Fri, 12 Dec 2008 14:36:53 -0800] DEBUG: Facter Attribute: sp_uptime - "up 0:13:20:20" | |
| [Fri, 12 Dec 2008 14:36:53 -0800] DEBUG: Facter Attribute: sp_packages - "1" | |
| [Fri, 12 Dec 2008 14:36:53 -0800] DEBUG: Facter Attribute: sp_kernel_version - "Darwin 9.5.2" | |
| [Fri, 12 Dec 2008 14:36:53 -0800] DEBUG: Facter Attribute: sp_mmm_entry - "MMM_stateMMM_enabled" | |
| [Fri, 12 Dec 2008 14:36:53 -0800] DEBUG: Facter Attribute: operatingsystemrelease - "9.5.2" | |
| [Fri, 12 Dec 2008 14:36:53 -0800] DEBUG: Facter Attribute: sp_boot_volume - "Macintosh HD" |
This file contains hidden or 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
| install("ruby", | |
| "ruby1.8", | |
| "libruby", | |
| "libruby1.8", | |
| "ruby1.8-dev", | |
| "irb1.8", | |
| "libreadline-ruby1.8", | |
| "rdoc1.8", | |
| "libzlib-ruby", | |
| "libopenssl-ruby", |
This file contains hidden or 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
| remote = Rush::Box.new('ec2-75-101-233-253.compute-1.amazonaws.com', | |
| :user => "root") | |
| remote.bash("ls") |
This file contains hidden or 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 App1 < Sinatra::Base | |
| set :views, "/path/to/views" | |
| set :public, "/path/to/static/files" | |
| def strong(text) | |
| "<strong>#{text}</strong>" | |
| end | |
| get '/' do | |
| strong "Hello World" |
This file contains hidden or 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
| recipe "SSH" do | |
| directory "~/.ssh" do | |
| mode 0700 | |
| end | |
| file "~/.ssh/authorized_keys" do | |
| mode 0600 | |
| write txt(:ssh_keys) | |
| end |
This file contains hidden or 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 'sinatra' | |
| class Bar < Sinatra::Base | |
| get "/" do | |
| "Hello world!" | |
| end | |
| end | |
| map "/foo" do |
This file contains hidden or 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
| host = lambda { FaceUtils.master_face_server } | |
| def host.to_str; self.call.to_s; end | |
| def host.to_s; self.call.to_s; end |