I hereby claim:
- I am steve9001 on github.
- I am steve9 (https://keybase.io/steve9) on keybase.
- I have a public key ASCJ_yDjjJIrZZlw24lUs5EzTLcck8paPeHQGHvcSkdu6Qo
To claim this, I am signing this object:
module MyApp | |
class Application < Rails::Application | |
if Rails.env == 'test' | |
require 'diagnostic' | |
config.middleware.use(MyApp::DiagnosticMiddleware) | |
end | |
end | |
end |
/** | |
* Creates a pseudo-random value generator. The seed must be an integer. | |
* | |
* Uses an optimized version of the Park-Miller PRNG. | |
* http://www.firstpr.com.au/dsp/rand31/ | |
*/ | |
function Random(seed) { | |
this._seed = seed % 2147483647; | |
if (this._seed <= 0) this._seed += 2147483646; | |
} |
I hereby claim:
To claim this, I am signing this object:
date | sell_type | sell_quantity | buy_type | buy_quantity | |
---|---|---|---|---|---|
Mar 28, 2018 5:09:04 AM | USD | 500 | BTC | 0.06197515 | |
Mar 29, 2018 4:59:23 PM | USD | 800 | BTC | 0.11595698 | |
Apr 21, 2018 2:14:32 AM | BTC | 0.05 | USD | 444.66 | |
May 05, 2018 8:15:17 AM | BTC | 0.05 | USD | 494.18 |
class Exception | |
def pretty | |
%|\n#{self.class} (#{self.message}):\n #{backtrace.join("\n ")}\ n| | |
rescue Exception => e | |
"error in Exception#pretty: #{e}" | |
end | |
end |
#!/usr/bin/env zsh | |
# Install the following first: | |
# | |
# - chrome | |
# - iterm2 | |
# - connect.apple.com command-line: XCode tools | |
successfully() { |
class Exception | |
def pretty | |
trace = backtrace.select{ |l|l.start_with?(Rails.root.to_s) }.join("\n ") | |
"#{self.class}\n#{message}\n#{trace}\n" | |
end | |
end |
In your form, gather email address, credit card, and amount
With balanced.js post the card data to Marketplace cards_uri
desc "db:test:prepare makes the connected db different from the one implied by Rails.env" | |
task :foo => :environment do | |
puts Rails.env #development | |
puts User.count #1 | |
Rake::Task["db:test:prepare"].invoke | |
puts Rails.env #?? | |
puts User.count #?? | |
end |
class Array | |
def promote_element(e) | |
i = self.index(e) | |
return self if i == 0 or i == nil | |
result = self.slice(0, i-1) | |
result << e | |
result << self[i-1] | |
result.concat(self.slice(i+1, self.length)) | |
end |