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
## Knife plugin to set node environment | |
# See http://wiki.opscode.com/display/chef/Environments | |
# | |
## Install | |
# Place in .chef/plugins/knife/set_environment.rb | |
# | |
## Usage | |
# Nick-Stielaus-MacBook-Pro:chef-repo nstielau$ knife node set_environment mynode.net my_env | |
# Looking for mynode.net | |
# Setting environment to my_env |
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 Chef::Provider::Service::Launchd < Chef::Provider::Service::Simple | |
LAUNCHCTL_FORMAT = /([\d-]+)\s+([\d-]+)\s+([[:print:]]+)/ | |
def initialize(new_resource, run_context) | |
raise ArgumentError, "run_context cannot be nil" unless run_context | |
super | |
run_context.node | |
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
HTTP/1.1 200 ... | |
Server: nginx/0.7.65 | |
Date: Wed, 12 Jan 2011 23:59:05 GMT | |
Content-Type: text/html | |
Transfer-Encoding: chunked | |
Connection: keep-alive | |
Content-Encoding: gzip | |
Transfer-Encoding: chunked | |
Vary: Accept-Encoding |
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
#!/usr/bin/env ruby | |
require 'jruby/vm' | |
vms = [] | |
queue = 'background_tasks_LP' | |
instance_count = 30 | |
Signal.trap('HUP') { vms.map(&:join) } |
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
g++ -DPACKAGE_NAME=\"scribe\" -DPACKAGE_TARNAME=\"scribe\" -DPACKAGE_VERSION=\"1.5.0\" -DPACKAGE_STRING=\"scribe\ 1.5.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"scribe\" -DVERSION=\"1.5.0\" -DHAVE_BOOST= -DHAVE_BOOST_SYSTEM= -DHAVE_BOOST_FILESYSTEM= -I. -I.. -I/usr/local/include -I/usr/local/include/thrift -I/usr/local/include/thrift -I/usr/local/include/thrift/fb303 -I/usr/local/include -I/usr/include -Wall -O3 -MT store.o -MD -MP -MF .deps/store.Tpo -c -o store.o store.cpp | |
In file included from env_default.h:24, | |
from common.h:57, | |
from store.cpp:28: | |
/usr/local/include/thrift/server/TNonblockingServer.h:33:19: error: event.h: No such file or directory | |
In file included from env_default.h:24, | |
from common.h:57, | |
from store.cpp:28: | |
/usr/local/include/thrift/server/TNonblockingServer.h:93: error: expected ‘;’ before ‘*’ token |
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 'dm-core' | |
require 'dm-timestamps' | |
DataMapper.setup(:default, "sqlite3:///#{Dir.pwd}/test.db") | |
class User | |
include DataMapper::Resource | |
property :id, Serial |
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 'gserver' | |
require 'rubygems' | |
require 'xmpp4r' | |
require 'xmpp4r/roster' | |
require 'daemons' | |
JABBER_USER = '[email protected]' | |
JABBER_PASS = 'secret' | |
EMAIL_DOMAIN = 'domain.com' |
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
/opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/gems/1.8/gems/bluepill-0.0.15/bin/../lib/bluepill/application.rb:136:in `send_to_server': undefined local variable or method `buffer' for #<Bluepill::Application:0x9a7e9b0> (NameError) | |
from /opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/gems/1.8/gems/bluepill-0.0.15/bin/../lib/bluepill/application.rb:73:in `status' | |
from /opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/gems/1.8/gems/bluepill-0.0.15/bin/../lib/bluepill/controller.rb:35:in `send' | |
from /opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/gems/1.8/gems/bluepill-0.0.15/bin/../lib/bluepill/controller.rb:35:in `send_cmd' | |
from /opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/gems/1.8/gems/bluepill-0.0.15/bin/bluepill:59 | |
from /opt/ree/bin/bluepill:19:in `load' | |
from /opt/ree/bin/bluepill:19 |
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
/opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/gems/1.8/gems/bluepill-0.0.15/bin/../lib/bluepill/application.rb:15:in `initialize': undefined method `+' for nil:NilClass (NoMethodError) | |
from /opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/gems/1.8/gems/bluepill-0.0.15/bin/../lib/bluepill/controller.rb:34:in `new' | |
from /opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/gems/1.8/gems/bluepill-0.0.15/bin/../lib/bluepill/controller.rb:34:in `send_cmd' | |
from /opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/gems/1.8/gems/bluepill-0.0.15/bin/bluepill:59 | |
from /opt/ree/bin/bluepill:19:in `load' | |
from /opt/ree/bin/bluepill:19 |
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
# | |
# Ugly little script I used when I needed to generate an LDAP DB with 100k sample users | |
# | |
require 'rubygems' | |
require 'faker' | |
require 'active_ldap' | |
ActiveLdap::Base.establish_connection( | |
:host => '10.0.0.8', |