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
api_exchange << { | |
request_validator: method(:request_validator).curry[an_option_for_request_validator: true], | |
response: response_for_valid | |
} | |
rv = initiate_authorization | |
assert_trx_result rv, three_ds_1: TestCaseFaker.test_case | |
# ..... | |
def request_validator options, request |
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
Classic wisdom for handling amount & currency would be to use a `char(3)` or `int` for currency and an `int` for amount, this is the norm in the financial sector since the 80s. You need to be aware which currency has which decimalization, and all good. | |
However, now we have an invasion of new de-facto currencies that don't necessarily have their ISO codes, so numeric ISO codes go out of the window (no more `int` for currencies) - we have NEO, litecoin, faircoin, ... | |
Next issue is the amount, at least with BTC we have "The Satoshi" which is [supposedly the smallest unit of BTC but not really](https://bitcoin.stackexchange.com/questions/122/will-we-ever-need-smaller-amounts-of-bitcoin-than-a-satoshi). But this is just 1 cryptocurrency out there. | |
At least in the Ruby community [the established "money" library](https://github.com/RubyMoney/money) uses an integer - "the cents" - as the minor unit of currency and now they set Satoshis as the cents for BTC. | |
However, |
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 'ramda' | |
R = Ramda | |
module Functional | |
extend ActiveSupport::Concern | |
def method_call | |
method(:call) | |
end |
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
# gem install concurrent-ruby redis pry connection_pool | |
require "redis" | |
require "pry" | |
require "connection_pool" | |
require "concurrent" | |
require "securerandom" | |
$cp = ConnectionPool.new { Redis.new } | |
REGISTERED_JOBS_THRESHOLD_IN_SECONDS = 60 * 60 |
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
[12:11] <bbozo> Hey guys :) | |
[12:11] <bbozo> I know you're listening on SO on the Docker tag | |
[12:11] <Ravensoul> So my docker stats is weird? | |
[12:12] <bbozo> but not sure if you're on the Security stack exchange | |
[12:12] <bbozo> Can somebody take a look? https://security.stackexchange.com/questions/148784/is-docker-a-pci-dss-compliant-form-of-virtualization | |
[12:12] <bbozo> regarding posibilites of use of Docker for security related isolation | |
[12:13] <Ravensoul> bbozo: right. What's pci-dss compliancy, I can answer that if you tell me | |
[12:14] <Ravensoul> antonios: have you tried removing containers? | |
[12:16] <Ravensoul> bbozo: as far as I can tell there are no requirements for "virtualization". What are you trying to do | |
[12:17] <bbozo> @Ravensoul, PCI DSS is a credit card security standard https://pcicompliance.stanford.edu/sites/default/files/pci_dss_v3-2.pdf - the interesting point is requirement 2.2.1 |
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
Minitest.before_parallel_fork do | |
defined?(ActiveRecord::Base) and | |
ActiveRecord::Base.connection.disconnect! | |
end | |
Minitest.after_parallel_fork do |i| | |
if defined?(ActiveRecord::Base) | |
db_config = Rails.application.config.database_configuration[Rails.env].clone | |
db_config['database'] += (i+1).to_s | |
ActiveRecord::Base.establish_connection(db_config) |
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
From: /home/bbozo/dev/faraday/lib/faraday/adapter/http_gem.rb @ line 5 : | |
1: module Faraday | |
2: class Adapter | |
3: class HttpGem < Faraday::Adapter | |
4: require 'pry' | |
=> 5: binding.pry | |
6: dependency 'http' | |
7: | |
8: HTTP_EXCEPTIONS = [ |
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
from /home/travis/build/lostisland/faraday/vendor/bundle/ruby/2.2.0/gems/minitest-5.8.4/lib/minitest.rb:56:in `block in autorun' | |
from /home/travis/build/lostisland/faraday/vendor/bundle/ruby/2.2.0/gems/minitest-5.8.4/lib/minitest.rb:129:in `run' | |
from /home/travis/build/lostisland/faraday/vendor/bundle/ruby/2.2.0/gems/minitest-5.8.4/lib/minitest.rb:152:in `__run' | |
from /home/travis/build/lostisland/faraday/vendor/bundle/ruby/2.2.0/gems/minitest-5.8.4/lib/minitest.rb:152:in `map' | |
from /home/travis/build/lostisland/faraday/vendor/bundle/ruby/2.2.0/gems/minitest-5.8.4/lib/minitest.rb:152:in `block in __run' | |
from /home/travis/build/lostisland/faraday/vendor/bundle/ruby/2.2.0/gems/minitest-5.8.4/lib/minitest.rb:291:in `run' | |
from /home/travis/build/lostisland/faraday/vendor/bundle/ruby/2.2.0/gems/minitest-5.8.4/lib/minitest.rb:318:in `with_info_handler' | |
from /home/travis/build/lostisland/faraday/vendor/bundle/ruby/2.2.0/gems/minitest-5.8.4/lib/minitest.rb:331:in `on_signal' | |
from /home/travis/build/lo |
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
#!/bin/bash | |
set -e | |
# set -x # -> for debug | |
#rm -rf /tmp/heroku | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1) /' |
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
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: fakes3 | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Example initscript | |
# Description: This file should be used to construct scripts to be | |
# placed in /etc/init.d. |
NewerOlder