Skip to content

Instantly share code, notes, and snippets.

😣

Сковорода Никита Андреевич ChALkeR

😣
Block or report user

Report or block ChALkeR

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am chalker on github.
  • I am chalker (https://keybase.io/chalker) on keybase.
  • I have a public key ASCPRTv81NMzUf-DAErwHMTbFzQ3uPSAiFNjNzR6tp35_Ao

To claim this, I am signing this object:

View mobx-babel6.js
const { observable, computed, decorate } = require('mobx');
class OrderLine {
constructor() {
this.price = 10;
this.amount = 1;
}
get total() {
return this.price * this.amount;
}
}
@ChALkeR
ChALkeR / streams-test-5.js
Last active Jul 25, 2018
Stream memory usage
View streams-test-5.js
'use strict';
const fs = require('fs');
fs.writeFileSync('test-small.bin', Buffer.alloc(100));
fs.writeFileSync('test-large.bin', Buffer.alloc(100000));
const blockMaxSize = 4 * 1024 * 1024; // 4 MiB
const out = { buf: [], length: 0 };
View errtest.js
// Flags: --expose-internals
// Note: this script reads Node.js sources and docs, and expects to be run on
// the very same Node.js version as the source and doc tree is.
const errors = require('internal/errors').codes;
const assert = require('assert');
const fs = require('fs');
const natives = process.binding('natives');
View client2.js
const http2 = require('http2');
const fs = require('fs');
const connection = http2.connect('https://localhost:8080', {ca: fs.readFileSync('./keys/localhost-cert.pem')}); // http2session
function request(callback) {
// http2stream
const req = connection.request({
':method': 'GET',
':path': '/'
});
View path-browserify.index-v8.11.1.diff
0a1,3
> // 'path' module extracted from Node.js v8.11.1 (only the posix part)
> // transplited with Babel
>
24,27d26
< var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
<
< var inspect = require('util').inspect;
<
30,84c29
@ChALkeR
ChALkeR / grep.2018-02-14.topcode.util_inspect.deprecated.txt
Last active Apr 1, 2018
./topcode.sh 'util\.inspect\([^,]+\, *([^{ ][^)]*\,|true|false)'
View grep.2018-02-14.topcode.util_inspect.deprecated.txt
grep -aE "util\.inspect\([^,]+\, *([^{ ][^)]*\,|true|false)"
21627572 tough-cookie-2.3.3.tgz/lib/memstore.js:50: return "{ idx: "+util.inspect(this.idx, false, 2)+' }';
20600021 extsprintf-1.4.0.tgz/lib/extsprintf.js:151: ret += mod_util.inspect(arg, false, width);
6528474 winston-2.4.0.tgz/lib/winston/common.js:251: output += ' ' + '\n' + util.inspect(meta, false, options.depth || null, options.colorize);
3545797 karma-2.0.0.tgz/lib/reporters/base.js:76: log = util.inspect(log, false, undefined, this.USE_COLORS)
1764912 cardinal-1.0.0.tgz/utl.js:8: console.log(util.inspect(obj, false, depth || 5, true));
1449164 mongoose-5.0.5.tgz/lib/schema/array.js:192: throw new CastError('[' + e.kind + ']', util.inspect(value), this.path, e);
1387003 yarn-1.3.2.tgz/lib/cli.js:65439: ret += mod_util.inspect(arg, false, width);
1387003 yarn-1.3.2.tgz/lib/cli.js:136952: return "{ idx: "+util.inspect(this.idx, false, 2)+' }';
847401 pm2-2.9.3.tgz/lib/API.js:1498: process.stdout.write(util.insp
@ChALkeR
ChALkeR / grep.2018-02-14.EventEmitter_defaultMaxListeners.sorted.filtered.txt
Last active Feb 18, 2018
Gzemnid grep '(EventEmitter|events)\.defaultMaxListeners', 2018-02-14 dataset, sorted by d/m, events modules copies excluded.
View grep.2018-02-14.EventEmitter_defaultMaxListeners.sorted.filtered.txt
1135513 localtunnel-1.8.3.tgz/lib/Tunnel.js:79: self.setMaxListeners(info.max_conn + (EventEmitter.defaultMaxListeners || 10));
375406 jimp-forked-0.0.1.tgz/browser/lib/jimp.js:2397:EventEmitter.defaultMaxListeners=10;// Obviously not all Emitters should be limited to 10. This function allows
375406 jimp-forked-0.0.1.tgz/browser/lib/jimp.js:2410:if(isObject(this._events[type])&&!this._events[type].warned){if(!isUndefined(this._maxListeners)){m=this._maxListeners;}else{m=EventEmitter.defaultMaxListeners;}if(m&&m>0&&this._events[type].length>m){this._events[type].warned=true;console.error('(node) warning: possible EventEmitter memory '+'leak detected. %d listeners added. '+'Use emitter.setMaxListeners() to increase limit.',this._events[type].length);if(typeof console.trace==='function'){// not supported in IE 10
71615 rollup-plugin-node-builtins-2.1.2.tgz/src/es6/events.js:59: return EventEmitter.defaultMaxListeners;
66268 purify-css-1.2.5.tgz/lib/purifycss.es.js:58: return EventEmitter.defaultMaxListe
@ChALkeR
ChALkeR / grep.2018-02-14.EventEmitter_defaultMaxListeners.sorted.txt
Created Feb 18, 2018
Gzemnid grep '(EventEmitter|events)\.defaultMaxListeners', 2018-02-14 dataset, sorted by d/m
View grep.2018-02-14.EventEmitter_defaultMaxListeners.sorted.txt
11114592 events-2.0.0.tgz/events.js:67: EventEmitter.defaultMaxListeners = defaultMaxListeners;
11114592 events-2.0.0.tgz/events.js:81: return EventEmitter.defaultMaxListeners;
11114592 events-2.0.0.tgz/tests/check-listener-leaks.js:63: events.EventEmitter.defaultMaxListeners = 42;
11114592 events-2.0.0.tgz/tests/check-listener-leaks.js:74: events.EventEmitter.defaultMaxListeners = 44;
11114592 events-2.0.0.tgz/tests/check-listener-leaks.js:83: events.EventEmitter.defaultMaxListeners = 42;
11114592 events-2.0.0.tgz/tests/max-listeners.js:43: assert.throws(function() { events.defaultMaxListeners = obj; }, defError);
6328358 mocha-5.0.1.tgz/mocha.js:10649:EventEmitter.defaultMaxListeners = 10;
6328358 mocha-5.0.1.tgz/mocha.js:10746: m = EventEmitter.defaultMaxListeners;
4886878 eventsource-1.0.5.tgz/example/eventsource-polyfill.js:2339:EventEmitter.defaultMaxListeners = 10;
4886878 eventsource-1.0.5.tgz/example/eventsource-polyfill.js:2436: m = EventEmitter.defaultMaxListeners;
@ChALkeR
ChALkeR / npm.huge.react-native.txt
Created Feb 14, 2018
react-native huge packages (≥ 100M)
View npm.huge.react-native.txt
190M react-native-linphone-4.0.0.tgz
188M react-present-0.2.1.tgz
181M react-native-appboy-sdk-1.4.0.tgz
178M react-native-kaltura-player-v3-1.0.1.tgz
177M react-native-embryo-0.1.0.tgz
176M react-native-huanxinpro-1.0.2.tgz
171M react-native-annecy-media-1.4.3.tgz
161M react-native-sectioned-multi-select-0.3.4.tgz
160M react-native-openalpr-1.1.0.tgz
160M react-native-media-editor-0.0.1.tgz
You can’t perform that action at this time.