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
| // my network was bad so I made two sleep() calls | |
| // if your PC/laptop is decent and internet is okay you can shorten them but upto you | |
| const elements = document.querySelectorAll('.geist-container.md-row.lg-row') | |
| const fz = Array.from(elements).filter(r => r.classList.length ===4) | |
| async function sleep(ms) { | |
| return new Promise(resolve => setTimeout(resolve, ms)); | |
| } |
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
| from rust get rust | |
| from godlylanguage get JS | |
| JS >> rust |
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
| // this is inside a for loop (let path = 0; path < list.length; path++) | |
| // exec(command).on("close", () => this function runs when the process has finished successfully) | |
| // you can ignore the commands specifically they're running fine | |
| exec(`ffmpeg -y -i ${list[path]} -vf "setpts=1.25*PTS" -r 29.97 ${toEncodePath}`) | |
| .on("close",() => { | |
| console.log(`Encoded ${path} file.`) | |
| // path goes like this: 2 1 0 because the exec(s) finish at different times |