Skip to content

Instantly share code, notes, and snippets.

View yegorg's full-sized avatar

Yegor G. yegorg

View GitHub Profile
@yegorg
yegorg / homebrew.md
Created August 17, 2017 07:40 — forked from indiesquidge/homebrew.md
How to and Best of Homebrew

Homebrew

How To

Homebrew is a package management system for OS X. You can read more about it here, or simply run

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

to install it.

@yegorg
yegorg / video_to_gif.sh
Created January 11, 2023 15:55 — forked from Olshansk/video_to_gif.sh
A handy bash function to convert a video (e.g. a screen cap) to a gif using ffmpeg in your shell
function video_to_gif {
local input_video_path="$1"
local output_gif_path="$2"
local fps="${3:-10}"
local scale="${4:-1080}"
local loop="${5:-0}"
ffmpeg -i "${input_video_path}" -vf "setpts=PTS/1,fps=${fps},scale=${scale}:-2:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" -loop $loop "${output_gif_path}"
}