Notes about Computers, Computing, Computations, Etc.

  1. AltDrag lets Windows 10 have Linux-style "hold down a key and click to move a window" support. Download

Change video container from Matroska (mkv) to mp4 (assuming the video codec is supported by mp4):

ffmpeg -i name_of_input_file.mkv -codec copy output_file.mp4
# If there's issues with the audio codec:
ffmpeg -i name_of_input_file.mkv -c:v copy -c:a aac output_file.mp4

Download a Youtube playlist, keeping only the audio in AAC (.m4a) format:

youtube-dl -f 140 -o "%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s" "https://www.youtube.com/playlist?list=PLaro_mvk6VEkTqkmTcUIvr4MnUzfh434-"

Download a Youtube video in a h264 video and AAC audio:

youtube-dl -f 22+140 https://www.youtube.com/watch?v=cnDJa_HZVP0

To fix photo dates when people email you photos and you need to import them into your photo manager and your photo manager shows all the photos as taken today even though you know they were taken weeks ago but people are so bad at sending photos….

# Inspect the original timestamp
exiftool -r -DateTimeOriginal path_to_picture_folder
# Inspect the modification timestamp
exiftool -r -FileModifyDate path_to_picture_folder
# If FileModifyDate doesn't match what you need, you can set it to the original timestamp
# Note: The double quotes are important so that the shell doesn't think you're redirecting I/O from a file.
exiftool -r "-FileModifyDate<DateTimeOriginal" path_to_picture_folder

Gets a list of the software installed on the computer, both 32 and 64 bit. Saves the output to the file C:\Users\Public\Documents\Software.txt

Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object DisplayName, DisplayVersion, Publisher, InstallDate | Format-Table –AutoSize > C:\users\public\Documents\Software.txt

Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object DisplayName, DisplayVersion, Publisher, InstallDate | Format-Table –AutoSize >> C:\users\public\Documents\Software.txt

Settings for a good-looking Xfce4 installation:

  • Style: Greybird
  • Icons: Elementary Xfce dark
  • Window Theme: Arc-dark

Here are some extensive notes on setting this up. I also have a version for CentOS 8 (RIP) but don't maintain/update it.

Sometimes you have to make a program start automatically at boot. Here's how I do it with systemd.

This came up because I was messing with partition layouts for a project and Xfce kept automatically mounting the drives while I was working on them.

# Don't automount drives
xfconf-query -c thunar-volman -p /automount-drives/enabled -s false
# Don't automount media (CDs?)
xfconf-query -c thunar-volman -p /automount-media/enabled -s false
# backup
dd bs=4M if=/dev/mmcblk0 | gzip > /mnt/recovery-usb/backupbot-20210715.img.gz
# restore
gunzip --stdout backupbot-20210715.img.gz | sudo dd bs=4M of=/dev/{whatever the device is}
  • notes.txt
  • Last modified: 2021/08/28 21:06
  • by john