Skip to content

Instantly share code, notes, and snippets.

@stretch07
stretch07 / keybase.md
Created May 18, 2024 03:12
keybase.md

Keybase proof

I hereby claim:

  • I am stretch07 on github.
  • I am stretch07 (https://keybase.io/stretch07) on keybase.
  • I have a public key whose fingerprint is 5DE5 1592 F7FE 6F13 52F1 21A2 BF61 A07A 20C8 E417

To claim this, I am signing this object:

@stretch07
stretch07 / sw.js
Created April 14, 2024 20:25
simple service worker that caches all URLs that are fetced in a whitelist
const RUNTIME = "RUNTIMENAME"
const HOSTNAME_WHITELIST = [
self.location.hostname,
]
// The Util Function to hack URLs of intercepted requests
const getFixedUrl = (req) => {
let now = Date.now()
let url = new URL(req.url)
@stretch07
stretch07 / dir2json.html
Last active May 7, 2022 03:28
Easily structure your directory into JSON with dir2json
<!doctype html>
<html>
<head>
<title>dir2json</title>
<style>
button {
background-color: khaki;
border: none;
color: white;