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..... 5s ............................100.0%
“To a mind that is still, the entire universe
surrenders.”
— Zhuangzi
Updated 1 Sept 2026, 07:16:51 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}`