In terminal.app, install ffmpeg through homebrew
brew install ffmpeg
Validate the installation:
| /** | |
| * A bookmarklet for viewing shifted elements while debugging | |
| * Cumulative Layout Shift (web.dev/cls). Works in Chrome 84+ | |
| * Shows the previous position of shifted elements in yellow, | |
| * and the new position in red. | |
| * | |
| * To install: | |
| * 1. Copy the code starting from the line beginning `javascript:` | |
| * 2. Add a new bookmark in Chrome, and paste the code in as the URL. | |
| **/ |
| #!/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 |
📺 OpenCV C++ Mac M1 Installation Tutorial Video
We need homebrew installed in our system
brew install cmake
mkdir Open_CV && cd Open_CV| 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 |
| by Addy Osmani (@addyosmani) | |
| https://twitter.com/addyosmani/status/743571393174872064 | |
| ——— | |
| Preresolve DNS hostnames for assets | |
| <link rel="dns-prefetch" href="https://my-site.com"> | |
| Begin a connection handshake in the background | |
| <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> |
| 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)) | |
| }); |