This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# page 2 | |
=begin | |
Station>>computePart: aPart | |
^self multiplyPartTimesRate: aPart | |
Station>>multiplyPartTimesRate: aPart | |
^Part | |
amount: aPart amount * self rate | |
date: aPart date | |
=end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { css, cx } from 'emotion'; | |
import React, { useEffect, useState } from 'react'; | |
export default function useTypewriter( | |
text, | |
{ speed = 40, Component = 'p', startingIndex = -30 } = {}, | |
) { | |
// start negative to create a delayed effect to offset the initial transition of the slide | |
const [charIndex, setCharIndex] = useState(startingIndex); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const az = { | |
a: (![] + [])[+!![]], | |
d: ([][[]] + [])[+!![] + !![]], | |
e: (![] + [])[+!![] + !![] + !![] + !![]], | |
f: (![] + [])[+[]], | |
i: ([][[]] + [])[+!![] + !![] + !![] + !![] + !![]], | |
l: (![] + [])[+!![] + !![]], | |
n: ([][[]] + [])[+!![]], | |
r: (!![] + [])[+!![]], | |
s: (![] + [])[+!![] + !![] + !![]], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// goal is to be able to extend the notification payload type depending on the server implementation | |
// library | |
interface PushNotification { | |
// ... | |
} | |
interface PushNotificationOptions<T> { | |
// ... | |
onNotification?: (notification: PushNotification & T) => void; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function createUUID() { | |
var dt = new Date().getTime(); | |
var uuid = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) { | |
var r = (dt + Math.random() * 16) % 16 | 0; | |
dt = Math.floor(dt / 16); | |
return (c === "x" ? r : (r & 0x3) | 0x8).toString(16); | |
}); | |
return uuid; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const BOOK_OR_REVIEW = { BOOK: '#schedule', DATES: '#dates' }; | |
const routesMachine = Machine( | |
{ | |
id: 'routes', | |
initial: 'codeOfConduct', | |
context: { | |
lastScreen: '', | |
}, | |
states: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const BOOK_OR_REVIEW = { BOOK: '#schedule', DATES: '#dates' }; | |
const appMachine = Machine( | |
{ | |
id: 'app', | |
initial: 'codeOfConduct', | |
context: { | |
lastScreen: 'schedule', | |
selectedAttendee: undefined, | |
}, | |
states: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const machineConfig = { | |
initial: "idle", | |
id: "main", | |
context: { | |
initialTime: 0, | |
currentTime: 0, | |
notificationTimes: [] | |
}, | |
states: { | |
idle: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const BOOK_OR_REVIEW = { BOOK: '#schedule', DATES: '#dates' }; | |
const machine = Machine({ | |
id: 'app', | |
initial: 'fetchAttendee', | |
context: { | |
lastScreen: 'schedule', | |
friendId: undefined, | |
friendTimeId: undefined, | |
someoneNewTimes: new Set(), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const DATES_TAB = { | |
target: "dates", | |
actions: ["sendGAEvent"], | |
} | |
Machine({ | |
id: "app", | |
initial: "fetchAttendee", | |
context: { | |
lastScreen: "schedule", | |
friendId: undefined, |