This file contains 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
/** | |
* run on https://rxviz.com | |
* Time window must be 10+ seconds | |
*/ | |
// rxviz setup | |
console.clear(); | |
const { BehaviorSubject, EMPTY, from, merge, of, Subject } = Rx; | |
Object.keys(RxOperators).forEach(k => { | |
if (k !== "window") window[k] = RxOperators[k]; |
This file contains 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
simple cases: | |
U call A: outgoing A | |
call ends: idle A | |
A accepts: offhook A | |
call ends: idle A | |
A call U: ringing A | |
call ends: idle A | |
U accepts: offhook A |
This file contains 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
export interface Doodle { | |
alternate_url: string | |
blog_text: string | |
call_to_action_image_url: string | |
collection_id: number | |
countries: string[] | |
doodle_args: DoodleArg[] | |
doodle_type: DoodleType | |
height: number | |
high_res_height: number |
This file contains 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 { join, resolve } = require('path') | |
const tsconfig = require('../tsconfig.json') | |
const { outDir, paths } = tsconfig.compilerOptions | |
const _load = module.constructor._load | |
module.constructor._load = function(request, ...args) { | |
for (let alias in paths) { | |
const aliasRegExp = new RegExp('^' + alias.replace('*', '(.*)') + '$') |
This file contains 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
jscodeshift \ | |
-t js-codemod-import-absolute-develop/import-absolute.js \ | |
--extensions=ts,tsx \ | |
--parser=tsx \ | |
--sort=false \ | |
--replace="$PWD/src/" \ | |
--replaceWith="~" \ | |
src/ |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>loops</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
<script src="./suite.js"></script> | |
</head> | |
<body> | |
<h1>Open the console to view the results</h1> |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>Untitled benchmark</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
<script src="./suite.js"></script> | |
</head> | |
<body> | |
<h1>Open the console to view the results</h1> |
This file contains 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
// store.ts | |
import { combineStore, createStore } from 'redux' | |
import { todosReducer } from './todos' | |
import { userReducer } from './user' | |
const store = createStore( | |
combineStore({ | |
user: userReducer, | |
todos: todosReducer, |
This file contains 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 fs = require('fs') | |
const path = require('path') | |
const ESLING_LOG = path.join(__dirname, 'eslint.log') | |
const STATE = { | |
EMPTY: 'EMPTY', | |
FILE: 'FILE', | |
} |
NewerOlder