Skip to content

Instantly share code, notes, and snippets.

View bovan's full-sized avatar

Børge Antonsen bovan

  • AKVA Group
  • Trondheim, Norway
View GitHub Profile
@cecilemuller
cecilemuller / 2019-https-localhost.md
Last active July 29, 2024 05:16
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

#! /bin/bash
######################################################################
#
# This script generates an SSL certficate for local development. To
# execute the script, run `bash create-dev-ssl-cert.sh`. Sudo is
# needed to save the certificate to your Mac KeyChain. After the cert
# is generated, you can use `HTTPS=true yarn start` to run the web
# server.
#
@paulirish
paulirish / log-all-mutations.js
Created January 25, 2023 22:44
Log all DOM mutations to console
// Log all DOM mutations to console.
// Modern interpretation of https://github.com/kdzwinel/DOMListenerExtension
observer = new MutationObserver(onMutation);
observerSettings = {
subtree: true,
childList: true,
attributes: true,
attributeOldValue: true,