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 recurr = (fn => fn( | |
| (f => f(f)) | |
| (self => | |
| x => | |
| fn(self(self))(x) | |
| ) | |
| )) | |
| recurr( | |
| main => |
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 a; | |
| var max = 10; | |
| console.log('start') | |
| for (a = 0; a < max; a++) { | |
| console.log(a) | |
| } | |
| console.log('exit') | |
| // |
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 path = require('path'); | |
| const fs = require("fs"); | |
| class RewritePlugin { | |
| /** | |
| * @private | |
| * @typedef {Object} Request | |
| * @prop {string} request | |
| * @prop {string} context | |
| */ |
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 { execFileSync } = require('child_process'); | |
| var dnode = require('dnode'); | |
| var d = dnode.connect(5004); | |
| const syncRequest = (q)=>{ | |
| return JSON.parse( | |
| execFileSync( | |
| 'node', |
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 screenshot = require('screenshot-desktop'); | |
| const telegram = require('telegram-bot-api'); | |
| const fs = require('fs-extra') | |
| const processWindows = require("node-process-windows"); | |
| const winctl = require('@mmis1000/winctl'); | |
| const path = require("path"); | |
| const api = new telegram({ | |
| token: '532873658:AAF9AzzzzzzzzzzzzzaqjxfJ2DowE', | |
| updates: { |
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
| // recursive | |
| (fn=>fn( | |
| (f=>f(f)) | |
| ( | |
| self=> | |
| x=> | |
| fn(self(self))(x) | |
| ) | |
| )) | |
| ( |
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 c(m, n) { | |
| var val = 1 | |
| for (let temp = m; temp > m - n; temp--) { | |
| val = val * temp / (temp - m + n) | |
| } | |
| return val; | |
| } | |
| function p(w, h) { |
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
| module.exports = function (bridge) { | |
| bridge.allOnce(['config', 'makeLog', 'URLHandlers', 'queue', 'doQueueSong', 'songList', 'addToSongList', 'doTTS', 'opus_stream', 'volume'], | |
| function (config, makeLog, URLHandlers, queue, doQueueSong, songList, addToSongList, doTTS, opus_stream, volume) { | |
| if (!config.discord.token) { | |
| console.warn('[Discord] Missing bot token! The Discord module will not load.'); | |
| return; | |
| } | |
| const Discord = require('discord.js'); | |
| const urlRegex = require('url-regex'); |
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
| /* validator { | |
| * match: boolean function(any value) | |
| * description: string | |
| * } | |
| */ | |
| function makeValidator(type) { | |
| var validator, subValidator, subValidatorMap; | |
| var emptyValidator = { | |
| match : function () {return 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
| const fs = require('fs-extra') | |
| const telegram = require('telegram-bot-api'); | |
| const find = require('find'); | |
| const crypto = require('crypto'); | |
| var savePath = require('path').resolve(process.cwd(), '.rand_img_bot_.data.json') | |
| class Storage { | |
| constructor(path) { | |
| this.path = path |