Skip to content

Instantly share code, notes, and snippets.

@t3dotgg
t3dotgg / try-catch.ts
Last active January 2, 2026 02:04
Theo's preferred way of handling try/catch in TypeScript
// Types for the result object with discriminated union
type Success<T> = {
data: T;
error: null;
};
type Failure<E> = {
data: null;
error: E;
};
@thewheat
thewheat / brunei_calendar.csv
Last active December 31, 2025 11:49
Brunei Calendar Dates for Public Holidays, School Terms, School Term Holidays based
Name Type Start Date End Date Moon Dependent Notes
New Year's Day Public Holiday 2026-01-01 2026-01-01 N Thursday
Isra' Mi'raj Public Holiday 2026-01-17 2026-01-17 N Saturday
Isra' Mi'raj Public Holiday Replacement (Private) 2026-01-19 2026-01-19 N Monday
Chinese New Year Public Holiday 2026-02-17 2026-02-17 N Tuesday
First Day of Ramadhan Public Holiday 2026-02-19 2026-02-19 Y Thursday
National Day Public Holiday 2026-02-23 2026-02-23 N Monday
Nuzul Al-Qur'an Public Holiday 2026-03-07 2026-03-07 Y Saturday
Nuzul Al-Qur'an Public Holiday Replacement (Private) 2026-03-09 2026-03-09 N Monday
Hari Raya Public Holiday 2026-03-21 2026-03-24 Y 3 days starting on Saturday / Sunday
@timvisee
timvisee / falsehoods-programming-time-list.md
Last active January 1, 2026 10:49
Falsehoods programmers believe about time, in a single list

Falsehoods programmers believe about time

This is a compiled list of falsehoods programmers tend to believe about working with time.

Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.

Falsehoods

  • There are always 24 hours in a day.
  • February is always 28 days long.
  • Any 24-hour period will always begin and end in the same day (or week, or month).