- FFmpeg
- Take screenshots thru adb
- Serve current directory
- Fix boot
- /etc/fstab entry for NTFS partitions
- Force time sync on Ubuntu/Windows dual boot
- Windows
- Base64
- File Hashes
$ ffmpeg -i input.mp4 -c:v libx264 -crf 18 -c:a copy output.mp4
Ref: https://superuser.com/a/1381151
Useful for converting .m4a's downloaded with youtube-dl.
(Runs on all files in the current directory)
$ for f in *.m4a; do ffmpeg -i "$f" -acodec libmp3lame -ab 192k "${f%.m4a}.mp3"; done
From lukehedger/ffmpeg-compress-mp4
Adjust -threads
, -hwaccel
and scale
according to hardware capability and need.
(Runs on all files in the current directory)
$ for f in *.mp4; do ffmpeg -threads 4 -hwaccel auto -i "$f" -vf scale=-1:1080 -vcodec h264 -acodec mp2 "${f%.mp4}_rencode.mp4"; done
Adjust -threads
and scale
according to hardware capability and need.
(Runs on all files in the current directory)
$ for f in *.jpg; do ffmpeg -threads 4 -i "$f" -vf scale=-1:2160 "${f%.jpg}_rencode.jpg"; done
$ ffmpeg -i in.mp4 -vf select='not(mod(n\,30))',setpts=N/FRAME_RATE/TB -an out.mp4
Useful for taking Geanymotion screenshots.
$ adb shell screencap -p | sed 's/\r$//' > screenshot_`date "+%Y-%m-%d-%H-%M-%S"`.png
$ python2 -m SimpleHTTPServer 8000
$ python3 -m http.server 8000
Change sda1
wherever mentioned to your disk name. Use fdisk -l
to find disk names.
# mount /dev/sda1 /mnt
# arch-chroot /mnt
# grub-install /dev/sda
# grub-mkconfig -o /boot/grub/grub.cfg
# ntfsfix /dev/sda1
# ntfsfix -d /dev/sda1
Boot from a DVD/live USB.
# mount /dev/sda1 /mnt
# for i in /sys /proc /run /dev; do mount --bind "$i" "/mnt$i"; done
# chroot /mnt
# grub-install /dev/sda
# update-grub
Use the System Recovery Environment Command Prompt.
> bootrec /FixMbr
> bootrec /FixBoot
Use fsblk
or blkid
to get UUID. Make sure /media/disk1
directory exists.
UUID=XXXXXXXXXXXXXXXX /media/disk1 ntfs defaults 0 0
$ timedatectl set-local-rtc 1
From https://support.steampowered.com/kb_article.php?ref=6239-DZCB-8600#appreg
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\System\GameConfigStore]
"GameDVR_Enabled"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\GameDVR]
"AllowGameDVR"=dword:00000000
Reboot to apply changes.
%windir%\explorer.exe https://example.com
$ base64 <filename>
$ base64 -d <filename>
$ md5sum <filename>
$ sha1sum <filename>