Simple cache warmup file with the most common dependencies of websites out there
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const puppeteer = require('puppeteer'); | |
const devices = require('puppeteer/DeviceDescriptors'); | |
const pixelmatch = require('pixelmatch'); | |
var fs = require('fs'); | |
const phone = devices['Nexus 5X']; | |
var first = true; | |
async function writeScreenshot(url, filename, initial) { | |
const browser = await puppeteer.launch(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const puppeteer = require('puppeteer'); | |
const devices = require('puppeteer/DeviceDescriptors'); | |
const pixelmatch = require('pixelmatch'); | |
const extractDomain = require('extract-domain'); | |
var fs = require('fs'); | |
//we'll simulate a nexus 5x for this | |
const phone = devices['Nexus 5X']; | |
/** | |
Will be called after page is loaded to find the CTA and return some info about it, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var e = document.createElement("script"); | |
e.src = "https://pay.google.com/gp/p/js/pay.js"; | |
document.head.appendChild(e); | |
e.onload = function(){ | |
var paymentsClient = new google.payments.api.PaymentsClient({environment: 'TEST'}); | |
var allowedPaymentMethods = ['CARD', 'TOKENIZED_CARD']; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const puppeteer = require('puppeteer'); | |
const lighthouse = require('lighthouse'); | |
const devices = require('puppeteer/DeviceDescriptors'); | |
const pixelmatch = require('pixelmatch'); | |
const {URL} = require('url'); | |
var fs = require('fs'); | |
var first = true; | |
const phone = devices['Nexus 5X']; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** Small puppeteer script to calculate lines of code as used by a website, | |
* to use in infogrphics like this: | |
* https://informationisbeautiful.net/visualizations/million-lines-of-code/ | |
**/ | |
'use strict'; | |
const puppeteer = require('puppeteer'); | |
const fs = require('fs'); | |
var htmlparser = require("htmlparser2"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const puppeteer = require('puppeteer'); | |
const devices = require('puppeteer/DeviceDescriptors'); | |
const Good3G = { | |
'offline': false, | |
'downloadThroughput': 1.5 * 1024 * 1024 / 8, | |
'uploadThroughput': 750 * 1024 / 8, | |
'latency': 40 | |
}; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const puppeteer = require('puppeteer'); | |
const devices = require('puppeteer/DeviceDescriptors'); | |
const Good3G = { | |
'offline': false, | |
'downloadThroughput': 1.5 * 1024 * 1024 / 8, | |
'uploadThroughput': 750 * 1024 / 8, | |
'latency': 40 | |
}; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const puppeteer = require('puppeteer'); | |
const devices = require('puppeteer/DeviceDescriptors'); | |
const Good3G = { | |
'offline': false, | |
'downloadThroughput': 1.5 * 1024 * 1024 / 8, | |
'uploadThroughput': 750 * 1024 / 8, | |
'latency': 40 | |
}; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <WiFi.h> | |
#include <M5StickC.h> | |
int team = 0; | |
String teamnames[2] = { "Human", "Zombie"}; | |
int zombieTeam = 1; | |
int humanTeam = 0; | |
int colors[2] = { GREEN, RED}; | |
int hideTime = 30; // in seconds |
OlderNewer