Skip to content

Instantly share code, notes, and snippets.

View DreamAndDead's full-sized avatar
🎯
Focusing

张大伟 DreamAndDead

🎯
Focusing
View GitHub Profile
#!/usr/bin/env bash
# usage: video2gif.sh screen-record.avi
palette="/tmp/palette.png"
filters="fps=20,scale=0:-1: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 "$1.gif"
@DreamAndDead
DreamAndDead / fzf.conf.sh
Created September 11, 2020 07:56
fzf config in manjaro linux
export FZF_DEFAULT_OPTS='--height 100% --reverse'
export FZF_DEFAULT_COMMAND="fd --hidden --follow --exclude '.git' --exclude 'node_modules'"
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
export FZF_ALT_C_COMMAND="$FZF_DEFAULT_COMMAND --type d"
source /usr/share/fzf/key-bindings.bash
source /usr/share/fzf/completion.bash
# https://wiki.archlinux.org/index.php/Fzf