This ia a test repository containing some of my cheatsheets
- ffmpeg
- wget
- Install fish
- Install git
- Setup ssh:
ssh-keygen -t rsa -C "[email protected]"
pandoc -s input.docx --extract-media=./media --pdf-engine=tectonic --template=pandoc_template.tex -V documentclass="book" -V classoptions="oneside,letterpaper,openany" -V geometry="margin=1 in" -V mainfont="Noto Serif JP" -o out.pdf
pdfjam --outfile out.pdf --paper a5paper --latex /usr/bin/tectonic in.pdf
magick *.jpg out.pdf
qpdf --empty --pages *.pdf -- out.pdf
pdftk *.pdf cat output out.pdf
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/prepress -dNOPAUSE -dQUIET -dBATCH -sOutputFile=out.pdf input.pdf
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dDownsampleColorImages=true \
-dColorImageResolution=150 -dNOPAUSE -dBATCH -sOutputFile=output.pdf input.pdf
gs -q -dNOPAUSE -dBATCH -dSAFER -dOverprint=enable -sDEVICE=pdfwrite -dPDFSETTINGS=/ebook -dEmbedAllFonts=true -dSubsetFonts=true -dAutoRotatePages=/None -dColorImageDownsampleType=/Bicubic -dColorImageResolution=150 -dGrayImageDownsampleType=/Bicubic -dGrayImageResolution=150 -dMonoImageDownsampleType=/Bicubic -dMonoImageResolution=150 -sOutputFile=output.pdf input.pdf
echo *.pdf | tr ' ' $'\n'
youtube-dl -f bestaudio --extract-audio --audio-format mp3 --embed-thumbnail --add-metadata <url>
youtube-dl --write-auto-sub --embed-subs --merge-output-format mp4 <url> -o "%(playlist_index)2d - %(title)s.%(ext)s"
rm -f ~/.local/share/mime/packages/x-wine*
rm -f ~/.local/share/applications/wine-extension*
rm -f ~/.local/share/icons/hicolor/*/*/application-x-wine-extension*
rm -f ~/.local/share/mime/application/x-wine-extension*
wget -P pictures -nd -r -l 1 -H -D i.4cdn.org -A webm -R *?????????????s* <url>
- P: dir prefix
- nd: no dir hierarchy
- r: recursive
- l: recursion depth level
- D: domain list
- A/R: accept/reject
sed -i 's/https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/i\.4cdn\.org\/[a-z]{1,4}/\./g' 'file'
sed -i 's/https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/torako.wakarimasen.moe\/file\/torako\/[a-z]{1,4}\/image\/\d+\/\d+/\./g' 'file'
- [a-z] Char class, {1,4} Quantifier, matches prev token b/w 1 to 4 times, as many times as possible
- \d is [0-9], + is 1 or more times
echo 'notify-send "Work day is done!"' | at 4:00PM # at now + 1 minute
Make changes, save, export (SPC m e H A
), run hugo
, push!