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
| Generated at 2011-10-28 19:27:20 +0000 | |
| NoMethodError: undefined method `firewall' for #<Chef::Recipe:0x00000004d64288> | |
| /usr/lib/ruby/gems/1.9.1/gems/chef-0.10.4/lib/chef/mixin/recipe_definition_dsl_core.rb:56:in `method_missing' | |
| /var/chef/cache/cookbooks/frodo/recipes/default.rb:28:in `from_file' | |
| /usr/lib/ruby/gems/1.9.1/gems/chef-0.10.4/lib/chef/mixin/from_file.rb:30:in `instance_eval' | |
| /usr/lib/ruby/gems/1.9.1/gems/chef-0.10.4/lib/chef/mixin/from_file.rb:30:in `from_file' | |
| /usr/lib/ruby/gems/1.9.1/gems/chef-0.10.4/lib/chef/cookbook_version.rb:578:in `load_recipe' | |
| /usr/lib/ruby/gems/1.9.1/gems/chef-0.10.4/lib/chef/mixin/language_include_recipe.rb:40:in `block in include_recipe' | |
| /usr/lib/ruby/gems/1.9.1/gems/chef-0.10.4/lib/chef/mixin/language_include_recipe.rb:27:in `each' | |
| /usr/lib/ruby/gems/1.9.1/gems/chef-0.10.4/lib/chef/mixin/language_include_recipe.rb:27:in `include_recipe' |
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 Content | |
| #has all your junk | |
| end | |
| module ContentFooBar | |
| def foobar | |
| puts 'hello!' | |
| end | |
| 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
| module ContentAllChildrenMethods | |
| def all_my_children | |
| kids = [] | |
| children.each do |child| | |
| kids << child | |
| kids << child.all_my_children | |
| end | |
| kids.flatten | |
| end | |
| 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
| hef-stacktrace.out Generated at Thu Dec 01 10:11:15 -0500 2011 | |
| Chef::Exceptions::Exec: homebrew[tig] (homebrew::misc line 12) had an error: /Users/hankbeaver/Developer/bin/brew info tig | grep -q "Not installed"; if [ $? -eq 0 ]; then /usr/bin/env HOMEBREW_TEMP=/Users/hankbeaver/Developer/tmp /Users/hankbeaver/Developer/bin/brew install tig; fi returned 1, expected 0 | |
| /Library/Ruby/Gems/1.8/gems/chef-0.10.4/bin/../lib/chef/mixin/command.rb:185:in `handle_command_failures' | |
| /Library/Ruby/Gems/1.8/gems/chef-0.10.4/bin/../lib/chef/mixin/command.rb:132:in `run_command' | |
| /Library/Ruby/Gems/1.8/gems/chef-0.10.4/bin/../lib/chef/mixin/command.rb:200:in `run_command_with_systems_locale' | |
| /Users/hankbeaver/.cinderella/cookbooks/homebrew/providers/homebrew.rb:33:in `run_brew_command' | |
| /Users/hankbeaver/.cinderella/cookbooks/homebrew/providers/homebrew.rb:23:in `install_package' | |
| /Library/Ruby/Gems/1.8/gems/chef-0.10.4/bin/../lib/chef/provider/package.rb:60:in `action_install' | |
| /Library/Ruby/Gems/1.8/gems/chef-0.10.4/bin/../lib |
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
| Resources: | |
| http://rhnh.net/2011/08/20/vim-and-tmux-on-osx | |
| https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard | |
| http://vim.wikia.com/wiki/Mac_OS_X_clipboard_sharing#Comments | |
| 1. Add mouse support in #1 blog. | |
| 2. Install the bin from #2 blog and follow directions. I use 'bash' so replace 'zsh' in config. | |
| 3. Add set clipboard=unnamed to vimrc/vimrc.local |
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
| :args spec/*/* | |
| :argdo %s/\(.*any_instance.*\)\(stubs\)\(.*\)\(returns\)\(.*\)/\1stub\3and_return\5/ge | update |
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
| SELECT table_schema "Data Base Name", SUM( data_length + index_length) / 1024 / 1024 | |
| "Data Base Size in MB" FROM information_schema.TABLES GROUP BY table_schema ; |
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
| Resque.redis.smembers('workers').each {|k| Resque.redis.srem 'workers', k.to_s } |
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
| Resque.redis.del 'queue:conversions' | |
| Resque.redis.del 'queue:statistics' | |
| #Clear all workers from Redis to ensure no worker creep | |
| Resque.redis.smembers('workers').each{|w| Resque.redis.srem 'workers',w} | |
| #Inspecting error types and histogram of counts: | |
| failed_hash = (Resque.redis.lrange :failed, 1,473).collect{|ea| JSON.load ea};p nil | |
| histogram = {} | |
| failed_hash.each { |item| histogram[item["exception"]] = (histogram[item["exception"]] || 0) +1 };p nil |
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
| #Forking view of ps | |
| ps axjf | |
| # inspect a single process | |
| ps -p 20673 -F |