Skip to content

Instantly share code, notes, and snippets.

View mehuylsharma's full-sized avatar
🐑

Mehul Sharma mehuylsharma

🐑
View GitHub Profile
@mehuylsharma
mehuylsharma / vercelgetter.js
Last active January 18, 2024 06:34
vercelgetter.js
// 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));
}
from rust get rust
from godlylanguage get JS
JS >> rust
@mehuylsharma
mehuylsharma / execsarescary.js
Last active February 3, 2023 17:25
How to run exec() without being a noob
// 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