Skip to content

Instantly share code, notes, and snippets.

View connorjclark's full-sized avatar

Connor Clark connorjclark

View GitHub Profile
{"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
"treemap-data": {
"id": "treemap-data",
"title": "Treemap Data",
"description": "Used for treemap visualization.",
"score": null,
"scoreDisplayMode": "informative",
"details": {
"type": "debugdata",
"treemapData": {
"scripts": [
@connorjclark
connorjclark / count-strings-i18n.js
Last active July 22, 2020 18:31
historical LH i18n string coverage
// git rev-list master~1000..master | xargs -n1 -I{} sh -c 'git checkout --quiet {} && yarn i18n:collect-strings > /dev/null && git rev-parse HEAD && node ~/tmp/count/count-strings-i18n.js'
// https://github.com/GoogleChrome/lighthouse/pull/11149
'use strict';
const fs = require('fs');
const glob = require('glob');
/** @typedef {import('../../lib/i18n/locales.js').LhlMessages} LhlMessages */
@connorjclark
connorjclark / README.md
Last active July 8, 2020 03:17
webdev learning materials
@connorjclark
connorjclark / gist:515d05094ffd1fc038894a77156bf226
Created June 9, 2020 23:09
babel preset env esmodules true output
@babel/preset-env: `DEBUG` option
Using targets:
{
"android": "61",
"chrome": "61",
"edge": "16",
"firefox": "60",
"ios": "10.3",
"opera": "48",
@connorjclark
connorjclark / README.md
Created June 8, 2020 22:49
regenerator transpile
// @ts-nocheck
/* eslint-disable */

class MyTestClass {};
async function reg(...args) {
  await 1;
  for (let i = 0; i < 10; i++) await 2;
  await 3;
}
@connorjclark
connorjclark / README.md
Last active May 15, 2020 18:02
Lighthouse Scoring Changes 5.6.0 -> 6.0
@connorjclark
connorjclark / 5.6.0-6.0v1.json
Last active April 28, 2020 23:20
11ty Lighthouse 5.6 -> 6.0 Scoring
[
{
"name": "performance",
"url": "https://www.teami.io/",
"mean": "13.2 -> 35.4",
"mean Δ": 22.2
},
{
"name": "performance",
"url": "https://tto.koser.us/",
Match author styles (not UA or user styles) for an element: https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/core/css/resolver/style_resolver.cc;l=681;drc=28442cacc3be1a7d05a898aba663025a143095ac?originalUrl=https:%2F%2Fcs.chromium.org%2F
... 2 call stack frames away from ...
Collect the rules for an element: https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/core/css/element_rule_collector.cc;drc=28442cacc3be1a7d05a898aba663025a143095ac;bpv=0;bpt=1;l=207?originalUrl=https:%2F%2Fcs.chromium.org%2F
... which calls this a few times for different matching scenarios ...
Collect matching rules: https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/core/css/element_rule_collector.cc;l=133;drc=28442cacc3be1a7d05a898aba663025a143095ac?originalUrl=https:%2F%2Fcs.chromium.org%2F
@connorjclark
connorjclark / README.md
Last active March 27, 2020 18:04
Direct Audit

Direct Audit

This recipe is for advanced usages of Lighthouse as a Node library.

Normally, Lighthouse runs Chrome and generates a set of artifacts to use as input to many core modules (such as audits or computed artifacts). You can use these modules directly, but you must provide the inputs yourself.