Skip to content

Instantly share code, notes, and snippets.

View Zhann's full-sized avatar

Steven De Coeyer Zhann

View GitHub Profile
Generated at 2013-03-07 13:20:42 +0100
NoMethodError: undefined method `reset_defaults_and_overrides' for #<Hash:0x00000002d80368>
/usr/lib/ruby/gems/1.9.1/gems/chef-10.16.2/lib/chef/client.rb:251:in `build_node'
/usr/lib/ruby/gems/1.9.1/gems/chef-10.16.2/lib/chef/client.rb:412:in `do_run'
/usr/lib/ruby/gems/1.9.1/gems/chef-10.16.2/lib/chef/client.rb:176:in `run'
/usr/lib/ruby/gems/1.9.1/gems/chef-10.16.2/lib/chef/application.rb:140:in `run_chef_client'
/usr/lib/ruby/gems/1.9.1/gems/chef-10.16.2/lib/chef/application/client.rb:274:in `block in run_application'
/usr/lib/ruby/gems/1.9.1/gems/chef-10.16.2/lib/chef/application/client.rb:267:in `loop'
/usr/lib/ruby/gems/1.9.1/gems/chef-10.16.2/lib/chef/application/client.rb:267:in `run_application'
/usr/lib/ruby/gems/1.9.1/gems/chef-10.16.2/lib/chef/application.rb:72:in `run'
@Zhann
Zhann / gist:5088994
Last active December 14, 2015 12:48
action :create do
vhost :create
vhost_link_to_enabled :create
logdir :create
end
action :modify do
#...
end
[color]
branch = auto
diff = auto
status = auto
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
module ActiveRecord
class Base
def self.random
if (c = count) != 0
find(:first, :offset =>rand(c))
end
end
end
end
alias dog='dig +short'
dug() { dig +short -x $(dig +short $1) }
whatserver() { curl -Is $1 | ack server | cut -f 2 -d " " }