Skip to content

Instantly share code, notes, and snippets.

View inneroot's full-sized avatar

Gleb F inneroot

View GitHub Profile
@inneroot
inneroot / small-vim-keys-ascii.txt
Last active July 19, 2023 13:40
small vim arrow keys ASCII created in ASCII_Art_Paint
▒██████████▒
███▓▓██▓▓██▓
███▓▓▓▓████▓
███▓▓██▓▓██▓
░█████████░▒██████████▒░█████████░
██▓▓██▓▓██░▒▓▓▓▓▓▓▓▓▓▓▒░██▓▓██████
█▒██▓▓▓▓▓▓██░▒▒▒▒▒▒▒▒▒▒▒▒░██▓▓██████▒█
█ ▒██▓▓██▓▓██░▓██████████▓░██▓▓▓▓▓▓██▒ █
█ ▒██████████░███████▓▓███░██████████░ █
█ ░▓▓▓▓▓▓▓▓▓▓░███▓▓██▓▓███░▓▓▓▓▓▓▓▓▓▓░ █
@inneroot
inneroot / vim-keys-ascii.txt
Last active July 19, 2023 13:27
vim arrow keys ASCII created in ASCII_Art_Paint
░░░░░░░░░░░░░░░░
░████████████████████░
░████▓▓▓██████▓▓▓████░
░████▓▓▓███▓▓▓███████░
░████▓▓▓▓▓▓██████████░
░████▓▓▓███▓▓▓███████░
░████▓▓▓██████▓▓▓████░
░████████████████▓░▒████████████████████▒░▓████████████████░
░█████▓▓▓█████▓▓▓████▒▓▓████████████████▓▓▒█████▓▓▓███████████▓░
░█████▓▓▓█████▓▓▓████▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒█████▓▓▓███████████▓░
@inneroot
inneroot / arrow-keys-ascii.txt
Last active July 19, 2023 13:19
arrow keys ASCII created by ASCII_Art_Paint
░░░░░░░░░░░░░░░░
░████████████████████░
░█████████▓▓█████████░
░███████▓▓▓▓▓▓███████░
░████▓▓▓▓▓▓▓▓▓▓▓█████░
░████▓▓▓▓▓▓▓▓▓▓▓█████░
░████████████████████░
░████████████████▓░▒████████████████████▒░▓████████████████░
░████████████████████▒▓▓████████████████▓▒▒███████████████████▓░
░█████████▓▓▓▓███████▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒███████▓▓▓▓████████▓░
@inneroot
inneroot / hollow-knight-head-accii-art.txt
Last active July 19, 2023 12:05
hollow knight head ASCII created by ASCII_Art_Paint
░▒███ ███░
░▒▒█▓▒ ▒▒▓█░░
░░▒██▓▓▓ ▓▓▓▓██░░
░▒█▓▒░ ░▓█▒░
░▒█▓▒░ ░▓█▒░
░▒█▓▒▒ ░▒▓█▒░
░▒██▓▓▒▒▒▒▒▒▒▒▒▒▓▓██░
░░▒▒███████████████████▓░
░░▒▓█████████████████████▓░
░▒▒▓██████████████████████▓▒░
@inneroot
inneroot / fox-accii-art.txt
Created July 19, 2023 09:02
Fox ASCII Art created by ASCII_Art_Paint
▓▓▓▓▓ ▓▓▓▓▓
▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓
▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓
▓▓▓▓ ░░▓▓▓▓▓▓ ▓▓▓▓▓▓░░ ▓▓▓▓
▓▓▓▓ ░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░ ▓▓▓▓
▓▓▓▓ ░░░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░ ▓▓▓▓
▓▓▓▓▓░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░▓▓▓▓▓
▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒
▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒
▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒
@inneroot
inneroot / arrayToBatchGenerator.js
Created March 10, 2022 06:47
split array to batches with generator
function* batchGenerator(array, batchSize) {
const arrCopy = [...array];
while(arrCopy.length>0){
yield arrCopy.splice(0, batchSize);
}
}
@inneroot
inneroot / forAwait.js
Created November 23, 2021 16:13
for await loop javascript
async function start() {
for await (let asyncFunction of asyncFunctions ) {
console.log(await asyncFunction())
}
}
start();
@inneroot
inneroot / forAwaitPromiseArr.js
Created June 16, 2020 13:37
Concurrent loop through array of Promises
callApi = [url1, url2, url3]
const pormiseArr = callApi.map(v => getFromApi(v))
const ConcurrentLoop = async() => {
for await (const resolvedPromise in pormiseArr) {
console.log(resolvedPromise)
}
}
@inneroot
inneroot / returnConcurrentResult.js
Last active June 16, 2020 13:27
return Result of concurrent tasks
const returnPromeseAll = async () => {
try{
const a = getPromise1()
const b = getPromise2()
const concurrentResult = await Promise.all([a, b])
}
catch(err) {
throw err
}
return concurrentResult
@inneroot
inneroot / returnPromiseFromPromise.js
Last active June 16, 2020 13:23
return Promise From Promise
const returnPromiseFromPromise = async (decree) => {
return new Promise((resolve, reject) => {
getPromise()
.then(result => resolve(result))
.catch(Error => reject(Error))
})
}