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
| if (!this.props.isInitialized) { | |
| return ( | |
| <FlexRow> | |
| <FlexColumn> | |
| <EMap bingKey={this.props.bingKey} active={true} /> | |
| </FlexColumn> | |
| </FlexRow> | |
| ) | |
| } |
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* fibGen (current, next) { | |
| yield current | |
| yield* fibGen(next, current + next) | |
| } | |
| for (var num of fibGen(0,1)); | |
| // function* fibGen (current, next) { | |
| // ^ | |
| // RangeError: Maximum call stack size exceeded |
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
| JPEG / No Imagery / Fresh Cache | |
| 250000 - 196.5k | |
| 150000 - 212.8k | |
| 100000 - 1.2m | |
| 80000 - 1.2m | |
| 50000 - 1m | |
| 35000 - 831.1k | |
| 32000 - 735.1k | |
| 25000 - 772.8k |
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
| # A makeshift SMTP server that logs all messages to the console | |
| python -m smtpd -n -c DebuggingServer localhost:25 | |
| # Spotlight search results in terminal | |
| mdfind |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| // works | |
| var fs = require('fs'), | |
| spawn = require('child_process').spawn, | |
| out = fs.openSync('./out.log', 'a'), | |
| err = fs.openSync('./out.log', 'a'); | |
| var child = spawn('prg', [], { | |
| detached: true, | |
| stdio: [ 'ignore', out, err ] | |
| }); |
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
| wget https://phantomjs.googlecode.com/files/phantomjs-1.9.1-linux-x86_64.tar.bz2 | |
| tar xvf phantomjs-1.9.1-linux-x86_64.tar.bz2 | |
| sudo mv phantomjs-1.9.1-linux-x86_64 /usr/local/lib/phantomjs | |
| sudo ln -s /usr/local/lib/phantomjs/bin/phantomjs /usr/local/bin/phantomjs |
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 map (arr, func) { | |
| return Promise.resolve().then(function () { | |
| return arr.map(function (el) { return func(el) }) | |
| }).all() | |
| } | |
| function mapSeries (arr, func) { | |
| let currentPromise = Promise.resolve() | |
| let promises = arr.map(function (el) { | |
| return currentPromise = currentPromise.then(function () { |
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
| var fs = require('fs') | |
| var Q = require('q') | |
| var fs_stat = Q.denodeify(fs.stat) | |
| var files = ['./fixtures/file1', './fixtures/file2', './fixtures/file3'] | |
| function getStatsSeries (files) { | |
| var d = Q.defer() | |
| var results = [] | |
| files.reduce(function (last, file) { |
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
| "use strict" | |
| var Promise = function () { | |
| this.state = 'pending' | |
| this.thenables = [] | |
| } | |
| Promise.prototype.resolve = function (value) { | |
| if (this.state != 'pending') return | |
| this.state = 'fulfilled' |