I hereby claim:
- I am pedro on github.
- I am ped (https://keybase.io/ped) on keybase.
- I have a public key whose fingerprint is B3CB A84E 05B4 03FC 2506 BD8F ACF9 8F42 BA4D 4E90
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
module Base | |
class Foo | |
end | |
end | |
module Base | |
class A | |
def self.test | |
puts Foo.object_id # this works | |
end |
$LOAD_PATH.unshift File.dirname(__FILE__) + '/../vendor/sinatra/lib' | |
require 'sinatra' | |
Sinatra::Application.default_options.merge!( | |
:run => false, | |
:env => :development # ENV['RACK_ENV'] | |
) | |
require File.dirname(__FILE__) + '/../app/mailer.rb' | |
Recently the tour rider for a Jack White performance was made public, and it contained a recipe for guacamole intended to be made for the artist.
irb(main):018:0> RestClient::VERSION | |
=> "1.7.3" | |
irb(main):019:0> RestClient.get("http://test-affinity.herokuapp.com/") | |
=> "1" | |
irb(main):020:0> RestClient.get("http://test-affinity.herokuapp.com/").to_i | |
=> 200 | |
irb(main):021:0> RestClient.get("http://test-affinity.herokuapp.com/").class | |
=> String | |
irb(main):022:0> RestClient.get("http://test-affinity.herokuapp.com/") == "1" | |
=> true |
# used by the R buildpack to install dependencies: | |
# https://github.com/virtualstaticvoid/heroku-buildpack-r | |
install.packages("foreach", dependencies = TRUE) | |
install.packages("doParallel", dependencies = TRUE) |
# same code used in https://gist.github.com/pedro/f931e8cd20b5770b6780 | |
# only using doRedis instead of doParallel | |
library(foreach) | |
library(doRedis) | |
redis_url <- Sys.getenv("REDIS_URL") | |
host <- gsub("redis://.*@(.+):.*", "\\1", redis_url) | |
pass <- gsub("redis://.*:(.+)@.*", "\\1", redis_url) | |
port <- as.integer(gsub(".*:(.*)$", "\\1", redis_url)) | |
registerDoRedis("jobs", host=host, port=port, password=pass) |
# used by the R buildpack to install dependencies: | |
# https://github.com/virtualstaticvoid/heroku-buildpack-r | |
install.packages("rredis", dependencies = TRUE) |