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://gist.github.com/rubinchyk/46d9868e2eb86d744abcb83b5b6d8d29
https://gist.github.com/erkobridee/ac14ce7f52f66a05747511adf33bc2fa
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random
@erkobridee
erkobridee / WCAG.md
Last active February 25, 2025 13:50
Web Content Accessibility Guidelines (WCAG)
export const removeQueryParam = (key: string) => {
const existingValue = getFromQuery(key)
if (existingValue === null) {
return;
}
const url = new URL(window.location as any);
url.searchParams.delete(key);
history.pushState({}, '', url);

Docker on Ubuntu

Step 01 - Install Docker

# If more information needed, head to this tutorial:
# https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-22-04

# Firstly update your existing list of packages
sudo apt update
/*
code to get the channel id the youtube video page
the output in case of susscess will open on a new
browser tab the youtube channel feed as JSON
initially based on
https://paperless.blog/youtube-channel-web-feed-bookmarklet
but I got some edge cases where that doesn't work, so I reworked it
// https://jsfiddle.net/erkobridee/56nwr3d2/1/
/*
references
Digital Root | Math is Fun
https://www.mathsisfun.com/numbers/digital-root.html
Digital Root Calculator | Omni Calculator
https://www.omnicalculator.com/math/digital-root