NoteSort Your Gmail Inbox with the Jev API09.29.26 · 8 min
// the whole retry wrapper
async function retry(fn, n = 5) {
for (let i = 0; ; i++) {
try { return await fn() }
catch (e) { if (i >= n) throw e }
await sleep(2 ** i * 100)
}
}
LearningsReact Content Security Policy (CSP) with a Nonce06.25.25 · 2 min
~/notes16notes, written the week it broke
TechnologyClean Up GitHub Workflow Runs From the Terminal02.21.24 · 2 min
“How to rotate a 2x2 matrix in javascript”— matrix rotation in javascript
$ lsof -ti tcp:3000
41873
$ kill -9 41873
✓ port 3000 is free
LearningsRemove node_modules from all folders11.18.20 · 1 min
LearningsMock Framer Motion with Jest10.19.20 · 3 min
LearningsFallback image if image is not found in picture source tag10.18.20 · 3 min
// leap years, the whole rule
const leap = (y) =>
(y % 4 === 0 && y % 100 !== 0)
|| y % 400 === 0
LearningsStop Port in Terminal07.23.20 · 1 min
“Checking if the entered date is a valid date in client side and inform customer to create better UX experience. Checking invalid dates in leap years as well.”— date validation in javascript including leap year and invalid dates