This command updates the repositories in all subfolders inside a folder.
⚠️ The script updates the current banch in each folder.
For e.g. run in code
folder to update respositories in all the subfolders
/code
#!/bin/bash | |
set -x #echo on | |
remote_url=$(git config --get remote.origin.url) | |
for branch in $(git branch --all | grep '^\s*remotes' | egrep --invert-match '(:?HEAD|master)$'); do | |
branch_name=$(echo $branch| cut -d'/' -f 3) | |
git clone -b $branch_name $remote_url $branch_name | |
done |
const puppeteer = require("puppeteer"); | |
// const crawlPage = require("./crawl-urls"); | |
const PAGE_URL = process.argv[2] || "https://pptr.dev"; | |
const bytesToSize = (bytes, decimals = 2) => { | |
if (bytes === 0) return "0 Bytes"; | |
const k = 1024; | |
const dm = decimals < 0 ? 0 : decimals; |
Metric | Description | Link |
---|---|---|
TTFB |
Time To First Byte | https://web.dev/ttfb/ |
FID |
First Input Delay | https://web.dev/fid/ |
LCP |
Largest Contentful Paint | https://web.dev/lcp/ |
CLS |
Cumulative Layout Shift | https://web.dev/cls/ |
FCP |
First Contentful Paint | https://web.dev/first-contentful-paint/ |
FCI |
First CPU Idle | https://web.dev/first-cpu-idle/ |
TBT |
Total Blocking Time | https://web.dev/lighthouse-total-blocking-time/ |
TTI |
Time to Interactive | https://web.dev/tti/ |
/** | |
* PerformanceObserver | |
*/ | |
const po = new PerformanceObserver(list => { | |
let entries = list.getEntries(); | |
entries = dedupe(entries, "startTime"); | |
/** | |
* Print all entries of LCP |
const rels = ['preload', 'prefetch', 'preconnect', 'dns-prefetch', 'prerender', 'modulepreload'] | |
rels.forEach(element => { | |
const linkElements = document.querySelectorAll(`link[rel="${element}"]`) | |
const dot = linkElements.length > 0 ? '🟩' : '🟥' | |
console.log(`${dot} ${element}`) | |
linkElements.forEach(el => console.log(el)) | |
}); |