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
# error occurs when same lexical method (which calls super) | |
# is defined on the singleton class of two or more objects of different classes, | |
# and then that method is called on any of the objects | |
# other than the last one the method was defined on... | |
def x(obj) | |
# uncomment eval and it works | |
# eval " | |
class << obj | |
def to_s |
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 'hpricot' | |
require 'open-uri' | |
dictionary = {} | |
for letter in ('a'..'z').to_a do | |
begin | |
puts "building dictionary for all: #{letter}" | |
doc = Hpricot(open("http://www.grandpapencil.net/austral/abword/ab#{letter}.htm")) | |
doc.search("li").search("div").each do |elem| | |
word = elem.search("font").first.search("strong").inner_html |
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
# initially compiled by joff | |
sudo perl -MCPAN -e 'install Danga::Socket' | |
sudo perl -MCPAN -e 'install Gearman::Client' | |
sudo perl -MCPAN -e 'install Gearman::Server' | |
sudo perl -MCPAN -e 'install Gearman::Client::Async' | |
sudo perl -MCPAN -e 'install Net::Netmask' | |
sudo perl -MCPAN -e 'install IO::WrapTie' | |
sudo perl -MCPAN -e 'install IO::AIO' | |
sudo perl -MCPAN -e 'install List::MoreUtils' |
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
exports.init = function(startup_time, config, events) { | |
events.on('flush', function(timestamp, metrics) { | |
console.log(JSON.stringify(timestamp)); | |
console.log(JSON.stringify(metrics)); | |
}); | |
return true; | |
}; |