Skip to content

Instantly share code, notes, and snippets.

Rick Viscomi rviscomi

Block or report user

Report or block rviscomi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View http-archive-har-payload.json
{
"startedDateTime": "2019-07-11T23:37:41.920+00:00",
"title": "Run 1, First View for https://webmedia-tunisie.com/",
"id": "page_1_0_1",
"pageTimings": {
"onLoad": 13624,
"onContentLoad": -1,
"_startRender": 4600
},
"_minify_total": -1,
View gist:6033a9f723a78d714d0fec2e8c9bc510
{
"offscreenscore": [
"0.0",
"0.0",
"0.0",
"0.0",
"0.0",
"0.0",
"0.03",
"0.13",
@rviscomi
rviscomi / 01_01.nljson
Last active Jul 24, 2019
Example of Web Almanac metric
View 01_01.nljson
{"volume":"161778","kbytes":"0","pdf":"0.037003430716520895","cdf":"0.037003430716520895"}
{"volume":"41534","kbytes":"10","pdf":"0.0095000586691637856","cdf":"0.046503489385684681"}
{"volume":"22318","kbytes":"20","pdf":"0.0051047890734915334","cdf":"0.051608278459176211"}
{"volume":"33100","kbytes":"30","pdf":"0.0075709525196061365","cdf":"0.059179230978782346"}
{"volume":"45611","kbytes":"40","pdf":"0.010432589588270558","cdf":"0.0696118205670529"}
{"volume":"50755","kbytes":"50","pdf":"0.011609175079535029","cdf":"0.081220995646587926"}
{"volume":"50951","kbytes":"60","pdf":"0.011654006097475899","cdf":"0.092875001744063823"}
{"volume":"54638","kbytes":"70","pdf":"0.012497332440067677","cdf":"0.1053723341841315"}
{"volume":"59040","kbytes":"80","pdf":"0.013504200506270282","cdf":"0.11887653469040178"}
{"volume":"60605","kbytes":"90","pdf":"0.013862162460747127","cdf":"0.13273869715114892"}
View parsed-css.json
{
"type": "stylesheet",
"stylesheet": {
"rules": [
{
"type": "comment",
"comment": "! jQuery UI - v1.9.2 - 2012-11-23\n* http://jqueryui.com\n* Includes: jquery.ui.core.css, jquery.ui.accordion.css, jquery.ui.autocomplete.css, jquery.ui.button.css, jquery.ui.datepicker.css, jquery.ui.dialog.css, jquery.ui.menu.css, jquery.ui.progressbar.css, jquery.ui.resizable.css, jquery.ui.selectable.css, jquery.ui.slider.css, jquery.ui.spinner.css, jquery.ui.tabs.css, jquery.ui.tooltip.css, jquery.ui.theme.css\n* Copyright 2012 jQuery Foundation and other contributors; Licensed MIT ",
"position": {
"start": {
"line": 1,
@rviscomi
rviscomi / crux-cls.sql
Created Jun 17, 2019
Query for cumulative layout shifts in the Chrome UX Report
View crux-cls.sql
SELECT
form_factor.name AS form_factor,
cls.start,
ROUND(SUM(cls.density), 4) AS density
FROM
`chrome-ux-report.all.201905`,
UNNEST(experimental.cumulative_layout_shift.histogram.bin) AS cls
WHERE
origin = 'https://www.nytimes.com'
GROUP BY
@rviscomi
rviscomi / summary_requests.sql
Last active Jul 22, 2019
Takes a HAR-based requests table and converts it into a CSV-style summary_requests table
View summary_requests.sql
CREATE TEMPORARY FUNCTION getSummary(payload STRING, crawlid INT64)
RETURNS STRUCT<requestid INT64, pageid INT64, startedDateTime INT64, time INT64, method STRING, url STRING, urlShort STRING, redirectUrl STRING, firstReq BOOLEAN, firstHtml BOOLEAN, reqHttpVersion STRING, reqHeadersSize INT64,
reqBodySize INT64, reqCookieLen INT64, reqOtherHeaders STRING, status INT64, respHttpVersion STRING, respHeadersSize INT64, respBodySize INT64, respSize INT64, respCookieLen INT64, expAge INT64, mimeType STRING, respOtherHeaders STRING,
req_accept STRING, req_accept_charset STRING, req_accept_encoding STRING, req_accept_language STRING, req_connection STRING, req_host STRING, req_if_modified_since STRING, req_if_none_match STRING, req_referer STRING, req_user_agent STRING,
resp_accept_ranges STRING, resp_age STRING, resp_cache_control STRING, resp_connection STRING, resp_content_encoding STRING, resp_content_language STRING, resp_content_length STRING, resp_content_location STRING, resp_content_type STRING, resp_date ST
@rviscomi
rviscomi / CrashCourseInCrUX.md
Last active May 7, 2019
"Crash Course in CrUX" for the PerfMatters conference, April 2019
View CrashCourseInCrUX.md
View emptyrecipe.html
<script type="application/ld+json">
[
{
"@context": "http://schema.org/",
"@type": "Event"
},
{
"@context": "http://schema.org/",
"@type": "Recipe"
}
@rviscomi
rviscomi / multi <--> single
Created Jun 3, 2018
Convenience functions for turning a multi-line string into concatenated single-line strings and back
View multi <--> single
concat = q => q.split('\n').map(l => `"${l}"`).join('+\n');
multi = q => q.split('\n').map(l => l.replace(/(^"|"\+$)/g, '')).join('\n');
You can’t perform that action at this time.