Linux Commands
Delete all docker images
docker rmi -f $(docker images -a -q)
Create a file and set its permissions
install -m 755 /dev/null filename.txt
Record audio files
Record Audio Files in the Command Line
Get/Set data from clipboard:
getclip () { xclip -selection c -o } setclip () { xclip -selection c }
Create an SSL Key and Cert pair
openssl req -new -x509 -nodes -out server.crt -keyout server.key
Cut a video or audio file into a clip based on seconds
FFmpeg Cut a video to a clip by seconds
Download any yt-dlp supported video, convert it to an mp3, then automatically number it based on the order they were downloaded in the playlist
yt-dlp --extract-audio --audio-format mp3 --output "%(autonumber)s - %(title)s.%(ext)s" {PUT LINK TO PLAYLIST OR VIDEO HERE}
Convert a folder of mp3s into DVD-compatible mpeg2 files (.dvd) while embedding a looping video on them for compatibility, reducing bit rate as low as it can go.
for i in *.mp3; do; ffmpeg -stream_loop -1 -i asteracube.webm -i "$i" -shortest -r 24 -loop 1 -codec:v mpeg2video -b:v 400k -codec:a ac3 -b:a 448 -vf scale=352:240 dvd/"${i%.*}.dvd"; done
Add kernel boot parameters on truenas scale. This command adds "nomodeset" to the kernel parameters. It is auto-applied on reboot.
midclt call system.advanced.update '{"kernel_extra_options": "nomodeset"}'
Additional Resources:
https://github.com/OpenRC/openrc/blob/master/service-script-guide.md
https://www.truenas.com/community/threads/kernel-boot-parameter-how-to-add-to-tn-scale.110109/