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
// Models | |
import User from 'Models/User' | |
import MockMongoose, { ResetAll } from '../MockMongoose' | |
describe('Mock Mongoose', () => { | |
afterEach(() => { | |
ResetAll() | |
}) |
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
[{"_id":"6321afc42fb0f02dd5b1c1fc","ip":"41.60.232.61","anonymityLevel":"elite","asn":"AS30844","city":"Nairobi","country":"KE","created_at":"2022-09-14T10:41:08.200Z","google":false,"isp":"Maintainer Liquid Telecommunications Operations Limited","lastChecked":1700201153,"latency":209.388,"org":"Liquid Telecommunications Operations Limited","port":"5678","protocols":["socks4"],"region":null,"responseTime":4699,"speed":3,"updated_at":"2023-11-17T06:05:53.901Z","workingPercent":null,"upTime":84.3456480901691,"upTimeSuccessCount":4041,"upTimeTryCount":4791},{"_id":"6303d68fe607212ee5115141","ip":"193.169.4.184","anonymityLevel":"elite","asn":"AS49261","city":"Reutov","country":"RU","created_at":"2022-08-22T19:18:39.625Z","google":false,"isp":"Lekstar Communication Ltd","lastChecked":1700201153,"latency":92.413,"org":"SVS-Telecom Ltd","port":"10801","protocols":["socks5"],"region":null,"responseTime":4804,"speed":99,"updated_at":"2023-11-17T06:05:53.303Z","workingPercent":null,"upTime":98.5137115344358,"upTimeSuc |
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 dgram = require('node:dgram') | |
class CustomBuffer { | |
#offset = 0 | |
#buffer | |
/** | |
* @returns {number} | |
*/ | |
get() { |
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') | |
const path = require('path') | |
const data = JSON.parse(fs.readFileSync('./data.json')) | |
const outputDir = path.resolve('./output/') | |
const main = async () => { | |
for (const [fileName, url] of data) { | |
console.log({ fileName }) |
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 merge2DArray = arr => { | |
return arr.reduce((acc, secondData) => { | |
if (acc.length < secondData.length) { | |
const loopTimes = secondData.length - acc.length | |
for (let i = 1; i <= loopTimes; i++) { | |
acc.push('') | |
} | |
} | |
secondData.map((value, index) => { |
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
{ | |
"AF": "Afghanistan", | |
"AX": "Åland Islands", | |
"AL": "Albania", | |
"DZ": "Algeria", | |
"AS": "American Samoa", | |
"AD": "Andorra", | |
"AO": "Angola", | |
"AI": "Anguilla", | |
"AQ": "Antarctica", |
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
#!/bin/bash | |
# Create new create react app pwa with eslint, prettier, jsconfig, and editorconfig | |
# Second argument is set to true if you want to open vscode | |
# Third argument is set to true if you to test with jest | |
echo "Create new create react app pwa with eslint, prettier, jsconfig, and editorconfig" | |
echo "Second argument is set to true if you want to open vscode" | |
echo "Third argument is set to true if you to test with jest" |
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
#!/bin/bash | |
# Create new create react app with eslint, prettier, jsconfig, and editorconfig | |
# Second argument is set to true if you want to open vscode | |
# Third argument is set to true if you to test with jest | |
echo "Create new create react app with eslint, prettier, jsconfig, and editorconfig" | |
echo "Second argument is set to true if you want to open vscode" | |
echo "Third argument is set to true if you to test with jest" |