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
@steven-tey
steven-tey / title-from-url.ts
Last active February 20, 2025 12:37
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 / 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

useful tools to generate fake or do mock data

Fake Image

const LOOKUP =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
export function encodeBase64(buffer) {
const view = new Uint8Array(buffer);
let out = [];
for (let i = 0; i < view.length; i += 3) {
const [b1, b2 = 0x10000, b3 = 0x10000] = view.subarray(i, i + 3);
out.push(
b1 >> 2,
@sibelius
sibelius / asyncMentoring.md
Last active November 23, 2022 22:16
async mentoring rules

Async Mentorship

Most mentees belive that they need sync mentorship to be able to explain their problems. However, I've found that doing an async mentorship using text to provide better results. Mentorship is a long term process, you can't "fix" or "improve" someone in a session, it takes time.

image

Mentorship Cycle

The mentee will pass in the 3 steps of the mentorship cycle. The first one is to be in a given situation, or having some problem or doubt.