Skip to content

Instantly share code, notes, and snippets.

@nightpool
nightpool / make a gif.sh
Last active November 17, 2022 08:52
make good looking small gifs
function gif() {
for file in "$@"
do
echo "${file%.*}".gif
ffmpeg -i "$file" -filter_complex "[0:v] fps=15,scale=w=${WIDTH:-960}:h=-1,split [a][b];[a] palettegen [p];[b] fifo [b]; [b][p] paletteuse" "${file%.*}".gif
done
}
@Snarp
Snarp / keypress_toggle_writer.au3
Created May 11, 2016 20:13
AutoIt script which types one line from Kafka's Metamorphosis and then presses enter every 3 seconds; toggle-able using Pause/Break.
#include <FileConstants.au3>
; Pause/Break to "turn on" and "turn off".
; While turned on, writes one line from the text file defined by $FILENAME and then presses "Enter" every $SLEEPFOR millseconds.
; Defaults = Kafka's Metamorphosis, 3 seconds.
;
; If you have never needed to do this, don't worry about it. Just don't worry about it.
Global Const $FILENAME = "metamorphosis.txt"
Global Const $SLEEPFOR = 3000