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
| KFZUS-F3JGV-T95Y7-BXGAS-5NHHP | |
| T3ZWQ-P2738-3FJWS-YE7HT-6NA3K | |
| KFZUS-F3JGV-T95Y7-BXGAS-5NHHP | |
| 65Z2L-P36BY-YWJYC-TMJZL-YDZ2S | |
| SFZHH-2Y246-Z483L-EU92B-LNYUA | |
| GSZVS-5W4WA-T9F2E-L3XUX-68473 | |
| FTZ8A-R3CP8-AVHYW-KKRMQ-SYDLS | |
| Q3ZWN-QWLZG-32G22-SCJXZ-9B5S4 | |
| DAZPH-G39D3-R4QY7-9PVAY-VQ6BU | |
| KLZ5G-X37YY-65ZYN-EUSV7-WPPBS |
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
| { | |
| "dns": { | |
| "hosts": { | |
| "domain:googleapis.cn": "googleapis.com" | |
| }, | |
| "servers": [ | |
| "1.1.1.1" | |
| ] | |
| }, | |
| "inbounds": [ |
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 allBtns = document.getElementsByClassName('x1i10hfl') | |
| var correctRemoveBtns = [] | |
| for(let el of allBtns){ | |
| if(el.textContent == 'Remove') correctRemoveBtns.push(el); | |
| } | |
| async function sleep(t){ | |
| return new Promise((res, _) => setTimeout(res, t)) | |
| } |
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 { createServer } = require('http'); | |
| const server = createServer((request, response) => { | |
| // by default assign maximum of 2KB for Body size if there's no Content-Length | |
| let size = Number(request.headers['content-length']) || 2048; | |
| let bodyData = Buffer.alloc(size); | |
| request.on('data', data => { | |
| for (let x = 0; x < size; x++) { | |
| bodyData[x] = data[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
| const keyInputs = [ | |
| ['n', 1], | |
| ['e', 10], | |
| ['w', 100], | |
| [' ', 1], | |
| ['y', 10], | |
| ['o', 100], | |
| ['r', 300], | |
| ['k', 200] | |
| ]; |
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
| {"lastUpload":"2020-05-27T15:30:36.153Z","extensionVersion":"v3.4.3"} |
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 { readFile } = require('fs') | |
| const { promisify } = require('util') | |
| const readFilePromise = promisify(readFile) | |
| readFilePromise('myFile').then(data => { | |
| console.log(data.toString()) | |
| }).catch(e => console.log(e)) |
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
| // import it! | |
| const { promisify } = require("util") | |
| // turn your ordinary func into a promise func! | |
| const doublePromise = promisify(double) | |
| // use it! | |
| doublePromise(14).then(res => { | |
| console.log(res) | |
| }).catch(err => console.log(err)) |
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 double(number, callback){ | |
| if(number > 2){ | |
| callback(null, number * 2) | |
| } else { | |
| callback(new Error("number should be more than 2")) | |
| } | |
| } |
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
| // say take a number and return its double | |
| // resolve : the success call . which goes in the first then | |
| // reject : the error call, which goes in .catch | |
| function double(number){ | |
| return new Promise((resolve, reject) => { | |
| if(typeof number == 'number'){ | |
| resolve(number * 2) | |
| } else reject("the argument should a Number") |
NewerOlder