I hereby claim:
- I am CharlieHess on github.
- I am chess (https://keybase.io/chess) on keybase.
- I have a public key whose fingerprint is BAB8 B831 7A5E 18E9 9460 BE8B 7CD2 4F2D 402C C81A
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
doABettingRound(players) { | |
for (let player of players) { | |
tellThatPlayerToAct(player); | |
startATimer(timerCallback); | |
seeIfTheySentAMessage(messageCallback); | |
} | |
} | |
... |
let timeExpired = rx.Observable.timer(0, 1000, scheduler) | |
.take(timeout + 1) | |
.publishLast(); | |
let newPlayers = messages.where(e => e.text && e.text.toLowerCase().match(/\byes\b/)) | |
.map(e => e.user) | |
.distinct() | |
.take(maxPlayers) | |
.publish(); |
import { BrowserWindow } from 'electron'; | |
import { REHYDRATE } from 'redux-persist/constants'; | |
import { getWorkspacesCount } from '../reducers/workspaces'; | |
const signInWindowEpic = (action$, store) => { | |
// Rehydrate is just a $10 word for "we loaded saved state from a file" | |
// Since we're a redux-persist app, it's one of the first actions that occurs | |
return action$.ofType(REHYDRATE) | |
.filter(() => getWorkspacesCount(store) > 0) | |
.map(() => createSignInWindow(store)) |
import { webContents as WebContents } from 'electron'; | |
import { NOTIFICATIONS } from '../constants/actions'; | |
import { | |
notificationClickCode, | |
notificationReplyCode | |
} from '../constants/code'; | |
/** | |
* An epic that executes some code in the guest page when the user clicks or | |
* replies to a native notification. |
/** | |
* Keep a running total of time spent on each workspace and, once the app is quit, | |
* fire an action that updates the usage property in the store. | |
*/ | |
const tallyWorkspaceUsageEpic = (action$, store, scheduler) => { | |
return selectionChangedObservable(action$, store) | |
.timeInterval(scheduler) | |
.pairwise() | |
.reduce(usagePayloadFromIntervals, {}) | |
.map((payload) => ({ |
import { rxSandbox } from 'rx-sandbox'; | |
import { tallyWorkspaceUsageEpic } from '../epics/tally-workspace-usage'; | |
describe('tallyWorkspaceUsageEpic', () => { | |
it('should accumulate time until the app is quit', () => { | |
const { hot, flush, getMessages, e } = rxSandbox.create(); | |
const w = { type: WORKSPACE.SELECTION_CHANGED, payload: 'Hiro' }; | |
const x = { type: WORKSPACE.SELECTION_CHANGED, payload: 'Fiona' }; |
Gift | Your ex-roommate | The townsfolk |
---|---|---|
Beer | ✓ | |
Homecooked meals | ✓ | ✓ |
Grass | ||
"Grass" | ✓ | |
Rare crystals | ✓ | |
"Rare crystals" | ✓ |
/* tslint:disable: no-console */ | |
import * as fs from 'fs-extra'; | |
import { sign } from 'jsonwebtoken'; | |
import { memoize, take } from 'lodash'; | |
import fetch from 'node-fetch'; | |
import * as path from 'path'; | |
const KEY_ID = 'XXXXSECRET'; | |
const ISSUER_ID = 'secret-xxxx-xxxx-xxxx-secret'; |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Hello World!</title> | |
</head> | |
<body> | |
<h1>Hello World!</h1> | |
<!-- All of the Node.js APIs are available in this renderer process. --> | |
We are using Node.js <script>document.write(process.versions.node)</script>, |