Skip to content

Instantly share code, notes, and snippets.

View cnrkuo's full-sized avatar
💻
Coding

Conor Kuo cnrkuo

💻
Coding
View GitHub Profile
@cnrkuo
cnrkuo / Arduino_binary_stopwatch.ino
Last active June 12, 2026 03:32
Arduino Binary Stopwatch
const int bluePins[4] = {3, 2, 1, 0};
const int greenPins[6] = {9, 8, 7, 6, 5, 4};
const int redPins[6] = {13, 12, 11, 10, A1, A2};
const int btnStartPause = A0;
const int btnReset = A5;
const int btnLapView = A3;
const int btnClear = A4;
unsigned long startTime = 0;
unsigned long elapsedTime = 0;
TypeScript..... 16m 42s ........................44.2%
YAML........... 13m 6s .........................34.7%
JSON........... 4m 30s .........................11.9%
CSS............ 3m 28s ..........................9.2%
Other.......... 1s ..............................0.1%
“Do the thing you fear most and the death of fear is
certain.”
— Mark Twain
Updated 12 Jun 2026, 04:51:30 GMT+8
@cnrkuo
cnrkuo / adobe_ae_timers.js
Last active April 21, 2023 14:42
Modern JavaScript code of music timer for Adobe After Effects.
/* 1. Timer */
function padZero (n) {
if (n < 10) return '0' + n;
else return n.toString()
}
t = Math.floor(Math.max((time - inPoint), 0));
min = Math.floor((t % 3600) / 60);
sec = padZero(Math.floor(t % 60));
`${min}:${sec}`