Skip to content

Instantly share code, notes, and snippets.

View MattWilcox's full-sized avatar

Matt Wilcox MattWilcox

View GitHub Profile
// Core assets
let coreAssets = [];
// On install, cache core assets
self.addEventListener('install', function (event) {
// Cache core assets
event.waitUntil(caches.open('app').then(function (cache) {
for (let asset of coreAssets) {
cache.add(new Request(asset));
@cassidoo
cassidoo / human.md
Created October 14, 2021 20:22
Human Template for Obsidian
cuid alias tags
human<% tp.file.creation_date("YYYYMMDD-HHmmss") %>
👤 <% tp.file.title.substring(1) %>
<% tp.file.title.substring(1) %>
person/friends, person/family, person/coworker, person/rwc

👤 <% tp.file.title.substring(1) %>

🎂 Birthday: 💌 Email: ☎️ Phone:

@getflourish
getflourish / Import CustomElements from .html files.md
Last active February 22, 2024 08:50
Import CustomElements from .html files

Import CustomElements from .html files

This is the technical implementation of the idea and concept described in my article “Why don’t we use HTML to author web components?

Instead of using template literals, constructors and other specifics to define CustomElements, this is a proposal to just use standard HTML to define CustomElements.

The goal is to import CustomElements like this:

@cassidoo
cassidoo / Igneous.css
Last active December 1, 2021 21:20
An Obsidian theme
/*
IMPORTANT: Change the fonts on lines 31-35 to make this work the way you want!
*/
:root {
--dark0: #2e3440;
--dark1: #3b4252;
--dark2: #434c5e;
@joepie91
joepie91 / promises-faq.md
Last active June 25, 2023 09:02
The Promises FAQ - addressing the most common questions and misconceptions about Promises.