Skip to content

Instantly share code, notes, and snippets.

View sharjeel619's full-sized avatar
🎯
Focusing

Sharjeel Imtiaz sharjeel619

🎯
Focusing
View GitHub Profile
ipconfig /release; ipconfig /flushdns; ipconfig /renew; netsh winsock reset; netsh interface ipv4 reset; netsh interface ipv6 reset; netsh interface ip delete destinationcache;
@sharjeel619
sharjeel619 / gist:332f190aadbc8309312a54e7739960c2
Last active March 21, 2024 21:39
Alternative to setTimeout
// These examples Block UI
let startTime = performance.now();
while (performance.now() - startTime < 500) {
// // Do nothing for 500 ms to emulate extremely slow code
}
const wait = (ms) => {
const start = Date.now();
let now = start;