๐งฐ Utils
Count lines of code¶
cloc --fullpath --not-match-d="build" .
Create empty file with specific size¶
truncate --size 10M filename
fallocate --length 10M filename
Diff between two PNGs¶
Drag&drop two png files, outputs a diff image.
@echo off
for /f %%a in ('powershell -Command "Get-Date -format yyyyMMdd-HHmmss"') do set datetime=%%a
magick compare %1 %2 -compose src %datetime%-diff.png
mp4 to gif¶
Parameter | Description |
---|---|
-ss |
start in seconds |
-t |
duration in seconds |
ffmpeg -i input.mp4 -vf "fps=15,scale=320:-1:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" -loop 0 output.gif
ffmpeg -y -i input.mp4 -vf fps=15,scale=320:-1:flags=lanczos,palettegen palette.png
ffmpeg -i input.mp4 -i palette.png -filter_complex "fps=15,scale=320:-1:flags=lanczos[x];[x][1:v]paletteuse" output.gif
NCurses Disk Usage¶
๐ Ncdu is a disk usage analyzer with an ncurses interface
brew install ncdu
Web crawler¶
wget \
--recursive \
--no-clobber \
--page-requisites \
--html-extension \
--convert-links \
--restrict-file-names=windows \
--domains website.com \
--no-parent \
http://www.website.com/