Skip to content

Instantly share code, notes, and snippets.

View malchata's full-sized avatar

Jeremy Wagner malchata

View GitHub Profile
// Vendors
import { h, render, Fragment, Component } from "preact";
// Components
import MenuItem from "../MenuItem/MenuItem.js";
// CSS
import "./Menu.css";
class Menu extends Component {
@malchata
malchata / styles.less
Last active February 19, 2021 16:23
Just transferring over my atom styles to another machine the hard way.
atom-workspace {
--editor-font-size: 1.75rem;
}
atom-text-editor {
.cursor {
border-left: .25rem solid;
transition: opacity .1875s ease-out;
}
atom-workspace {
--editor-font-size: 1.625rem;
}
atom-text-editor {
.cursor {
border-left: .25rem solid;
transition: opacity .1875s ease-out;
}
/**
* Obtained from the HTTP Archive's BigQuery dataset.
* Dataset table name: httparchive.summary_requests.2018_04_15_desktop
* BigQuery guide: https://bit.ly/2wpdyOV
**/
{
"type": "image",
"format": "jpg",
"Requests": "9153030",
@malchata
malchata / measure-image-decode.js
Last active January 26, 2022 09:44
A super Jerry-rigged way of getting image decode times from traces captured using Puppeteer
// This is Node script that uses Puppeteer (headless Chrome) to measure the decode time
// of a single image injected into a blank HTML document. It uses minimist to take command
// line arguments. Example usage: node measure-image-decode.js https://example.com/example-image.jpg
// This example assumes you're running a local server to grab the blank document.
// Thanks to Paul Irish and Tim Kadlec for their input!
const puppeteer = require("puppeteer");
const argv = require("minimist")(process.argv.slice(2));
async function getDecode(url) {
This file has been truncated, but you can view the full file.
{"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3259.0 Safari/537.36","lighthouseVersion":"2.5.1","generatedTime":"2017-11-05T19:14:57.019Z","initialUrl":"http://alistapart.com/author/adamsilver.html","url":"http://alistapart.com/author/adamsilver.html","audits":{"first-meaningful-paint":{"score":95,"displayValue":"1,720 ms","rawValue":1723.5,"optimalValue":"< 1,600 ms","extendedInfo":{"value":{"timestamps":{"navStart":987636654049,"fCP":987638377507,"fMP":987638377511,"onLoad":987641251760,"endOfTrace":987646648538},"timings":{"navStart":0,"fCP":1723.458,"fMP":1723.462,"onLoad":4597.711,"endOfTrace":9994.489},"fmpFellBack":false}},"scoringMode":"numeric","name":"first-meaningful-paint","category":"Performance","description":"First meaningful paint","helpText":"First meaningful paint measures when the primary content of a page is visible. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/first-meaningful-paint)."},"speed-ind
This file has been truncated, but you can view the full file.
{"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3259.0 Safari/537.36","lighthouseVersion":"2.5.1","generatedTime":"2017-11-05T19:21:49.070Z","initialUrl":"http://alistapart.com/article/what-the-failure-of-new-coke-can-teach-us-about-user-research-and-design.html","url":"http://alistapart.com/article/what-the-failure-of-new-coke-can-teach-us-about-user-research-and-design.html","audits":{"first-meaningful-paint":{"score":97,"displayValue":"1,550 ms","rawValue":1550.2,"optimalValue":"< 1,600 ms","extendedInfo":{"value":{"timestamps":{"navStart":988046336638,"fCP":988047886817,"fMP":988047886819,"onLoad":988052237931,"endOfTrace":988057704215},"timings":{"navStart":0,"fCP":1550.179,"fMP":1550.181,"onLoad":5901.293,"endOfTrace":11367.577},"fmpFellBack":false}},"scoringMode":"numeric","name":"first-meaningful-paint","category":"Performance","description":"First meaningful paint","helpText":"First meaningful paint measures when the primary content of
This file has been truncated, but you can view the full file.
{"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3259.0 Safari/537.36","lighthouseVersion":"2.5.1","generatedTime":"2017-11-05T19:16:34.986Z","initialUrl":"http://alistapart.com/","url":"http://alistapart.com/","audits":{"first-meaningful-paint":{"score":97,"displayValue":"1,500 ms","rawValue":1498.9,"optimalValue":"< 1,600 ms","extendedInfo":{"value":{"timestamps":{"navStart":987733140434,"fCP":987734639380,"fMP":987734639382,"onLoad":987737086605,"endOfTrace":987743948012},"timings":{"navStart":0,"fCP":1498.946,"fMP":1498.948,"onLoad":3946.171,"endOfTrace":10807.578},"fmpFellBack":false}},"scoringMode":"numeric","name":"first-meaningful-paint","category":"Performance","description":"First meaningful paint","helpText":"First meaningful paint measures when the primary content of a page is visible. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/first-meaningful-paint)."},"speed-index-metric":{"score":84,"displayValue":"2,74
This file has been truncated, but you can view the full file.
{"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3258.0 Safari/537.36","lighthouseVersion":"2.5.1","generatedTime":"2017-11-05T15:49:28.590Z","initialUrl":"http://alistapart.com/author/adamsilver.html","url":"http://alistapart.com/author/adamsilver.html","audits":{"first-meaningful-paint":{"score":89,"displayValue":"2,130 ms","rawValue":2128.5,"optimalValue":"< 1,600 ms","extendedInfo":{"value":{"timestamps":{"navStart":975284922774,"fCP":975287051229,"fMP":975287051231,"onLoad":975290505095,"endOfTrace":975315154356},"timings":{"navStart":0,"fCP":2128.455,"fMP":2128.457,"onLoad":5582.321,"endOfTrace":30231.582},"fmpFellBack":false}},"scoringMode":"numeric","name":"first-meaningful-paint","category":"Performance","description":"First meaningful paint","helpText":"First meaningful paint measures when the primary content of a page is visible. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/first-meaningful-paint)."},"speed-in
This file has been truncated, but you can view the full file.
{"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3258.0 Safari/537.36","lighthouseVersion":"2.5.1","generatedTime":"2017-11-05T15:51:36.245Z","initialUrl":"http://alistapart.com/article/what-the-failure-of-new-coke-can-teach-us-about-user-research-and-design.html","url":"http://alistapart.com/article/what-the-failure-of-new-coke-can-teach-us-about-user-research-and-design.html","audits":{"first-meaningful-paint":{"score":93,"displayValue":"1,880 ms","rawValue":1876.7,"optimalValue":"< 1,600 ms","extendedInfo":{"value":{"timestamps":{"navStart":975432649122,"fCP":975434525777,"fMP":975434525779,"onLoad":975439074622,"endOfTrace":975444520234},"timings":{"navStart":0,"fCP":1876.655,"fMP":1876.657,"onLoad":6425.5,"endOfTrace":11871.112},"fmpFellBack":false}},"scoringMode":"numeric","name":"first-meaningful-paint","category":"Performance","description":"First meaningful paint","helpText":"First meaningful paint measures when the primary content of a