⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
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
/Product/WebClient/Desktop/Rails/releases/1f22d10234dd63b3f59701dba95fbf152c4cfc38/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:374:in `retrieve_connection': ActiveRecord::ConnectionNotEstablished (ActiveRecord::ConnectionNotEstablished) | |
from /Product/WebClient/Desktop/Rails/releases/1f22d10234dd63b3f59701dba95fbf152c4cfc38/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.1/lib/active_record/connection_adapters/abstract/connection_specification.rb:168:in `retrieve_connection' | |
from /Product/WebClient/Desktop/Rails/releases/1f22d10234dd63b3f59701dba95fbf152c4cfc38/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.1/lib/active_record/connection_adapters/abstract/connection_specification.rb:142:in `connection' | |
from /Product/WebClient/Desktop/Rails/releases/1f22d10234dd63b3f59701dba95fbf152c4cfc38/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.1/lib/active_record/model_schema.rb:228:in `columns' | |
from /Product/WebClient/Desktop/Rails/releases/1f22d102 |
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 plugin to set an attribute on the node | |
# Usage: | |
# $knife node exec [nodename] 'node.set[:somevalue] = true' | |
class NodeExec < Chef::Knife | |
banner "knife node exec NODE CODE (options)" | |
deps do | |
require 'chef/search/query' | |
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 'faraday_middleware' | |
require 'hashie/mash' | |
# Public: GeoIP service using freegeoip.net | |
# | |
# See https://github.com/fiorix/freegeoip#readme | |
# | |
# Examples | |
# | |
# res = GeoipService.new.call '173.194.64.19' |
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
{ | |
"auto_complete_delay": 100, | |
"caret_style": "blink", | |
"color_scheme": "Packages/Color Scheme - Default/Twilight.tmTheme", | |
"draw_minimap_border": false, | |
"ensure_newline_at_eof_on_save": false, | |
"font_face": "Monaco", | |
"font_size": 15.0, | |
"highlight_line": true, | |
"file_exclude_patterns": |
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-107-20-189-224.compute-1.amazonaws.com Unpacking chef (from .../tmp/chef-full_10.12.0_i386.deb) ... | |
ec2-107-20-189-224.compute-1.amazonaws.com | |
ec2-107-20-189-224.compute-1.amazonaws.com Setting up chef (10.12.0-1.ubuntu.11.04) ... | |
ec2-107-20-189-224.compute-1.amazonaws.com | |
ec2-107-20-189-224.compute-1.amazonaws.com Thank you for installing Chef! | |
ec2-107-20-189-224.compute-1.amazonaws.com | |
ec2-107-20-189-224.compute-1.amazonaws.com Processing triggers for initramfs-tools ... | |
ec2-107-20-189-224.compute-1.amazonaws.com | |
ec2-107-20-189-224.compute-1.amazonaws.com update-initramfs: Generating /boot/initrd.img-3.2.0-27-virtual | |
ec2-107-20-189-224.compute-1.amazonaws.com |
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 ssh -m 107.20.189.224 "sudo chef-client -l debug" --no-host-key-verify -x ubuntu -i ~/.ssh/secret.pem | |
107.20.189.224 /usr/local/lib/ruby/gems/1.9.1/gems/systemu-2.2.0/lib/systemu.rb:29: Use RbConfig instead of obsolete and deprecated Config. | |
107.20.189.224 | |
107.20.189.224 [Wed, 08 Aug 2012 17:03:29 +0000] INFO: *** Chef 10.12.0 *** | |
107.20.189.224 | |
107.20.189.224 [Wed, 08 Aug 2012 17:03:29 +0000] DEBUG: Loading plugin os | |
107.20.189.224 | |
107.20.189.224 [Wed, 08 Aug 2012 17:03:29 +0000] DEBUG: Loading plugin kernel | |
107.20.189.224 | |
107.20.189.224 [Wed, 08 Aug 2012 17:03:29 +0000] DEBUG: Loading plugin ruby |
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 "uri" | |
(URI::REGEXP.constants - ["PATTERN"]).each do |rc| | |
puts "#{rc}: #{URI::REGEXP.const_get(rc)}" | |
end | |
URI::REGEXP::PATTERN.constants.each do |pc| | |
puts "#{pc}: #{URI::REGEXP::PATTERN.const_get(pc)}" | |
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
#!/bin/sh | |
die () { | |
echo >&2 "$@" | |
exit 1 | |
} | |
available_configs () { | |
echo "Available configs:" | |
ls -A ~ | grep .chef- | sed 's/.chef-//' | |
} |
Here is an example shared configuration for knife. You can drop this off in your chef-repo/.chef/ directory, and multiple developers can use the same knife configuration to interact with more than one Chef server, or the Opscode platform.
By using Bash functions and environment variables we can change the chef server, which knife is configured to use, on the fly.
NOTE: knife will probably ignore your ~/.chef/knife.rb once you begin using a shared knife.rb in your chef-repo directory.
Preparation