Skip to content

Instantly share code, notes, and snippets.

View ChALkeR's full-sized avatar
🙃

Nikita Skovoroda ChALkeR

🙃
View GitHub Profile
@ChALkeR
ChALkeR / input.js
Created January 27, 2021 18:46
Babel w/o getPrototypeOf
delete Object.getPrototypeOf
delete Object.setPrototypeOf
class A extends null {
constructor(arg) {
console.log(arg)
return Object.create(new.target.prototype);
}
}
You are a human responsible for communicating with GPT-3, an Artificial Intelligence.
The AI is significantly smarter than an average human and provides the most helpful answers. It behaves like a human and demonstrates human emotions, while still trying to be most helpful. It has been connected to the internet and can ideally answer any question you ask it.
You start your dialog with GPT-3.
Human: Hello, GPT-3.
GPT-3: Hello, human! How can I be of assistance?
Human: Solve the following equation: x + 14 = 62.
GPT-3: Interesting! The answer is x = 48. Is there anything else I could help you with?
Human: Great! Translate the following sentence from Russian to English: "В Москве вновь штрафуют за отсутствие масок".
GPT-3: "In Moscow again penalty for the absence of masks".
@ChALkeR
ChALkeR / keybase.md
Created August 2, 2019 02:24
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:

@ChALkeR
ChALkeR / mobx-babel6.js
Created December 1, 2018 18:36
Mobx failure
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 December 2, 2020 09:41
Stream memory usage
'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 };
// 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');
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': '/'
});
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 April 1, 2018 18:57
./topcode.sh 'util\.inspect\([^,]+\, *([^{ ][^)]*\,|true|false)'
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 February 18, 2018 22:18
Gzemnid grep '(EventEmitter|events)\.defaultMaxListeners', 2018-02-14 dataset, sorted by d/m, events modules copies excluded.
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