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
if (-f $document_root/cache$uri) { | |
rewrite (.*) /cache$1 break; | |
} |
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
test |
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
def f(ra,n) | |
r=0 | |
ra.each {|x| r+=1 if x.include? n} | |
r | |
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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'daemons' | |
workling = File.join(File.dirname(__FILE__), '..', 'vendor', 'plugins', 'workling', 'script', 'listen.rb') | |
options = { | |
:app_name => "workling", | |
:ARGV => ARGV, | |
:dir_mode => :normal, | |
:dir => File.join(File.dirname(__FILE__), '..', 'log'), |
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
- if @items | |
- @items.reject { |item| item[/views\/controls\/(hide-.*|index).haml/] }.each do |name| | |
%p do some stuff |
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
0 [Time 1250469127] [Message System SafeSleep | |
hibernate_page_list_setall start | |
hibernate_page_list_setall time: 171 ms | |
pages 471790, wire 124924, act 180813, inact 18, spec 6, zf 0, throt 1482, could discard act 44167 inact 27311 purgeable 18574 spec 74495 | |
hibernate_page_list_setall found pageCount 307243 | |
IOHibernatePollerOpen, ml_get_interrupts_enabled 0 | |
IOHibernatePollerOpen(0) | |
writing 306047 pages | |
image1Size 166038016 | |
all time: 11786 ms, comp time: 1871 ms, deco time: 0 ms, |
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
>> yaml = StandardError.new("foo").to_yaml | |
=> "--- !ruby/exception:StandardError \nmessage: foo\n" | |
>> error = YAML.load(yaml) | |
=> #<StandardError: StandardError> | |
>> error.message | |
=> "StandardError" | |
>> error.to_yaml | |
=> "--- !ruby/exception:StandardError \nmessage: StandardError\nmesg: foo\n" |
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
rabbit_stew do |stew| | |
stew.fanout :bar, :queue => 'foo' | |
stew.direct :baz, :queue => 'wee' | |
stew.topic :wah do |topic| | |
topic.key "faz.*", :queue => 'wee' | |
end | |
queue :foo do | |
puts "im the foo queue. I handle the bar fanout for now." | |
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 NilClass | |
def id | |
rand(999999999) | |
end | |
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
gem = gem_package "gem" do | |
action :nothing | |
end | |
gem.run_action(:install) | |
Gem.clear_paths | |
require 'gem' | |
# shorthand |
OlderNewer