Skip to content

Instantly share code, notes, and snippets.

View connorjclark's full-sized avatar

Connor Clark connorjclark

View GitHub Profile
@connorjclark
connorjclark / prime.wat
Last active December 17, 2023 10:56
prime.wat
View prime.wat
(module $ffc-2-Prime
(type $t0 (func (param i32)))
(type $t1 (func (param i32 i32 i32) (result i32)))
(type $t2 (func (param i32) (result i32)))
(type $t3 (func (param i32 i32)))
(type $t4 (func (param i32 i32 i32 i32 i32)))
(type $t5 (func))
(import "env" "memory" (memory $env.memory 1 32768 shared))
(import "env" "set_return_value" (func $env.set_return_value (type $t0)))
(import "env" "do_commands" (func $env.do_commands (type $t1)))
View plugin.js
// This is @esbuild-plugins/node-modules-polyfill, but using a better library
// for polyfills. It was done in this PR which has not merged:
// https://github.com/remorses/esbuild-plugins/pull/19
import fs from 'fs';
import path from 'path';
import escapeStringRegexp from 'escape-string-regexp';
import esbuild from 'esbuild';
@connorjclark
connorjclark / main.js
Last active December 5, 2021 23:23
web platform latest stable features script
View main.js
const browserCompat = require('@mdn/browser-compat-data');
const browsersToConsider = [
'chrome',
'edge',
'firefox',
'safari_ios',
'safari',
];
@connorjclark
connorjclark / script.sh
Created October 29, 2021 17:23
lighthouse chrome bisect cdt-manifest-install-errors-hang
View script.sh
# python bisect-builds.py --verify-range -a mac -g 800000 -b 929940 --use-local-cache --not-interactive -c "bash $PWD/scripts/cdt-manifest-install-errors-hang/script.sh %p"
# result
# https://chromium.googlesource.com/chromium/src/+log/f4571bef8272f8dce9169f8605138d09392fdb74..a4cd0dbf88fe1e055a03f5394fe2cadd1156c7d7
LH=~/src/lighthouse
export CHROME_PATH=$1
# brew install coreutils
@connorjclark
connorjclark / debug.js
Created October 12, 2021 18:42
axe related nodes lh
View debug.js
delete window.define;
(() => {
/*! axe v4.2.3
* Copyright (c) 2021 Deque Systems, Inc.
*
* Your use of this Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This entire copyright notice must appear in every copy of this file you
@connorjclark
connorjclark / axe-related-nodes-lhr.json
Created October 7, 2021 23:38
axe-related-nodes-lhr.json
View axe-related-nodes-lhr.json
@connorjclark
connorjclark / lighthouse.txt
Last active August 21, 2021 00:12
print size of node_modules for every commit
View lighthouse.txt
770868 46d282b83 report(flow): standalone shell report with preact (#12850) 2021-08-18
745328 305540f27 deps: update to typescript@4.4.1-rc (#12909) 2021-08-13
741724 52beae3f0 clients(viewer): convert to ES modules (#12878) 2021-08-10
741244 800ffd6da report: autogenerate components.js from templates.html (#12803) 2021-08-09
741120 c30ba2de5 deps(csp-evaluator): upgrade to exactly 1.0.4 (#12858) 2021-08-04
740824 e58aa09a2 deps: update third-party-web to 0.12.4 (#12753) 2021-07-30
740108 d62acc3d6 deps: update lighthouse-logger to 1.3.0 (#12812) 2021-07-21
740112 3aa15dc69 report: convert to ES modules (#12702) 2021-07-15
731968 0af83bfd6 deps: bump axe-core to 4.2.3 (#12706) 2021-06-25
731936 cacf13540 deps: update `ws` to latest (#12638) 2021-06-10
@connorjclark
connorjclark / input.txt
Created June 18, 2021 21:43
cfg twitter fun
View input.txt
#states
s1
s2
s3
s4
s5
s6
#initial
s1
#accepting
View web.dev_2021-03-30_13-13-30.lighthouse.report.json
{"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4463.0 Safari/537.36","environment":{"networkUserAgent":"Mozilla/5.0 (Linux; Android 7.0; Moto G (4)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4420.0 Mobile Safari/537.36 Chrome-Lighthouse","hostUserAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4463.0 Safari/537.36","benchmarkIndex":1743.5,"credits":{"axe-core":"4.1.3"}},"lighthouseVersion":"7.3.0","fetchTime":"2021-03-30T19:13:30.839Z","requestedUrl":"https://web.dev/","finalUrl":"https://web.dev/","runWarnings":[],"audits":{"is-on-https":{"id":"is-on-https","title":"Uses HTTPS","description":"All sites should be protected with HTTPS, even ones that don't handle sensitive data. This includes avoiding [mixed content](https://developers.google.com/web/fundamentals/security/prevent-mixed-content/what-is-mixed-content), where some resources are loaded over HTTP despite the initial