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
deploy_resource = deploy_revision "/var/www" do | |
[..snip..] | |
end | |
ruby_block "activate deploy" do | |
block do | |
Dir.chdir("/var/www/shared/cached-copy") | |
activated = File.basename( File.readlink( "/var/www/current" )) == | |
`git rev-parse HEAD`.strip | |
if !activated |
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
execute "install somepackage" do | |
command "yum -y install somepackage" | |
not_if "yum list installed somepackage | grep someversion" | |
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
/Users/dje/.rvm/gems/ruby-1.9.2-p180/gems/chef-0.10.0.beta.3/lib/chef/knife/cookbook_site_vendor.rb:74:in `run': uninitialized constant Chef::Mixin::Command (NameError) | |
from /Users/dje/.rvm/gems/ruby-1.9.2-p180/gems/chef-0.10.0.beta.3/lib/chef/knife.rb:157:in `run' | |
from /Users/dje/.rvm/gems/ruby-1.9.2-p180/gems/chef-0.10.0.beta.3/lib/chef/application/knife.rb:119:in `run' | |
from /Users/dje/.rvm/gems/ruby-1.9.2-p180/gems/chef-0.10.0.beta.3/bin/knife:25:in `<top (required)>' | |
from /Users/dje/.rvm/gems/ruby-1.9.2-p180/bin/knife:19:in `load' | |
from /Users/dje/.rvm/gems/ruby-1.9.2-p180/bin/knife:19:in `<main>' |
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
knife node show somenode -r | |
/Users/dje/.rvm/gems/ruby-1.9.2-p180/gems/chef-0.10.0.beta.1/lib/chef/knife/ui.rb:118:in `format_for_display': uninitialized constant Chef::DataBagItem (NameError) | |
from /Users/dje/.rvm/gems/ruby-1.9.2-p180/gems/chef-0.10.0.beta.1/lib/chef/knife/node_show.rb:57:in `run' | |
from /Users/dje/.rvm/gems/ruby-1.9.2-p180/gems/chef-0.10.0.beta.1/lib/chef/knife.rb:157:in `run' | |
from /Users/dje/.rvm/gems/ruby-1.9.2-p180/gems/chef-0.10.0.beta.1/lib/chef/application/knife.rb:119:in `run' | |
from /Users/dje/.rvm/gems/ruby-1.9.2-p180/gems/chef-0.10.0.beta.1/bin/knife:25:in `<top (required)>' | |
from /Users/dje/.rvm/gems/ruby-1.9.2-p180/bin/knife:19:in `load' | |
from /Users/dje/.rvm/gems/ruby-1.9.2-p180/bin/knife:19:in `<main>' |
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
$ knife cookbook list | |
Showing latest versions. Use --show-all to list all available versions. | |
/Users/dje/.rvm/gems/ruby-1.9.2-p180/gems/chef-0.10.0.beta.1/lib/chef/knife.rb:416:in `rest': uninitialized constant Chef::REST (NameError) | |
from /Users/dje/.rvm/gems/ruby-1.9.2-p180/gems/chef-0.10.0.beta.1/lib/chef/knife/cookbook_list.rb:43:in `run' | |
from /Users/dje/.rvm/gems/ruby-1.9.2-p180/gems/chef-0.10.0.beta.1/lib/chef/knife.rb:157:in `run' | |
from /Users/dje/.rvm/gems/ruby-1.9.2-p180/gems/chef-0.10.0.beta.1/lib/chef/application/knife.rb:119:in `run' | |
from /Users/dje/.rvm/gems/ruby-1.9.2-p180/gems/chef-0.10.0.beta.1/bin/knife:25:in `<top (required)>' | |
from /Users/dje/.rvm/gems/ruby-1.9.2-p180/bin/knife:19:in `load' | |
from /Users/dje/.rvm/gems/ruby-1.9.2-p180/bin/knife:19:in `<main>' |
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
"Why should a financial engineer be paid 4 to 100 times more than a real engineer? A real engineer builds bridges. A financial engineer builds dreams. When those dreams turn out to be nightmares other people pay for it." | |
-- Andrew Sheng, China Banking Regulatory Commission |
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
No. Time Source Destination Protocol Info | |
213 1819.711144 173.255.232.227 192.168.1.2 HTTP HTTP/1.1 201 Created (application/json) | |
Frame 213: 1203 bytes on wire (9624 bits), 1203 bytes captured (9624 bits) | |
Ethernet II, Src: AppleCom_f3:cd:d5 (00:1b:63:f3:cd:d5), Dst: AppleCom_99:72:75 (00:1b:63:99:72:75) | |
Internet Protocol, Src: 173.255.232.227 (173.255.232.227), Dst: 192.168.1.2 (192.168.1.2) | |
Transmission Control Protocol, Src Port: http (80), Dst Port: 54688 (54688), Seq: 1, Ack: 251, Len: 1137 | |
Hypertext Transfer Protocol | |
HTTP/1.1 201 Created\r\n | |
Server: nginx/0.7.65\r\n |
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
$ export FOG_MOCK=false && bundle exec shindo tests/dns/requests/dnsimple | |
Skipping tests for terremarkecloud due to lacking credentials (add some to '~/.fog' to run them) | |
DNSimple::dns | DNS requests (dnsimple, dns) | |
success | |
+ get current zone count | |
- create zone | |
undefined method `>' for nil:NilClass (Excon::Errors::SocketError) | |
/Users/dje/.rvm/gems/ruby-1.9.2-p180/gems/excon-0.5.6/lib/excon/response.rb:59:in `parse' | |
/Users/dje/.rvm/gems/ruby-1.9.2-p180/gems/excon-0.5.6/lib/excon/connection.rb:120:in `request' |
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
files = directory.files.all | |
truncated = files.is_truncated | |
while truncated | |
set = directory.files.all( :marker => files.last.key ) | |
truncated = set.is_truncated | |
files = files + set | |
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
require 'rubygems' | |
require 'chef' | |
require 'fog' | |
require 'google_spreadsheet' | |
Chef::Config.from_file("~/.chef/knife.rb") | |
ec2 = Fog::AWS::EC2.new(:aws_access_key_id => ENV["AWS_KEY"], | |
:aws_secret_access_key => ENV["AWS_SECRET"] ) |