yarn test --maxWorkers=50% 2>&1 | grep FAIL | sort -uyarn test --testTimeout=400 2>&1 | grep FAILSome of these tests may take some time as they have user interaction.
| $ ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4 |
| // TODO: make `pages` optional and measure the div when unspecified, this will | |
| // allow more normal document flow and make it easier to do both mobile and | |
| // desktop. | |
| import { | |
| createContext, | |
| useCallback, | |
| useContext, | |
| useEffect, | |
| useMemo, | |
| useRef, |
| import React, { useCallback, useMemo } from "react" | |
| import LanguageKeysDe from "./de" | |
| import LanguageKeys, { LangProps } from "./en" | |
| /** | |
| Full example here: | |
| https://codesandbox.io/s/simple-react-typescript-i18n-w0ut6 | |
| **/ |
| const fs = require('fs'); | |
| const fetch = require('node-fetch'); | |
| const FormData = require('form-data'); | |
| const filePath = `path/to/file.ext`; | |
| const form = new FormData(); | |
| const stats = fs.statSync(filePath); | |
| const fileSizeInBytes = stats.size; | |
| const fileStream = fs.createReadStream(filePath); | |
| form.append('field-name', fileStream, { knownLength: fileSizeInBytes }); |
| //note: month is 0 based, just like Dates in js | |
| function getWeeksInMonth(year, month) { | |
| const weeks = [], | |
| firstDate = new Date(year, month, 1), | |
| lastDate = new Date(year, month + 1, 0), | |
| numDays = lastDate.getDate(); | |
| let dayOfWeekCounter = firstDate.getDay(); | |
| for (let date = 1; date <= numDays; date++) { |
| /* Ultra lightweight Github REST Client */ | |
| // original inspiration via https://gist.github.com/v1vendi/75d5e5dad7a2d1ef3fcb48234e4528cb | |
| const token = 'github-token-here' | |
| const githubClient = generateAPI('https://api.github.com', { | |
| headers: { | |
| 'User-Agent': 'xyz', | |
| 'Authorization': `bearer ${token}` | |
| } | |
| }) |
| #!/bin/bash | |
| # Requirements: | |
| # - homebrew: https://brew.sh/ | |
| # - homebrew tap: buo/cask-upgrade - https://github.com/buo/homebrew-cask-upgrade | |
| # - homebrew mas (Mac App Store command-line interface - https://github.com/mas-cli/mas) | |
| # Update, upgrade all and cleanup | |
| brew update && brew upgrade && brew cu --all --yes --cleanup && mas upgrade && brew cleanup | |
| # Dump all taps, apps, casks and mac apps into ~/Brewfile |
| # Stop all containers | |
| docker stop `docker ps -qa` | |
| # Remove all containers | |
| docker rm `docker ps -qa` | |
| # Remove all images | |
| docker rmi -f `docker images -qa ` | |
| # Remove all volumes |