Skip to content

Instantly share code, notes, and snippets.

View toohard2explain's full-sized avatar
🍇

toohard2explain

🍇
  • freelancing
  • Hamburg, Germany
  • 18:35 (UTC +01:00)
View GitHub Profile
@AlejandroAkbal
AlejandroAkbal / compose.yml
Created February 10, 2024 16:53
Matomo 5 docker compose
version: '3'
services:
matomo:
image: 'bitnami/matomo:latest'
depends_on:
- db
volumes:
- 'matomo:/bitnami'
environment:
- MATOMO_DATABASE_HOST=db
@KristofferEriksson
KristofferEriksson / useBroadcastChannel.ts
Created February 5, 2024 09:20
A React hook that allows you to send and receive messages between browser tabs or windows
import { useCallback, useEffect, useRef, useState } from "react";
interface UseBroadcastChannelOptions {
name: string;
onMessage?: (event: MessageEvent) => void;
onMessageError?: (event: MessageEvent) => void;
}
interface UseBroadcastChannelReturn<D, P> {
isSupported: boolean;