Skip to content

Instantly share code, notes, and snippets.

Chanmann Lim lchanmann

Block or report user

Report or block lchanmann

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View idm.jrl
p({"class":"net.nanopay.meter.compliance.identityMind.IdentityMindResponse","id":18,"entityType":"foam.nanos.auth.User","daoKey":"userDAO","entityId":8929,"statusCode":200,"created":"2019-10-01T13:26:32.305Z","apiName":"Consumer KYC Evaluation","requestJson":"{\"man\":\"8929\",\"tea\":\"emmanuelwhite247@gmail.com\",\"ip\":\"192.168.20.244\",\"bfn\":\"Carson\",\"bln\":\"Anthony\",\"bsn\":\"221 PO BOX 221\",\"bco\":\"US\",\"bz\":\"94046\",\"bc\":\"MOUNTAIN VIEW\",\"bs\":\"CA\",\"phn\":\"(786)6328147\",\"tid\":\"7e35a43f-65a2-35e7-9a66-d2fc82f3f31e\",\"accountCreationTime\":\"2019-09-30T13:23:03Z\",\"title\":\"Managing Director\",\"dob\":\"1964-04-06\",\"profile\":\"nanopayUS\",\"stage\":2,\"memo3\":0,\"memo4\":false}","user":"UNKNOWN","upr":"UNKNOWN","frn":"User Validation","frp":"MANUAL_REVIEW","frd":"[Fired] The user is unvalidated; The telephone number is of type NON_FIXED_VOIP which is considered safe","arpr":"DISABLED","tid":"7e35a43f-65a2-35e7-9a66-d2fc82f3f31e","erd":"Unknown User","res":"MANUAL_REVIEW",
View diff
diff --git a/nanopay/src/net/nanopay/meter/compliance/rules.jrl b/nanopay/src/net/nanopay/meter/compliance/rules.jrl
index 4ce2f91f99..28d219708d 100644
--- a/nanopay/src/net/nanopay/meter/compliance/rules.jrl
+++ b/nanopay/src/net/nanopay/meter/compliance/rules.jrl
@@ -1,10 +1,9 @@
p({"class":"foam.nanos.ruler.Rule","id":1000,"name":"Canadian Sanctions","priority":100,"ruleGroup":"signup","documentation":"Check user and business against Canadian Sanctions List","daoKey":"localUserDAO","operation":0,"after":false,"action":{"class":"net.nanopay.meter.compliance.CanadianSanctionValidator"},"enabled":false,"saveHistory":true})
p({"class":"foam.nanos.ruler.Rule","id":1100,"name":"Securefact SIDni","priority":90,"ruleGroup":"onboarding","documentation":"Check user via Securefact SIDni API","daoKey":"localUserDAO","operation":3,"after":false,"predicate":{"class":"net.nanopay.meter.compliance.secureFact.CanadianUserOnboarding"},"asyncAction":{"class":"net.nanopay.meter.compliance.secureFact.sidni.SIDniValidator"},
View FlinksResponse_Example.json
{
"HttpStatusCode":200,
"Accounts":[
{
"Transactions":[
{
"Date":"2018-11-20",
"Code":null,
"Description":"ABC",
"Debit":50.00,
View message_types.rb
# Base
class Base
attr_reader :message
def initialize(message)
@message = message
end
def valid?
!message.nil?
View alice_bot.rb
class AliceBot < Visitor
def respond_to_question
"Yeah, I'm listening."
end
def respond_to_yell
'🤐'
end
def respond_to_silence
View bob_bot.rb
class BobBot < Visitor
def respond_to_question
'Sure.'
end
def respond_to_yell
'Woah, chill out!'
end
def respond_to_silence
View visitor.rb
class Visitor
METHODS_TOBE_IMPLEMENTED = %i(
respond_to_question respond_to_yell respond_to_silence respond_to_anything)
attr_reader :message_types
def initialize(*message_types)
@message_types = message_types
end
View bob_bot.rb
class BobBot
def respond(message)
[Question, Yell, Silence, Anything].each do |type|
return type.respond if type.valid?(message)
end
end
end
View redis.rb
# config/initializers/redis.rb
url = URI.parse(ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" })
REDIS = Redis.new(url: url)
View chat_stories_spec.rb
# spec/system/chat_stories_spec.rb
require 'rails_helper'
RSpec.describe 'Chat stories' do
before do
allow(REDIS).to receive(:incr).with('user_count').and_return(1, 2, 3)
end
it "displays chat app" do
visit root_url
You can’t perform that action at this time.