Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?

ffmpeg mkv to mp4

ffmpeg -i some.mkv -acodec copy -vcodec copy some.mp4 #copy mkv to mp4 container - may not be compliant
ffmpeg -t 30 -i some.mkv -acodec copy -vcodec copy some.mp4 #create sample
ffmpeg -i some.mkv -acodec libvo_aacenc -ac 2 -vcodec copy some.mp4 #mp4 with downmixed audio (AAC @ 128kbit)
ffmpeg -i "some.mkv" -acodec libvo_aacenc -vcodec h264 -ac 2 -vf scale=640:-1 some.mp4 #mp4 with downmixed audio (AAC @ 128kbit) & resized

todo: change to fdk/faac & needs quality tweaks

download from DHT

aria2c --bt-min-crypto-level=arc4 --bt-require-crypto=true --dht-listen-port=34450-34459 --listen-port=34460-34469 <magnet>

podcasts

cat podcast.xml | xmlstarlet sel -t -m './/enclosure' -v '@url' -n #get podcast download urls

tmux

watch "tmux capture-pane && tmux show-buffer" #shows current tmux output in another window. If multiple sessions: use -t options

manpages

BROWSER="cat > $PWD/index.html" man --html echo && python -m SimpleHTTPServer #format a manpage as HTML and then start a webserver to display it (good for headless boxes)

actual clone for pywin32 source

hg clone http://pywin32.hg.sourceforge.net:8000/hgroot/pywin32/pywin32/
#incorrect URLs, sourceforge should feel bad
# http://hg.code.sf.net/hgweb/pywin32/pywin32/
# http://hg.code.sf.net/p/pywin32/code
# http://hg.code.sf.net/p/pywin32/pywin32

create package builder chroot for debian jessie

sudo pbuilder --create --mirror http://mirror.internode.on.net/pub/debian --distribution jessie --extrapackages git-core eatmydata nano git-buildpackage apt-file

GRUB2

create a grub directory to put on a thumbdrive from a running system (non-standalone)

not working todo: fix safemodules variable

safemodules=$(for x in /usr/lib/grub/x86_64-efi/*.mod; do basename -s .mod $x; done | grep -v ahci) #| tr '\n' ' ' > modules.list
grub2-mkimage -O x86_64-efi -p /efi/grub -o grub.efi $safemodules

real path for GRUB2 sources

bzr branch bzr://bzr.savannah.gnu.org/grub/trunk/grub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.