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 | |
module DSL | |
module DataQuery | |
# http://tickets.opscode.com/browse/CHEF-3832 | |
# Monkey patched so that search always returns nodes sorted by name | |
def search(*args, &block) | |
if Kernel.block_given? || args.length >= 4 | |
Chef::Search::Query.new.search(*args, &block) | |
else | |
results = Array.new |
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
# haproxy version: 1.4.23 2013/04/03 | |
# puma 2.0.1 | |
# os: Linux 3.8-2-amd64 #1 SMP Debian 3.8.13-1 x86_64 GNU/Linux, also tested on OSX 10.8.3 | |
$ haproxy -f haproxy.cfg | |
$ puma --port 3000 config.ru | |
$ ls /proc/PUMA_PID/fd -l | wc -l | |
# after some time, puma stops responding on port 3000 | |
$ curl http://localhost:3000 | |
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 A | |
def set_foo(foo) | |
@foo = foo | |
end | |
def get_foo | |
@foo | |
end | |
def set_bar(bar) |
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 'rubygems' | |
require 'hpricot' | |
require 'open-uri' | |
unless ARGV[0] and ARGV[1] | |
puts "Usage: ruby appleblogtv.rb url number_of_winners" | |
exit | |
end | |
commentators = [] |