Skip to content

Instantly share code, notes, and snippets.

View paulperegud's full-sized avatar

Paul Peregud paulperegud

  • Warsaw
View GitHub Profile
@maxlapshin
maxlapshin / systemd.erl
Last active December 24, 2022 17:28
Systemd support
-module(systemd).
% This is what you need to adopt systemd in erlang
%
% Do whatever you want license. If you want, you can take this code under terms of MIT license.
-export([ready/0, reloading/0, stopping/0, watchdog/0]).
-export([start_link/0]).
-export([init/1, handle_info/2, terminate/2]).
@keijiro
keijiro / ffmpeg.bat
Created October 9, 2016 05:51
ffmpeg cheatsheet
:: Trim from 2″ for 3 seconds, and encode into a "Twitter friendly" format.
ffmpeg -i source.mp4 -pix_fmt yuv420p -an -ss 2 -t 3 temp.mp4
:: Make a palette for GIF.
ffmpeg -i temp.mp4 -vf palettegen=max_colors=24 palette.png
:: Make a GIF with the palette.
ffmpeg -i temp.mp4 -i palette.png -filter_complex "scale=400:-1:flags=lanczos[x];[x][1:v]paletteuse" -r 30 out.gif