Skip to content

Instantly share code, notes, and snippets.

Avatar

Peter Hedenskog soulgalore

View GitHub Profile
@soulgalore
soulgalore / marionette.log
Created Oct 19, 2020
Marionette log whet Firefox isn't starting (adb -s ZY322HX8RC logcat | grep Marionette)
View marionette.log
10-19 13:30:47.543 11024 11053 I Gecko : 1603110647543 Marionette TRACE Marionette enabled
10-19 13:30:47.752 11024 11053 I Gecko : 1603110647752 Marionette TRACE Received observer notification toplevel-window-ready
10-19 13:30:47.846 11024 11053 I Gecko : 1603110647846 Marionette TRACE Received observer notification marionette-startup-requested
10-19 13:30:47.847 11024 11053 I Gecko : 1603110647847 Marionette TRACE Waiting until startup recorder finished recording startup scripts...
10-19 13:30:49.457 11024 11053 I Gecko : 1603110649457 Marionette TRACE All scripts recorded.
10-19 13:30:49.458 11024 11053 I Gecko : 1603110649458 Marionette DEBUG Setting recommended pref apz.content_response_timeout to 60000
10-19 13:30:49.458 11024 11053 I Gecko : 1603110649458 Marionette DEBUG Setting recommended pref browser.contentblocking.introCount to 99
10-19 13:30:49.459 11024 11053 I Gecko : 1603110649459 Marionette DEBUG Setting recommended pref browser.download.panel.shown to true
10-19 13:30:49.459
@soulgalore
soulgalore / marionette-log
Last active Oct 16, 2020
Log running adb -s ZY322HX8RC logcat | grep Marionette
View marionette-log
10-16 13:27:01.596 23241 23271 I Gecko : 1602851221596 Marionette TRACE Marionette enabled
10-16 13:27:01.785 23241 23271 I Gecko : 1602851221785 Marionette TRACE Received observer notification toplevel-window-ready
10-16 13:27:01.884 23241 23271 I Gecko : 1602851221884 Marionette TRACE Received observer notification marionette-startup-requested
10-16 13:27:01.886 23241 23271 I Gecko : 1602851221886 Marionette TRACE Waiting until startup recorder finished recording startup scripts...
10-16 13:33:10.924 23818 23851 I Gecko : 1602851590924 Marionette TRACE Marionette enabled
10-16 13:33:11.115 23818 23851 I Gecko : 1602851591115 Marionette TRACE Received observer notification toplevel-window-ready
10-16 13:33:11.210 23818 23851 I Gecko : 1602851591210 Marionette TRACE Received observer notification marionette-startup-requested
10-16 13:33:11.211 23818 23851 I Gecko : 1602851591211 Marionette TRACE Waiting until startup recorder finished recording startup scripts...
10-16 13:33:12.864 23818 2385
View getGreen.js
'use strict';
const Database = require('better-sqlite3');
// keep the name in package.json so its easy just to chanfe
const DATABASE_NAME= require('./package').database_name;
function getQ(domains) {
const q = [];
for(let domain of domains){
q.push('?')
@soulgalore
soulgalore / safari.js
Last active Nov 20, 2020
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 :("
You can’t perform that action at this time.