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
#!/usr/bin/env ruby | |
# Use dot separated pathspec: | |
# ./cooto.rb mysql.datadir | |
# /var/lib/mysql | |
require 'rubygems' | |
require 'chef/client' | |
require 'ohai' |
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
class Chef | |
class Provider | |
class Package | |
class Rubygems | |
Chef::Log.info "Patch rubygems provider" | |
@@GEM_CACHE = {} | |
@@GEM_CACHE_TIMESTAMP = nil |
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
25/05 16:40 ~% export rvm_trace_flag=2 | |
25/05 16:41 ~% /Users/oct/.rvm/scripts/list | |
+ export rvm_trace_flag | |
++ echo '' | |
++ awk '{print $1}' | |
+ action= | |
+ [[ known = '' ]] | |
+ [[ default = '' ]] | |
+ [[ -z '' ]] | |
+ __rvm_list_rubies |
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
26/05 13:30 ~/.rvm% rvm debug | |
ruby-1.8.7-p249: | |
/Users/oct/.rvm/rubies/ruby-1.8.7-p249/bin/gem: line 3: /Users/oct/.rvm/rubies/ruby-1.8.7-p249/bin/gem: Argument list too long | |
/Users/oct/.rvm/rubies/ruby-1.8.7-p249/bin/gem: line 3: /Users/oct/.rvm/rubies/ruby-1.8.7-p249/bin/gem: Unknown error: 0 | |
rvm 0.1.33 by Wayne E. Seguin ([email protected]) [http://rvm.beginrescueend.com/] | |
ruby-1.8.7-p249: | |
system: | |
uname: "Darwin Fatland.local 10.3.0 Darwin Kernel Version 10.3.0: Fri Feb 26 11:58:09 PST 2010; root:xnu-1504.3.12~1/RELEASE_I386 i386 i386 MacPro4,1 Darwin" |
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
26/05 13:32 ~/.rvm% rvm info | |
ruby-1.8.7-p249: | |
system: | |
uname: "Darwin Fatland.local 10.3.0 Darwin Kernel Version 10.3.0: Fri Feb 26 11:58:09 PST 2010; root:xnu-1504.3.12~1/RELEASE_I386 i386 i386 MacPro4,1 Darwin" | |
shell: "bash" | |
version: "3.2.48(1)-release" | |
rvm: | |
type: "rvm is /Users/oct/.rvm/bin/rvm" |
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
PATH=/Users/oct/.rvm/bin:/Users/oct/.rvm/bin:/Users/oct/.rvm/gems/ruby-1.8.7-p249/bin:/Users/oct/.rvm/gems/ruby-1.8.7-p249@global/bin:/Users/oct/.rvm/rubies/ruby-1.8.7-p249/bin:/Users/oct/bin:/opt/local/bin:/opt/local/sbin:/Users/oct/dev/sk/skprod/dist/bin:/Users/oct/dev/ec2/ec2-api-tools-1.3-36506/bin:/Users/oct/.gem/ruby/1.8/bin:/opt/local/git/libexec/git-core:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin:/Users/oct/dev/ec2/ElasticLoadBalancing-1.0.1.23/bin:/Users/kali/dev/orahome/bin | |
TMPDIR=/var/folders/1i/1i92nDJLH-e-pN4GIO1Gck+++TI/-Tmp-/ | |
SHELL=/bin/zsh | |
HOME=/Users/oct | |
USER=oct | |
LOGNAME=oct | |
DISPLAY=/tmp/launch-4dBRIp/org.x:0 | |
SSH_AUTH_SOCK=/tmp/launch-2JNjXD/Listeners | |
Apple_PubSub_Socket_Render=/tmp/launch-baeq8j/Render | |
COMMAND_MODE=unix2003 |
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 'thread' | |
module Rack | |
class Middleware | |
# This middleware will kill long running requests | |
class SoftTimeout | |
def initialize(app, options = {}) | |
@app = app | |
@max_time = options[:max_time] || 50 | |
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
class Chef | |
class Node | |
# Recursively descend the Node run list and look for the "recipe" | |
# node.erun_list('recipe[accountr]') | |
# | |
def erun_list?(search, run_list=self.run_list ) | |
Chef::Log.debug("erun_list? for #{search} in #{run_list}.") | |
in_recipe = run_list.run_list.find { |r| r==search} | |
if in_recipe != nil | |
Chef::Log.debug("Found #{search} in base run_list (#{run_list.run_list})...") |
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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'redis' | |
class Subscriber | |
def initialize | |
end | |
def redis | |
Redis.new(:host => "redis.fotonauts.net", :port => 12430) |
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
# Redis configuration file | |
daemonize no | |
pidfile /var/run/redis-picor.pid | |
port 12430 | |
bind 0.0.0.0 | |
timeout 3000 | |
save 900 1 | |
save 300 10 | |
save 60 10000 | |
dbfilename redis-picor_state.rdb |
OlderNewer