Create a network for Traefik and any future containers to join:
docker network create web
Start up the traefik compose file:
docker-compose up -d
View the dashboard: http://localhost:8080
| /** | |
| * Add mobile equivalent for contextmenu event. | |
| * User touches element for a given length of time | |
| */ | |
| const addLongTouch = ( | |
| elem: HTMLElement, | |
| callback: (event: TouchEvent) => void, | |
| delay = 650 | |
| ): (() => void) => { | |
| let timeout: number; |
| /** Gets a typed array from Object.keys */ | |
| function typedObjectKeys<T extends Record<string, any>>(a: T) { | |
| return Object.keys(a) as (keyof T)[]; | |
| } | |
| export default typedObjectKeys; |
| // https://www.typescriptlang.org/play?#code/JYOwLgpgTgZghgYwgAgILIN4ChnLgIwQC5kQBXAW32h2QBMIYSBnMKUAc1o4AtgTyVGrgBWAawA2JAEoQEAeyh0APK3YgOAGlKVqUAHy0KIeQN3QA2gF0sAXyxYA9ACpnyAPIgJAT2QcIYMgADlDyQdBgwBDMyDChFMgAKsgA7jzQKABucBJkKMAx8jDIYN7hyADSyM6OWKXlnj7KidoV+sgAvMgACsAIYs3a2LgW3cigyGIQ3kVJViSJo1bIEAAekCB0MVUA-D3IAhCZNLYWUzPFiVaGTo7IEsAUwIFg8sjyXr6CesGh4VCRaJ1MooABCnQ8n2UqG032gNwUIFYJWiYBI4K6wzwhBIAEYAEwAZk03D4JAALABWABsJPsQA | |
| /** Only get properties from T where value is of type K */ | |
| type Only<T, K> = Pick<T, { | |
| [P in keyof T]: T[P] extends K ? P : never | |
| }[keyof T]> | |
| // | |
| // Writable properties from an interface | |
| // |
| User-agent: * | |
| Disallow: / |
Create a network for Traefik and any future containers to join:
docker network create web
Start up the traefik compose file:
docker-compose up -d
View the dashboard: http://localhost:8080
I hereby claim:
To claim this, I am signing this object:
| /** | |
| * better typing replacement for array method .filter(Boolean) | |
| * | |
| * .filter(Boolean) filters out falsy values, but TypeScript is unaware | |
| * .filter(filterTruthy) does the same but has a type guard. | |
| * | |
| * These examples have identical outputs with differing types | |
| * | |
| * ``` | |
| * [1, 2, 0, null].filter(Boolean) // (number | null)[] |
| #!/bin/bash | |
| sudo echo "*.$1" >> /etc/opendkim/TrustedHosts | |
| sudo echo "mail._domainkey.$1 $1:mail:/etc/opendkim/keys/$1/mail.private" >> /etc/opendkim/KeyTable | |
| sudo echo "*@$1 mail._domainkey.$1" >> /etc/opendkim/SigningTable | |
| cd /etc/opendkim/keys | |
| sudo mkdir $1 | |
| cd $1 | |
| sudo opendkim-genkey -s mail -d $1 | |
| sudo chown opendkim:opendkim mail.private |
| /* close button is conflicting with my theme */ | |
| .leaflet-sidebar .close { | |
| z-index: 1000; | |
| } |