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
(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)))
@connorjclark
connorjclark / memory-test.ts
Created May 27, 2020 18:48
memory leak test
import { ChildProcess, spawn } from 'child_process';
import * as puppeteer from 'puppeteer';
const DEBUG = Boolean(process.env.DEBUG);
const CI = Boolean(process.env.CI);
const QUERY = Boolean(process.env.QUERY);
jest.setTimeout((QUERY ? 200 : 100) * 1000);
interface MemorySample {
// 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
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
# 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
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
@connorjclark
connorjclark / lighthouse.txt
Last active August 21, 2021 00:12
print size of node_modules for every commit
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
#states
s1
s2
s3
s4
s5
s6
#initial
s1
#accepting