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 time = 60; var clock = 300; function TimeHack() { | |
setInterval(function Applytime() { | |
document.getElementsByClassName('timerLabel whiteTextWithShadow font-60 ng-binding')["0"].innerText = time; document.getElementsByClassName('timerLabel whiteTextWithShadow font-60 ng-binding')["0"].innerHtml = time; | |
document.getElementsByClassName('clockHand').rotate = clock; | |
}, 1); | |
}; function TimeHackm() { | |
setInterval(function Addtime() { | |
time = time + 1; | |
clock = clock + 6; | |
}, 1000); |
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
// Usage: | |
// interface FooEventMap { | |
// run: (arg1: string, arg2: number) => void; | |
// } | |
// | |
// class Foo extends Emitter<{ [K in keyof FooEventMap]: FooEventMap[K] }> { | |
// run() { | |
// this.emit("run", "First argument", 5); | |
// } |
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
import zlib from "zlib"; | |
import fs from "fs"; | |
import stream from "stream"; | |
import { promisify } from "util"; | |
import readline from "readline"; | |
const pipe = promisify(stream.pipeline); | |
const { stdin, stdout, stderr } = process; | |
(async function () { |
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
const crypto = require("crypto"); | |
const fs = require("fs"); | |
// helper | |
function writeFile(file, data, callback = () => { }) { | |
fs.writeFile(file, data, (error) => { | |
if (error) throw error; | |
callback(); | |
}); | |
} |
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
function randomUUID() { | |
const GUID_STRUCTURE = "xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx"; | |
const GUID_CHARACTERS = { | |
"x": "0123456789abcdef", | |
"M": "12345", | |
"N": "89ab" | |
} | |
const replaceCharacter = (character) => { | |
const characters = GUID_CHARACTERS[character]; |
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
const net = require("net"); | |
// creating a custom socket client and connecting it.... | |
const client = new net.Socket(); | |
client.connect({ | |
port: 2222 | |
}); | |
client.on("connect", () => { |
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
// Call with either an array of arguments such as | |
// ["--foo=bar", "--bar", "baz"] | |
// or from the process in Node: process.argv.slice(2); | |
function parseArguments(argv) { | |
const parsedArgs = { | |
_: [], | |
flags: {} | |
} | |
argv.forEach((argument) => { |
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
const http = require("http"); | |
const path = require("path"); | |
const url = require("url"); | |
const fs = require("fs"); | |
const config = { | |
app: { | |
http: { | |
port: 80, | |
host: "0.0.0.0" |
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
function generateId() { | |
const randomString = () => Math.random().toString(36).substring(2, 15); | |
const id = randomString() + randomString(); | |
return id; | |
} |