Make sure ffmpeg is up-to-date:
brew update
brew upgrade ffmpeg
Convert a MOV into frames. Tweak the 2/1 if you want more or fewer frames.
| const I = x => x | |
| const K = x => y => x | |
| const A = f => x => f (x) | |
| const T = x => f => f (x) | |
| const W = f => x => f (x) (x) | |
| const C = f => y => x => f (x) (y) | |
| const B = f => g => x => f (g (x)) | |
| const S = f => g => x => f (x) (g (x)) | |
| const S_ = f => g => x => f (g (x)) (x) | |
| const S2 = f => g => h => x => f (g (x)) (h (x)) |
Make sure ffmpeg is up-to-date:
brew update
brew upgrade ffmpeg
Convert a MOV into frames. Tweak the 2/1 if you want more or fewer frames.
| // Create a Promise that resolves after ms time | |
| var timer = function(ms) { | |
| return new Promise(resolve => { | |
| setTimeout(resolve, ms); | |
| }); | |
| }; | |
| // Repeatedly generate a number starting | |
| // from 0 after a random amount of time | |
| var source = async function*() { |
| Service | SSL | status | Response Type | Allowed methods | Allowed headers |
|---|
| /** | |
| * @param {Array} arr - [140, 255, 1] | |
| * @returns {Array} [0.5490196078, 1, 0.003921568627] | |
| */ | |
| export function normalizeArray (arr, value) { | |
| return arr.map(v => v / value) | |
| } | |
| /** | |
| * @param {Number} colorNum 0xff00ff |
It may seem like a bold suggestion that we as web developers can choose the wrong tools for the job because we tend to be swayed by appeals to popularity or authority, but simple statistics imply just that. For example, React (https://reactjs.org/) is a JavaScript framework that emphasizes componentization and simplified state management. It enjoys strong advocacy from a vocal and dedicated userbase within the developer community.
Despite React’s apparent popularity, however, The HTTP Archive observed in 2020 that React only accounted for 4% of all libraries in use across the 7.56 million origins it analyzed (https://almanac.httparchive.org/en/2020/javascript#libraries).
For context, The State of JS 2020 Survey (https://2020.stateofjs.com/en-US/), which surveyed roughly 23,765 respondents, offers the following statistics:
| const { ImagePool } = require('@squoosh/lib') | |
| const path = require('path') | |
| const fs = require('fs-extra') | |
| const srcFolder = path.join(__dirname, 'big') | |
| const files = fs.readdirSync(srcFolder) | |
| const outputFolder = path.join(__dirname, 'output') | |
| fs.ensureDir(outputFolder) | |
| fs.emptyDirSync(outputFolder) |
Based on this blogpost.
To sign Git commits, you need a gpg key. GPG stands for GNU Privacy Guard and is the de facto implementation of the OpenPGP message format. PGP stands for ‘Pretty Good Privacy’ and is a standard to sign and encrypt messages.
Install with Homebrew:
$ brew install gpg