Skip to content

Instantly share code, notes, and snippets.

module Bitcoin
class Client
include Singleton
def initialize
config_file = File.open(File.join(Rails.root, "config", "bitcoin.yml"))
config = YAML::load(config_file)[Rails.env].symbolize_keys
@client = JsonWrapper.new(config[:url],
config[:username],
@yrral86
yrral86 / Gemfile
Created May 9, 2013 22:51
Calculates maximum spread price. Assumes trades.csv is in the following format timestamp1,price timestamp2,price etc. additional fields will not cause problems, but if the timestamp and price are not in those positions, you can adjust the indices on the line with Trade.new the seconds variable will set the maximum time span to examine
gem 'active_support'
gem 'algorithms'
gem 'active_support'
gem 'algorithms'
I created a symlink:
/usr/local/rvm/gems/default => /usr/local/rvm/gems/ruby-1.9.2-p0 (this should be updated to the current
ruby version you have selected, a la /usr/local/rvm/rubies/default)
This allowed me to change my httpd.conf from:
LoadModule passenger_module /usr/local/rvm/gems/ruby-1.9.2-p0/gems/passenger-2.2.15/ext/apache2/mod_passenger.so
PassengerRoot /usr/local/rvm/gems/ruby-1.9.2-p0/gems/passenger-2.2.15
to:
LoadModule passenger_module /usr/local/rvm/gems/default/gems/passenger-2.2.15/ext/apache2/mod_passenger.so
PassengerRoot /usr/local/rvm/gems/default/gems/passenger-2.2.15