Skip to content

Instantly share code, notes, and snippets.

View erkobridee's full-sized avatar

Erko Bridee erkobridee

View GitHub Profile
@erkobridee
erkobridee / 01__second-brain-system.md
Last active October 3, 2025 06:14
Second Brain System and productive useful references
@erkobridee
erkobridee / ts-use_consts_instead_of_enums.ts
Last active September 26, 2025 05:35
a sample code of how to use const as const instead of enums in TypeScript
/*
from:
Enums considered harmful | Matt Pocock
https://www.youtube.com/watch?v=jjMbPt_H3RQ
*/
const LogLevel = {
DEBUG: "DEBUG",
INFO: "INFO",
@erkobridee
erkobridee / startup_mvp_vibe.md
Last active September 25, 2025 08:05
startup / MVP vibe
/*
Day.js - format
https://day.js.org/docs/en/display/format
*/
const getLastSundaysOfYear = (year = new Date().getFullYear()) => {
const currentYear = dayjs().year(year);
const lastSundaysOfYearMap = new Map();
for(let i = 0; i < 12; i++) {
const lastSundayOfMonth = currentYear.month(i).endOf('month').day(0);
/*
dynamic sorting an object array
https://dev.to/fpaghar/donesort-an-array-of-objects-ways-in-javascript-48hl
*/
const SortDirection = {
Asc: 1,
Desc: -1
} as const;