I hereby claim:
- I am lucaschain on github.
- I am lucaschain (https://keybase.io/lucaschain) on keybase.
- I have a public key whose fingerprint is 5A32 9E73 7C8D 7184 E153 4AB7 9D7B F11B D18D 0259
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
path = "api/auto/refinancing_empirica/result" | |
exp = /^api\/([a-z_]+)\/([a-z_]+)/ | |
matched_params = exp.match(path) do |matches| | |
{ | |
:product => matches[1].to_sym, | |
:modality => matches[2].to_sym | |
} | |
end |
const compose = (...funcs) => ( | |
funcs.reduceRight((accumulated, current) => ( | |
x => current(accumulated(x)) | |
)) | |
) | |
const pipe = (...funcs) => ( | |
funcs.reduce((accumulated, current) => ( | |
x => current(accumulated(x)) | |
)) |
const clickCheckbox = el => el.querySelector('[type=checkbox]').click() | |
const elementContains = (el, content) => ~el.textContent.indexOf(content) | |
const elementContainsOneOf = (el, contentList) => ( | |
contentList.map(elementContains.bind(null, el)).some(Boolean) | |
) | |
const simulationsOnly = el => elementContainsOneOf(el, [ | |
'Api::ServiceUnavailableException: Credit Score is missing', |
class CustomFormatter < RSpec::Core::Formatters::BaseTextFormatter | |
RSpec::Core::Formatters.register self, :example_passed, :example_pending, :example_failed | |
def initialize(*args) | |
super(*args) | |
@index = 0 | |
end | |
def increase_index! | |
@index += 1 |
require 'minimization' | |
# imita a calculadora de forma burra | |
def calculate(net_amount) | |
net_amount * 1.1 | |
end | |
# encapsula o processo de minimização | |
def minimize (min, max, desired) | |
puts "minimizing between #{min} and #{max}. desired is #{desired}" |
const filter = (list, predicate) => list.filter(predicate) | |
const filterLessThan = (list, value) => filter(list, item => item < value) | |
const filterGreaterOrEqualThan = (list, value) => filter(list, item => item >= value) | |
const quickSort = ([head, ...tail]) => head === undefined ? [] : [ | |
...quickSort(filterLessThan(tail, head)), | |
head, | |
...quickSort(filterGreaterOrEqualThan(tail, head)) |