Skip to content

Instantly share code, notes, and snippets.

View erkobridee's full-sized avatar

Erko Bridee erkobridee

View GitHub Profile
/*
useful references:
https://github.com/erkobridee/lab-pdf-lib/blob/83ef7e53e61227cef4293a6294979b1e551a3603/src/helpers/random.js#L4
https://github.com/erkobridee/nx-todos/blob/1647f66518a6def9ddf7569ca7a2b6397337d09c/libs/shared/helpers/src/lib/values.ts#L25
https://github.com/erkobridee/gatsby-typescript-app-starter/blob/5a7bcfbbe6ff014ecb360da35a3e8255fe80bf9e/src/helpers/values.ts#L21
https://gist.github.com/rubinchyk/46d9868e2eb86d744abcb83b5b6d8d29
@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",
@steven-tey
steven-tey / title-from-url.ts
Last active September 14, 2025 10:55
Get Title from URL
// Note: this gist is a part of this OSS project that I'm currently working on: https://github.com/steven-tey/dub
export default async function getTitleFromUrl (url: string) {
const controller = new AbortController();
const timeoutId = setTimeout(() => controller.abort(), 2000); // timeout if it takes longer than 2 seconds
const title = await fetch(url, { signal: controller.signal })
.then((res) => {
clearTimeout(timeoutId);
return res.text();
})
@erkobridee
erkobridee / startup_mvp_vibe.md
Last active September 25, 2025 08:05
startup / MVP vibe
@erkobridee
erkobridee / nextjs_contentlayer_obsidian.md
Last active June 26, 2024 16:24
create/manage notes > process > publish
@erkobridee
erkobridee / json_partitions_dirs_db.md
Last active June 16, 2023 09:31
json store in multiple files - key / value pattern