Skip to content

Instantly share code, notes, and snippets.

@kslstn
kslstn / themes.js
Last active July 2, 2023 17:04
My script to add theming support and switch between light mode and dark mode
// Find if user has set a preference and react to changes
(function initializeTheme(){
syncBetweenTabs()
listenToOSChanges()
enableTheme(
returnThemeBasedOnLocalStorage() ||
returnThemeBasedOnOS() ||
returnThemeBasedOnTime(),
false)
}())
@jsfan
jsfan / bindify.py
Last active August 31, 2023 18:34 — forked from gmr/bindify.py
Convert tinydns zone files to bind
#!/usr/bin/env python
import argparse
import binascii
import collections
import logging
from os import path
import re
from time import time
logger = logging.getLogger(__name__)