Skip to content

Instantly share code, notes, and snippets.

View SketchSystems.spec
actionable*
STAGE -> staged
staged
SCHEDULE -> scheduled
SKIP -> skipped
scheduled
PROCESS -> processing
CANCEL -> cancelled
processing
SUCCESS -> processed
View machine.js
const fetchData = () =>
delay(
Math.floor(Math.random() * 100) % 2 === 0 ? "staged" : "scheduled",
1000
);
const actionableAccountMachine = Machine(
{
id: "root",
initial: "idle",
View machine.js
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
View machine.js
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
View fivethirtyeight-simulation-message.json
{
"cmd": "update",
"method": "regression",
"conditions": {
"AR": 1,
"KS": 1,
"WY": 1,
"SD": 0,
"CA": 0,
"NV": 1,
View ps-release.md

Gateway

  • Handle CardConnect 401's

Product Management

  • Basic product management

Payment Process

@justinobney
justinobney / README.md
Created Jan 30, 2020 — forked from nikcub/README.md
Facebook PHP Source Code from August 2007
View README.md
View use-immer-reducer.ts
import produce, {Draft} from 'immer';
import {useReducer, useMemo} from 'react';
type ActionCreator<State, Payload> = (
payload: Payload
) => {type: string; payload: Payload};
type CreatedAction<State, Payload> = ActionCreator<State, Payload> & AnyAction;
type Handler<State, Payload> = (state: Draft<State>, payload: Payload) => void;
type Handlers<State> = {
[actionType: string]: Handler<State, any>;
View Untitled-1
{
"amount": "0.00",
"resptext": "Wrong currency for merch",
"cardproc": "NASH",
"acctid": "1",
"respcode": "32",
"defaultacct": "Y",
"merchid": "820000000192",
"token": "9545666483645454",
"respproc": "PPS",
View guard.ts
type GuardedResult<ReturnType, DefaultValueType = ReturnType> = ReturnType | DefaultValueType;
type GuardedFn<ReturnType, DefaultValueType = ReturnType> = (
...args
) => GuardedResult<ReturnType, DefaultValueType>;
function guard<ReturnType, DefaultValueType = ReturnType>(
fn: GuardedFn<ReturnType, DefaultValueType>,
defaultValue: GuardedResult<ReturnType, DefaultValueType>
) {
const guarded: GuardedFn<ReturnType, DefaultValueType> = (...args) => {