Check These Out
Renames duplicates from MusicBrainz Picard, so you get the latest copy and not a bunch of duplicates.
First the find command finds all files in your current directory (.). This is piped to xargs to be able to run the next shell pipeline in parallel.
The xargs -P argument specifies how many processes you want to run in parallel, you can set this higher than your core count as the duration reading is mainly IO bound.
The -print0 and -0 arguments of find and xargs respectively are used to easily handle files with spaces or other special characters.
A subshell is executed by xargs to have a shell pipeline for each file that is found by find. This pipeline extracts the duration and converts it to a format easily parsed by awk.
ffmpeg reads the file and prints a lot of information about it, grep extracts the duration line. cut and sed cut out the time information, and tr converts the last . to a : to make it easier to split by awk.
awk is a specialized programming language for use in shell scripts. Here we use it to split the time elements in 4 variables and add them up.
Ever compress a file for the web by replacing all newline characters with nothing so it makes one nice big blob?
It is a great idea, however what about when you want to edit that file? ...Serious pain in the butt.
I ran into this today in that my only copy of a CSS file was "compressed" with no newlines.
I whipped this up and it converted back into nice human readable CSS :-)
It could be nicer, but it does the job.
Make your own MP3s from Youtube videos.
Shows all block devices in a tree with descruptions of what they are.
Ever since the switch to pulseaudio, Ubuntu users including myself have found themselves with no sound intermittently. To fix this, just use this command and restarts firefox or mplayer or whatever.
I prefer to use this and not the -n variety, so I get DNS-resolved hostnames. Nice when I'm trying to figure out who's got that port open.
Displays only the VGA adapter/chipset being used for the graphics. In this case, it gave me the "M22" and "Mobility Radeon x300" that I needed to research a graphics issue I was having.
insert filename
Normal mode: "%p
Insert mode: %
Installs pip packages defining a proxy