Skip to content

Instantly share code, notes, and snippets.

wanderview / sw.js
Created Nov 23, 2020
Example "no-op" navigation preload service worker
View sw.js
self.addEventListener(evt => {
// Fallback for subresource requests or in browsers that do not
// support navigation preload.
if (evt.request.mode !== "navigate" || !evt.preloadResponse)
evt.respondWith(async _ => {
// Try to get the navigation preload response.
let r = await evt.preloadResponse;
View showFirstCellInGoogleSheetAsiOSWidget.js
// Modified from @mutsuda's
// by @levelsio
// 1) Make a Google Sheet, we'll pull the first cell e.g. A1
// 2) Publish your Google Sheet, File -> Publish To Web
// 3) Copy the SHEET_ID in the URL, put it in here below:
const endpoint = ""
// 4) Install Scriptable @
// 5) Copy this entire script in to Scriptable (tip: you can send it to your iPhone via Whatsapp/Messenger/Telegram etc)
threepointone /
Last active Oct 25, 2020
Notes on Durable Objects. Part 1 - Migrations.

Note: Since writing this, I've been pointed to some exciting new research/tooling called Project Cambria I'll likely have to rewrite this article taking that into account. Leaving this up for posterity's sake.

(This series isn't meant to be a primer/tutorial, though we might do something regarding it in the future. For official documentation and starters, see

Further - these are my personal views; I expect to be wrong about a lot of them. Indeed, I'm not paying much attention to presenting these well at the moment, simply writing down thoughts. As such, expect these writeups to change often, particularly as the platform takes shape. I'm also mostly a front end guy, so don't get mad if I get it very wrong. Give me feedback! Always happy to learn and make changes.)

Durable Objects are a fascinating new storage primitive from cloudflare for their workers platform. There's a lot of 'cool'

charlespwd / make-mp4-from-profile
Last active Nov 1, 2020
Make a mp4 from a Chrome DevTools Performance Profile
View make-mp4-from-profile
#!/usr/bin/env bash
set -eou pipefail
cat $profile \
| jq '.[] | select(.args.snapshot | . and (type == "string") and contains("/9j"))' \
| jq -s . \
> $timeline
3urdoch / index.html
Last active Nov 25, 2020
TCF2.0 Compliant approach to loading Google Ad Manager, Prebid and Amazon APS tags that prevents TCV2.1a errors
View index.html
<!doctype html>
<html lang="en">
<!-- Quantcast CMP, pasted un-modified from Quantcast interface -->
<script type="text/javascript" async=true>
(function() {
var host = window.location.hostname;
johnmurch / keywordsFromUrl.js
Last active Oct 22, 2020
Parse keywords from URL
View keywordsFromUrl.js
let url = "";
let kwparse = (url.replace('https://','').replace('http://','').replace('www','').replace('com','').split('-').join().split('/').join().split('.')).join(',').replace(/^,/, '')
let kwuniq = [ Set(kwparse.split(','))].filter(function(e){return e});
// ["amazon", "SanDisk", "128GB", "microSDXC", "Memory", "Adapter", "dp", "B073JYC4XM"]
// Hat Tip - Find a cleaner version at
payloadartist /
Last active May 18, 2020
Enumerate sub-domains, then open them in Firefox automatically. Useful for taking a quick glance at target's assets, and make notes, while doing recon.
# ------Instructions---------
# Install (and configure) subfinder, assetfinder, and httprobe
# go get -v && go get -v && go get -v
# cat >> ~/.bashrc
# source ~/.bashrc
# Usage - subf_ff target.tld
# asset_ff target.tld
subf_ff () {
subfinder -d $1 -silent -t 100 | httprobe -c 50 | sort -u | while read line; do firefox $line; sleep 10; done
View little-vdom-decompiled.js
/* eslint-disable no-unused-vars */
/* eslint-disable no-else-return */
// JSX constructor, similar to createElement()
export const h = (type, props, ...children) => {
return {
// Props will be an object for components and DOM nodes, but a string for
// text nodes
View attributes.css
Seven different types of CSS attribute selectors
// This attribute exists on the element
// This attribute has a specific value of cool
// This attribute value contains the word cool somewhere in it
IanColdwater / twittermute.txt
Last active Nov 30, 2020
Here are some terms to mute on Twitter to clean your timeline up a bit.
View twittermute.txt
Mute these words in your settings here:
You can’t perform that action at this time.