This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Basic authentication middleware for Cloudflare workers inspired by official guide: | |
* @see https://developers.cloudflare.com/workers/examples/basic-auth/ | |
* | |
*/ | |
const encoder = new TextEncoder(); | |
/** | |
* Protect against timing attacks by safely comparing values using `timingSafeEqual`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[filter "lfs"] | |
clean = git-lfs clean -- %f | |
smudge = git-lfs smudge -- %f | |
process = git-lfs filter-process | |
required = true | |
[user] | |
name = ... | |
email = ... | |
[core] | |
editor = nano |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Usage: ./gengif.sh input.mov output.gif | |
palette="/tmp/palette.png" | |
filters="fps=15,scale=-1:480:flags=lanczos" | |
ffmpeg -v warning -i $1 -vf "$filters,palettegen" -y $palette | |
ffmpeg -v warning -i $1 -i $palette -lavfi "$filters [x]; [x][1:v] paletteuse" -y $2 |