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
let foobar = document.getElementById('foobar'); | |
foobar.addEventListener('keyup', e => { | |
let value = e.target.value; | |
let typing = _.endsWith(value, ' '); | |
let cursor = e.target.selectionStart; | |
let addSpace = _.endsWith(value, ' '); | |
let words = _.split(value, ' '); | |
words = _.map(words, _.trim); |
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 fs = require('fs'); | |
fs.readdirSync('./').forEach(file => { | |
if (file.endsWith('.mkv')) { | |
let clean = file.split('.'); | |
let pos = clean.indexOf('720p'); | |
clean = clean.slice(0, pos).join(' ') + '.mkv'; | |
console.log(file, clean, pos); | |
fs.renameSync(file, clean); | |
} |
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
/* VT100 terminal reset (<ESC>c) */ | |
console.log('\033c'); | |
/* numbers comparations */ | |
/**/ [2] == 2; | |
//// true | |
/**/ [] + []; |