Skip to content

Instantly share code, notes, and snippets.

View zappellinn's full-sized avatar

zappellin zappellinn

  • France
View GitHub Profile
@zappellinn
zappellinn / index.ts
Last active July 28, 2026 15:43
const as Enum
const FRUITS = {
BANANA: 'banana',
APPLE: 'apple',
CITRUS: 'citrus',
} as const;
type ObjectValues<T> = T[keyof T];
type Fruits = ObjectValues<typeof FRUITS>;
@zappellinn
zappellinn / install.sh
Last active June 24, 2026 07:32
Install Vicinae on Macos
# clone repository
git clone https://github.com/vicinaehq/vicinae
# go in repository
cd vicinae
# Install depencencies, require brew
make mac-deps
# Build
@zappellinn
zappellinn / Remove Didomi cookies popup
Created July 29, 2023 00:11
Didomi is a shitty company that forces peeps to either allow complete intrusive cookies or pay to access the website (probably not RGPD friendly but nobody cares)
class ClassWatcher {
constructor(targetNode, classToWatch, classAddedCallback, classRemovedCallback) {
this.targetNode = targetNode
this.classToWatch = classToWatch
this.classAddedCallback = classAddedCallback
this.classRemovedCallback = classRemovedCallback
this.observer = null
this.lastClassState = targetNode.classList.contains(this.classToWatch)