This script is designed to be used within BrowersStack as a "quick" way to get the WebVitals reporting on INP for mobile devices
It uses the web-vitals library and provides a slimmed down version of the official web-vitals chrome extension
This script is designed to be used within BrowersStack as a "quick" way to get the WebVitals reporting on INP for mobile devices
It uses the web-vitals library and provides a slimmed down version of the official web-vitals chrome extension
<html> | |
<head> | |
<style> | |
body { font-family: sans-serif; width: 100%; } | |
div,body { text-align: center; } | |
h1,h2,h3,button { color: #2a2a2a; font-family: sans-serif; margin: 0; } | |
#browser.success,.success { color: #0bce6b; } | |
.failure { color: #ff4e42; } | |
.hide { color: rgba(0,0,0,0); } |
#!/usr/bin/env bash | |
# This script compares the different compression & download times of a cdn using the `Accept-Encoding` header | |
# It will compare Brotli, Gzip, and uncompressed responses | |
# | |
# ./compare-compress.sh https://my-url.com | |
set -euo pipefail | |
URL=$1 |
const DOMAIN = 'calendar.google.com' | |
const FILENAME = 'gcal-cookies.txt' | |
/** -------- | |
This background chrome extension script will download all cookies | |
for a page into a file periodically when you visit, useful for if | |
you can't generate your own API Access tokens or service accounts | |
but want to use your logged in cookies to read from a service, | |
e.g. google calendar |
/* | |
* You will need to run | |
* npm install xml2json node-fetch | |
* | |
* Run this script using | |
* SITEMAP_DOMAIN=... SITEMAP_PATH=... node index.js | |
*/ | |
var fetch = require('node-fetch') | |
var p = require('xml2json') |
/** | |
* @typedef {Function} CaseFunction | |
* @param {...*} [args] - List of args provided to anonymous function | |
*/ | |
/** | |
* @typedef {Function} SwitchFunction | |
* @param {string} [c='default'] - case string to match | |
* @param {...*} [args] - args to pass to matched SwitchFunction | |
* @returns {*} - Result of matching case in SwitchMap either CaseFunction called with args, or value |
;;; .itunes.el --- Package to interact with iTunes & Apple music from within Emacs | |
;;; Commentary: | |
;; | |
;;; Code: | |
(require 'dash) | |
(defvar -itunes-playlist "Emacs - temporary" | |
"The name of the playlist to create for temporary housing tracks.") |
int ints[] = {1,2,3,4,5}; | |
vector<int> vec (ints, ints + sizeof(ints) / sizeof(ints[0]) ); |