Skip to content

Instantly share code, notes, and snippets.

@caio2k
Last active April 11, 2020 22:21
Show Gist options
  • Save caio2k/57660d3f8ef6029083c0fbf666a75059 to your computer and use it in GitHub Desktop.
Save caio2k/57660d3f8ef6029083c0fbf666a75059 to your computer and use it in GitHub Desktop.
linux cheat sheet
#rebase from upstream
#first add the upstream refer into .git/config
#[remote "upstream"]
git rebase upstream/master
#remove last commmit
git reset --hard HEAD^
#unite pdf
pdfunite 1.pdf 2.pdf destiny.pdf
#decrease pdf size
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -dNOPAUSE -dQUIET -dBATCH -sOutputFile=small.pdf big.pdf
#cut mp3 so it does not finish after movie
mplayer -quiet tarantella.mp3 -ao pcm:fast:file=tarantella61.mp3 -endpos 0:61
#create movie adding mp3
mencoder mf://*.JPG -audiofile tarantella61.mp3 -vf crop=2040:2040:40:0 -mf fps=15:type=jpg -ovc lavc -lavcopts vcodec=msmpeg4v2:vbitrate=16000:keyint=15:mbd=2:trell -oac copy -o output.avi
#transcode to whatsapp
ffmpeg -i broken.mp4 -c:v libx264 -profile:v baseline -level 3.0 -pix_fmt yuv420p fixed.mp4
#transcode to panasonic 2012 tv
ffmpeg -i origin.mp4 -profile:v main -tune film tv.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment