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",
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 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: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 influxdb.log
[2018-08-08 05:11:02] ERROR: Error: A 400 Bad Request error occurred: {"error":"unable to parse 'backEndTime,statistics=timings,pageTimings=backEndTime,category=default,origin=browsertime,summaryType=pageSummary,connectivity=[object Object],cable\\ \\,,browser=chrome,page=_,group=www_nytimes_com median=74,time=1533704745383': invalid boolean\nunable to parse 'backEndTime,statistics=timings,pageTimings=backEndTime,category=default,origin=browsertime,summaryType=pageSummary,connectivity=[object Object],cable\\ \\,,browser=chrome,page=_,group=www_nytimes_com mean=601,time=1533704745383': invalid boolean\nunable to parse 'backEndTime,statistics=timings,pageTimings=backEndTime,category=default,origin=browsertime,summaryType=pageSummary,connectivity=[object Object],cable\\ \\,,browser=chrome,page=_,group=www_nytimes_com mdev=472.3032,time=1533704745383': invalid boolean\nunable to parse 'backEndTime,statistics=timings,pageTimings=backEndTime,category=default,origin=browsertime,summaryType=pageSummary,connectivity=[
@soulgalore
soulgalore / harexport0.6.1.har
Created May 23, 2018
example HAR from HAR export 0.6.1
View harexport0.6.1.har
{"log":{"browser":{"name":"Firefox","version":"61.0"},"creator":{"name":"Firefox","version":"61.0"},"entries":[{"_securityState":"secure","cache":{},"connection":"443","pageref":"page_7","request":{"bodySize":0,"cookies":[],"headers":[{"name":"Host","value":"www.wikipedia.org"},{"name":"User-Agent","value":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:61.0) Gecko/20100101 Firefox/61.0"},{"name":"Accept","value":"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"},{"name":"Accept-Language","value":"en-US,en;q=0.5"},{"name":"Accept-Encoding","value":"gzip, deflate, br"},{"name":"Connection","value":"keep-alive"},{"name":"Upgrade-Insecure-Requests","value":"1"}],"headersSize":335,"httpVersion":"HTTP/2.0","method":"GET","queryString":[],"url":"https://www.wikipedia.org/"},"response":{"bodySize":19459,"content":{"mimeType":"text/html"},"cookies":[{"name":"CP","value":"H2"},{"name":"WMF-Last-Access","value":"23-May-2018"},{"name":"WMF-Last-Access-Global","value":"23-May-2018"},{"name":"GeoIP","val
You can’t perform that action at this time.