Skip to content

Instantly share code, notes, and snippets.

View adebisi-fa's full-sized avatar

ADEBISI Foluso A. adebisi-fa

View GitHub Profile
function testSpeed(speed) {
if (speed <= 70) return { ok: true, speed }
var points = Math.floor((speed - 70) / 5)
if (points < 12) return { ok: false, speed, points }
return { ok: false, speed, message: 'License Suspended.', points }
}
;[80, 70, 120, 130, 75, 84, 92, 123, 129].forEach((speed) => {
console.log(testSpeed(speed))
console.log('')
@adebisi-fa
adebisi-fa / machine.js
Created November 13, 2020 22:25
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@adebisi-fa
adebisi-fa / SketchSystems.spec
Last active April 21, 2019 20:35
Service Center State Chart
Service Center State Chart
SELECT_STATE -> StateSelected
Init
SELECT_STATE -> StateSelected
StateSelected
LOAD_CONTACTS -> StateContactsLoaded
e911
reviewCase
stop -> stop
next -> acceptOrReject
stop
acceptOrReject
next -> dispatchToHotPoint
dispatchToHotPoint
next -> stop

Keybase proof

I hereby claim:

  • I am adebisi-fa on github.
  • I am adebisifa (https://keybase.io/adebisifa) on keybase.
  • I have a public key whose fingerprint is E1FE 469D FAC7 F55B 915A 81D9 D2C3 4F8E 8C86 F71D

To claim this, I am signing this object: