Skip to content

Instantly share code, notes, and snippets.

View davidsonsns's full-sized avatar
🎯
Focusing

Davidson Nascimento davidsonsns

🎯
Focusing
  • San Diego, CA
View GitHub Profile
@davidsonsns
davidsonsns / iterm2.md
Created November 28, 2019 11:52 — forked from squarism/iterm2.md
iterm2 cheatsheet

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
Cycle iTerm Windows + backtick (true of all mac apps and works with desktops/mission control)
@davidsonsns
davidsonsns / ultimate-ut-cheat-sheet.md
Created December 26, 2019 13:11 — forked from yoavniran/ultimate-ut-cheat-sheet.md
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai and Sinon

The Ultimate Unit Testing Cheat-sheet

For Mocha, Chai and Sinon

using mocha/chai/sinon for node.js unit-tests? check out my utility: mocha-stirrer to easily reuse test components and mock require dependencies


@davidsonsns
davidsonsns / TransferAndEvents.md
Created June 14, 2023 20:10 — forked from spencerhunter/TransferAndEvents.md
Outlines the sequence of events that are triggered for a subset of Dwolla payment flows that are bank-to-bank via ACH

Overview

Use this doc as a reference to map out the sequence of events your app will receive based on Customer type(s) involved in the transfer as well as where the funds are coming from and going to (bank or balance). The following transfer scenarios are covered in this doc:

Transfer scenario 1 - Source: Verified Customer bank Destination: Verified Customer bank.
Transfer scenario 2 - Source: Verified Customer bank Destination: Unverified Customer bank.
Transfer scenario 3 - Source: Unverified Customer bank Destination: Verified Customer bank.

Both success and failure cases will be shown as well as what occurs in the event of a bank transfer failure.

**General recommend

const cloakedStringRegex =
/^v1\.aesgcm256\.(?<fingerprint>[0-9a-fA-F]{8})\.(?<iv>[a-zA-Z0-9-_]{16})\.(?<ciphertext>[a-zA-Z0-9-_]{22,})={0,2}$/;
const cloakKeyRegex = /^k1\.aesgcm256\.(?<key>[a-zA-Z0-9-_]{43}=?)$/;
const INVALID_BYTE = 256;
class Coder {
constructor(_paddingCharacter = '=') {
this._paddingCharacter = _paddingCharacter;