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
iVBORw0KGgoAAAANSUhEUgAAAKsAAAC0CAYAAADraNxXAAAHAklEQVR4Xu2Ya0tVXRRGp6XltUTMTD8UIUWpUWR30b9uH7IQLYLuSfeLoFlEF9PSmgu2nHzPST++j8/YIHk6Ln3mHOPMvdZuWl5e3gguOiDQgSZkFaBExNIBZEUEmQ4gqwwqgiIrDsh0AFllUBEUWXFApgPIKoOKoMiKAzIdQFYZVARFVhyQ6QCyyqAiKLLigEwHkFUGFUGRFQdkOoCsMqgIiqw4INMBZJVBRVBkxQGZDiCrDCqCIisOyHQAWWVQERRZcUCmA8gqg4qgyIoDMh1AVhlUBEVWHJDpALLKoCIosuKATAeQVQYVQZEVB2Q6gKwyqAiKrDgg0wFklUFFUGTFAZkOIKsMKoIiKw7IdABZZVARFFlxQKYDyCqDiqDIigMyHUBWGVQERVYckOkAssqgIiiy4oBMB5BVBhVBkRUHZDqArDKoCIqsOCDTAWSVQUVQZMUBmQ4gqwwqgiIrDsh0AFllUBEUWXFApgPIKoOKoMiKAzIdQFYZVARFVhyQ6QCyyqAiKLLigEwHkFUGFUGRFQdkOoCsMqgIiqw4INMBZJVBRVBkxQGZDiCrDCqCIisOyHQAWWVQERRZcUCmA8gqg4qgyIoDMh1AVhlUBEVWHJDpALLKoCIosuKATAeQVQYVQZEVB2Q6gKwyqAiKrDgg0wFklUFFUGTFAZkOIKsMKoIiKw7IdMBa1p8/f8aNGzfiyJEjceLEiQLtwYMH8fXr19i7d+8mxPy5oaGh6OnpKf9Xb91OiDda9+7du3j+/Hmsrq7GgQMH4uTJk9HZ2Vl+5dLSUty7dy82Njaivb09zp07F/v27dvJn9t1P2Mp69raWpHg9evX8fnz5zh8+HCMjo4WuNPT0/Ht27f/gD59+nQcOnSo4bp/mfGvv/fp06eYnZ0ty1tbW2NlZaXIOD4+Ht+/f4+bN2/+9V7+zLVr16KpqWnXybhdQZayfvjwIe7cubPZm1pZ19fX |
This file has been truncated, but you can view the full file.
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
18009 verbose fetch to= /home/gary/tmp/npm-7204-DznXupZT/1402077803309-0.7796542856376618/tmp.tgz | |
18010 verbose tar unpack /home/gary/tmp/npm-7204-DznXupZT/1402077803161-0.9443518701009452/tmp.tgz | |
18011 silly lockFile dee40462-home-gary-npm-uuid-1-4-1-package tar:///home/gary/.npm/uuid/1.4.1/package | |
18012 verbose lock tar:///home/gary/.npm/uuid/1.4.1/package /home/gary/.npm/dee40462-home-gary-npm-uuid-1-4-1-package.lock | |
18013 silly lockFile 54bdd8a1-03161-0-9443518701009452-tmp-tgz tar:///home/gary/tmp/npm-7204-DznXupZT/1402077803161-0.9443518701009452/tmp.tgz | |
18014 verbose lock tar:///home/gary/tmp/npm-7204-DznXupZT/1402077803161-0.9443518701009452/tmp.tgz /home/gary/.npm/54bdd8a1-03161-0-9443518701009452-tmp-tgz.lock | |
18015 verbose addRemoteTarball [ 'https://registry.npmjs.org/decompress/-/decompress-0.2.4.tgz', | |
18015 verbose addRemoteTarball '33d08cc3678d3f84cb0c7606242b4ff1faf8d45a' ] | |
18016 silly gunzTarPerm extractEntry lib/nodes/text.js | |
18017 silly gunzTarPerm extractEntry lib/nodes/each.js |
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
// Straight from documentation. | |
const reducer = combineReducers({ | |
a: doSomethingWithA, | |
b: processB, | |
c: c | |
}); | |
// This is functionally equivalent. | |
function reducer(state, action) { | |
return { |
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
### PROFILER ### | |
calls: 22, totalTime: 329.8783, averageTime: 14.9945 --- Room.work | |
calls: 129, totalTime: 128.4993, averageTime: 0.9961 --- Creep.work | |
calls: 462, totalTime: 78.7700, averageTime: 0.1705 --- Structure.work | |
calls: 901, totalTime: 67.7092, averageTime: 0.0751 --- Room.canBuildExtension | |
calls: 22, totalTime: 65.4439, averageTime: 2.9747 --- Spawn.work | |
calls: 38, totalTime: 49.0222, averageTime: 1.2901 --- Creep.moveTo | |
calls: 36, totalTime: 46.8149, averageTime: 1.3004 --- Creep.takeEnergyFrom | |
calls: 1001, totalTime: 46.3104, averageTime: 0.0463 --- Room.getExtensions |
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
[7:51:03 AM] total- 12.337372 profiler- 1.968903000000001 callbacktime- 10.155966 start- 0.212503 unaccounted 0.2125029999999999 | |
[7:51:05 AM] start of loop 0.196272 | |
[7:51:05 AM] total- 26.320647 profiler- 2.192414000000003 callbacktime- 23.904125999999998 start- 0.224107 unaccounted 0.22410700000000006 | |
[7:51:08 AM] reqs 6.42582 start 0.436245 | |
[7:51:08 AM] start of loop 11.886371 | |
[7:51:08 AM] total- 28.839282 profiler- 2.425184 callbacktime- 14.393689 start- 12.020409 unaccounted 12.020409000000003 | |
[7:51:10 AM] start of loop 0.217584 | |
[7:51:10 AM] total- 11.795441 profiler- 2.2385330000000003 callbacktime- 9.310214 start- 0.246694 unaccounted 0.24669399999999975 |
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
var obj = Memory.pathOptimizer; | |
var start1 = Game.getUsedCpu(); | |
var array1 = []; | |
for (key in Memory.pathOptimizer) { | |
array1.push(key); | |
} | |
var end1 = Game.getUsedCpu(); | |
var start2 = Game.getUsedCpu(); | |
var array2 = []; |
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
class BetterCreep extends Creep { | |
constructor(creep) { | |
this._creep = creep; | |
} | |
work() { | |
this._creep.moveTo(); | |
} | |
} |
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
module.exports = | |
/******/ (function(modules) { // webpackBootstrap | |
/******/ // The module cache | |
/******/ var installedModules = {}; | |
/******/ // The require function | |
/******/ function __webpack_require__(moduleId) { | |
/******/ // Check if module is in cache | |
/******/ if(installedModules[moduleId]) |
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
/** | |
* This set of beforeEach/afterEach functions serve to prevent code from | |
* being accidentally run outside of a test's context. | |
* | |
* Basically we catch all intervals and timeouts set during a test, and | |
* then clear them when the test is done running. | |
*/ | |
const setTimeouts = []; | |
const setIntervals = []; | |
const originalSetTimeout = setTimeout; |
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
// There are other differences between Jest and Mocha, | |
// but these were the functions being used at Airbnb. | |
global.context = describe; | |
global.before = beforeAll; | |
global.after = afterEach; |
OlderNewer