I hereby claim:
- I am stiller on github.
- I am joachim (https://keybase.io/joachim) on keybase.
- I have a public key whose fingerprint is B0B4 EDA7 1F9D A7C8 19F0 31A7 4D7C 27F5 4637 0D05
To claim this, I am signing this object:
| input = [ { personId: 1, color: 'red' }, { personId: 2, color: 'red' } ] | |
| personIds = [...new Set(input.map(e => e.personId))] | |
| //add 'green' | |
| personIds.forEach(personId => input.push({ personId, color: 'green' })) | |
| //remove 'green' | |
| input = input.filter(item => item.color !== 'green') |
| require 'parser/current' | |
| require 'rexml/document' | |
| class XMLAST | |
| include REXML | |
| attr_reader :doc | |
| def initialize sexp | |
| @doc = Document.new "<root></root>" | |
| @sexp = sexp |
I hereby claim:
To claim this, I am signing this object:
| ### Keybase proof | |
| I hereby claim: | |
| * I am stiller on github. | |
| * I am joachim (https://keybase.io/joachim) on keybase. | |
| * I have a public key whose fingerprint is E9B5 E7BF 07D8 D78A 0527 E737 3225 1732 D79B E6D7 | |
| To claim this, I am signing this object: |
| class RateConstraint | |
| def matches?(request) | |
| last_request = request.session[:request_time] | |
| request.session[:request_time] = Time.now | |
| !(last_request and (Time.now - last_request < 2.second)) | |
| end | |
| end | |
| Application.routes.draw do | |
| constraints RateConstraint.new do |