Skip to content

Instantly share code, notes, and snippets.

Peter Hedenskog soulgalore

Block or report user

Report or block soulgalore

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
@soulgalore
soulgalore / safari.js
Last active Aug 13, 2019
Run Safari on iOS using Selenium
View safari.js
const { Builder, Capabilities } = require('selenium-webdriver');
(async function example() {
const caps = Capabilities.safari();
caps.set('platformName', 'iOS');
const driver = await new Builder()
.forBrowser('safari')
.withCapabilities(caps)
.build();
try {
@soulgalore
soulgalore / chrome-trace.json
Created May 13, 2019
Chrome trace of testing a SPA with extra end event
View chrome-trace.json
This file has been truncated, but you can view the full file.
@soulgalore
soulgalore / lite.txt
Created Mar 18, 2019
Force Lite pages in Chrome on Android
View lite.txt
# What do you actually need to enable Lite pages on Android on with command line switches?
Been trying on Chrome Beta and Chrome Dev:
--data-reduction-proxy-lo-fi=always-on
--enable-data-reduction-proxy-lite-page
--force-effective-connection-type=2G
That doesn't work for me, what am I missing?
View budgetOutput.json
{
"working": {
"https://www.sitespeed.io": [
{
"metric": "firstPaint",
"type": "timings",
"value": 351,
"friendlyValue": "351 ms",
"limit": 1000,
"friendlyLimit": "1.000 s",
@soulgalore
soulgalore / wpt.har
Created Jan 17, 2018
PageXray picks up wrong http version
View wpt.har
{"log":{"version":"1.1","creator":{"name":"WebPagetest","version":"17.12"},"browser":{"name":"Chrome","version":"63.0.3239.132"},"pages":[{"startedDateTime":"2018-01-17T08:03:33.827+00:00","title":"Run 1, First View for https://en.wikipedia.org/wiki/Barack_Obama","id":"page_1_0_1","pageTimings":{"onLoad":5272,"onContentLoad":-1,"_startRender":2500},"_minify_total":-1,"_responses_200":95,"_testStartOffset":0,"_bytesOut":48608,"_gzip_savings":0,"_requestsFull":95,"_start_epoch":0,"_connections":2,"_bytesOutDoc":47484,"_result":0,"_final_base_page_request_id":"46430.3","_base_page_dns_ns":"ns1.wikimedia.org","_basePageSSLTime":54,"_docTime":5272,"_domContentLoadedEventEnd":605,"_image_savings":39380,"_requestsDoc":93,"_score_cookies":-1,"_base_page_ip_ptr":"text-lb.eqiad.wikimedia.org","_score_cdn":0,"_optimization_checked":1,"_score_minify":-1,"_gzip_total":550009,"_responses_404":0,"_loadTime":5272,"_URL":"https://en.wikipedia.org/wiki/Barack_Obama","_score_combine":-1,"_score_etags":-1,"_image_total":804962,"
View compare-har.json
{
"har1": {
"url": "https://s3.amazonaws.com/results.sitespeed.io/en.wikipedia.org/2018-11-27-15-14-01/pages/en.wikipedia.org/wiki/Barack_Obama/data/browsertime.har.gz",
"label": "Before",
"run": 1
},
"har2": {
"url": "https://s3.amazonaws.com/results.sitespeed.io/en.wikipedia.org/2018-11-27-16-50-59/pages/en.wikipedia.org/wiki/Barack_Obama/data/browsertime.har.gz",
"label": "Banner",
"run": 1
View gist:d88d19cfb778f4b9b7fb831026093edb
{
"har1": {
"url": "https://s3.amazonaws.com/results.sitespeed.io/en.wikipedia.org/2018-10-18-08-50-26/pages/en.wikipedia.org/wiki/Barack_Obama/data/browsertime.har.gz",
"label": "Before change"
},
"har2": {
"url": "https://s3.amazonaws.com/results.sitespeed.io/en.wikipedia.org/2018-10-17-15-55-57/pages/en.wikipedia.org/wiki/Barack_Obama/data/browsertime.har.gz",
"label": "After change"
},
"comment": "Look at the first request. Something is seriously wrong there :("
View gist:834323a2262e6a771f579d51f25b4fae
{
"har1": {
"url": "https://s3.amazonaws.com/results.sitespeed.io/en.wikipedia.org/2018-10-18-08-50-26/pages/en.wikipedia.org/wiki/Barack_Obama/data/browsertime.har.gz",
"label": "Before change"
},
"har2": {
"url": "https://s3.amazonaws.com/results.sitespeed.io/en.wikipedia.org/2018-10-17-15-55-57/pages/en.wikipedia.org/wiki/Barack_Obama/data/browsertime.har.gz",
"label": "After change"
},
"comment": "Look at the first request. Something is seriously wrong there :("
View webpagetest-har-with-chunks.har
This file has been truncated, but you can view the full file.
{
"log": {
"version": "1.1",
"creator": {
"name": "WebPagetest",
"version": "18.08"
},
"browser": {
"name": "Chrome",
View gist:b523440adcc8cc0d2b0237bf4c045d60
<?php
/**
* PHP parser that converts wiki markup to HTML.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
You can’t perform that action at this time.