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 {NodeVM} = require('vm2'); | |
| const {isMainThread, Worker, parentPort} = require('worker_threads'); | |
| if (isMainThread) { | |
| const worker = new Worker(__filename); | |
| let lastMessage = null; | |
| worker.on('message', () => lastMessage = Date.now()); | |
| worker.on('online', () => lastMessage = Date.now()); |
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 { execSync } = require('child_process') | |
| const { createHash } = require('crypto') | |
| const invertColor = require('invert-color') | |
| const branchName = execSync('git rev-parse --abbrev-ref HEAD') | |
| const hash = createHash('sha256') | |
| hash.update(branchName) | |
| const color = '#' + hash.digest().toString('hex').substring(0, 6) | |
| const invertedColor = invertColor(color, true) |
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
| // ๐๐ฎ๐ ๐ฎ๐ ๐ฉ ๐บ๐ฉ๐ 80 ๐ฏ๐๐ฟ๐ฌ๐ผ๐ฎ๐ ๐๐ฐ๐ป ๐ฒ๐ ๐ฒ๐ ๐ 40 ๐ฟ๐ฐ๐๐ฎ๐ฟ๐ป๐ฒ๐๐ (๐ฒ๐น๐ฒ๐ ๐ฐ๐๐ผ ๐๐ต๐ฒ๐ ๐ฟ๐ฉ๐ ) | |
| // ๐ฒ๐ ๐ ๐ผ๐ฏ๐ ๐จ๐๐ฏ๐ป ๐ฐ๐๐๐ฐ๐บ๐ฏ๐ป ๐ฎ๐๐๐ฏ๐๐ป๐ฒ๐ผ ๐บ๐ด ๐๐๐ฎ๐๐ฒ๐ ๐๐ฒ๐ ๐ฎ๐ ๐ ๐๐ฎ๐ผ 1800๐ฏ๐ . | |
| // ๐๐ป ๐ฎ๐ ๐๐ช๐ป ๐ฉ ๐๐ฏ๐๐จ ๐ท๐ญ๐ ๐๐ฒ๐ ๐ฏ๐๐ฟ๐ฌ๐ผ๐ฎ๐ ๐ ๐ฎ๐๐ ๐ฎ๐ป ๐ฎ๐ ๐ฒ๐บ๐ต๐ป ๐ฐ๐ ๐ฎ๐๐ฎ๐๐ฒ๐๐ป ๐ฐ๐ ๐บ๐ฉ๐ | |
| // 16. ๐๐ฒ๐ป ๐ฎ๐ป ๐ฎ๐ ๐ฉ ๐น๐๐ฎ๐ป๐จ ๐๐ฒ๐ unicode ๐ป๐ฏ๐ ๐ป ๐ ๐ฎ๐๐ ๐๐จ๐ ๐ช๐ ๐ธ๐ด ๐ฎ๐๐ฒ๐ ๐ฎ๐ ๐ | |
| // unicode ๐ ๐น๐ฉ ๐ป๐ญ ๐๐ฎ๐ฟ๐ถ๐ด๐ฒ๐ ๐ ๐ฒ๐๐ฒ๐๐ฉ๐ป ๐น๐ฏ๐ ๐ฎ๐ ๐๐ช๐๐ฒ๐๐ฟ๐๐ฎ๐น๐ป. | |
| let ๐๐ฏ๐ ๐จ๐๐ฏ๐ป = '๐๐๐๐๐๐ ๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐ ๐ก๐ข๐ฃ๐ค๐ฅ๐ฆ๐ง' + | |
| '๐จ๐ฉ๐ช๐ซ๐ฌ๐ญ๐ฎ๐ฏ๐ฐ๐ฑ๐ฒ๐ณ๐ด๐ต๐ถ๐ท๐ธ๐น๐บ๐ป๐ผ๐ฝ๐พ๐ฟ๐๐๐๐๐๐ ๐๐๐๐๐๐๐๐๐๐'; | |
| export 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
| // NOTICE 2020-04-18 | |
| // Please see the comments below about why this is not a great PRNG. | |
| // Read summary by @bryc here: | |
| // https://github.com/bryc/code/blob/master/jshash/PRNGs.md | |
| // Have a look at js-arbit which uses Alea: | |
| // https://github.com/blixt/js-arbit | |
| /** |
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
| /* | |
| This overlay provides a 'liquid' mode to the excellent CodeMirror editor (http://codemirror.net/). | |
| Add something like this to your CSS: | |
| .cm-liquid-tag { | |
| color: #32273f; | |
| background: #ead9ff; | |
| } | |
| .cm-liquid-variable { |