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
| type Stream<T> = | |
| | { | |
| value: T; | |
| getNext: () => Stream<T>; | |
| } | |
| | undefined; | |
| type CreateStreamArgs<T> = { | |
| value: T; | |
| next: (x: T) => T; |
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
| {"lastUpload":"2018-10-11T12:22:00.116Z","extensionVersion":"v3.1.2"} |
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 loop = (cb, counter, maxCounter) => | |
| ((x, i, max) => x(x, i, max)) | |
| ( | |
| (x, i, max) => ( | |
| cb(i), | |
| (i++ < max) && x(x, i, max) | |
| ), | |
| counter, | |
| maxCounter | |
| ) |
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 loadJS(src) { | |
| let scriptEl = document.createElement('script') | |
| scriptEl.type = 'application/javascript' | |
| scriptEl.src = src | |
| const scriptLoadedPromise = new Promise((resolve, reject) => { | |
| scriptEl.onload = () => resolve() | |
| }) | |
| document.body.appendChild(scriptEl) | |
| return scriptLoadedPromise | |
| } |
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
| <!doctype html> | |
| <html> | |
| <head> | |
| </head> | |
| <body> | |
| <div> | |
| <h1>CHILD WINDOW 2</h1> | |
| </div> | |
| <div> | |
| <button class="back-btn">back</button> |
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
| { | |
| "console log": { | |
| "prefix": "cl", | |
| "body": [ | |
| "console.log($1)" | |
| ], | |
| "description": "" | |
| }, | |
| "lambda": { |
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
| // http://hackage.haskell.org/package/base-4.9.1.0/docs/src/GHC.Base.html | |
| // (f, g, h) => x => f(g(h(x))) | |
| const compose = | |
| (...fns) => | |
| initial => | |
| fns.reduceRight( | |
| (result, fn) => fn(result), | |
| initial | |
| ) |
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
| <body class="t-light"> | |
| <article class="c-modal c-modal--wide js-modal is-open"> | |
| <div class="c-modal__content"> | |
| <div class="s-cms-content"> | |
| ... | |
| </div> |
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
| # create package.json | |
| npm init | |
| # can define scripts in package.json | |
| # pre and post runs before and after script | |
| "scripts": { | |
| "pretest": "echo 'running pretest'", | |
| "test": "echo 'no test specified'", | |
| "posttest": "echo 'running posttest'", | |
| "start": "echo 'running start script'", |
NewerOlder