fmpeg -f image2 -framerate 2 -i %2d.jpg out.gifffmpeg -f image2 -framerate 2 -i %2d.jpg -pix_fmt yuv420p -crf 17 -vcodec libx264 out.mp4| #!/bin/bash | |
| function wav2mp3() { | |
| for filename in *.wav; do | |
| echo wav2mp3: converting $filename | |
| mp3_filename="${filename[@]/%wav/mp3}" | |
| lame --preset insane "$filename" "$mp3_filename" | |
| echo wav2mp3: finished converting $filename | |
| echo | |
| done |
| #! /bin/bash | |
| find . -name 'node_modules' -type d -prune -exec rm -rf '{}' + |
| { | |
| "scripts": { | |
| "test": "node ./path-to/test-runner.mjs" | |
| } | |
| } |
| import { dirname } from 'path' | |
| import { fileURLToPath } from 'url' | |
| export const getDirname = (importMetaUrl) => | |
| dirname(fileURLToPath(importMetaUrl)) | |
| // use as `getDirname(import.meta.url)` |
| export const mockLocation = value => | |
| Object.defineProperties(window, { | |
| location: { | |
| value, | |
| writable: true, | |
| }, | |
| }) | |
| export const mockPathname = pathname => | |
| mockLocation({ |
| const originalError = console.error | |
| beforeAll(() => { | |
| jest.spyOn(console, 'error').mockImplementation((...args) => { | |
| if ( | |
| typeof args[0] === 'string' && | |
| args[0].includes('inside a test was not wrapped in act') | |
| ) { | |
| return | |
| } |