My home dir configs and useful scripts I use.
For myself, apply as such:
curl -sfL https://git.io/chezmoi | sh
chezmoi init https://github.com/TheLastProject/dotfiles.git
chezmoi apply
For others, you probably just want the scripts in the bin
directory.
Cast a file to Chromecast using VLC.
Example:
cast_file $filename $chromecast_ip
Case an URL to Chromecast using VLC, downloaded through youtube-dl.
Example:
cast_url $url $chromecast_ip
Find the deepest subdirectories using at least % percent of the storage space of a selected location.
Defaults to the local directory.
Flags:
-t threshold (set threshold percentage, default 10)
-h (output human readable values, default false)
-v (output verbose values, default false)
Example:
deepest_subdir_within_threshold -t 10 -hv /some_dir
Git clone into an appropriately named subdirectory.
Example:
gclone https://github.com/TheLastProject/Catima
Will create TheLastProject/Catima and put the git repo there.
Grep & Edit
Grep and open each match in $EDITOR
.
Known working editors are vi and nano.
Usage: gredit [-ilrqh] [-e exclude] regexp [location]
Arguments:
-e <file/directory> Ignore all matches in file/directory
-i Match case-insensitive
-l List matches instead of editing them
-r Search recursively
-q Quiet (don't ask for confirmation before opening editor)
-h Print this help
Runs a local shellscript on a machine you SSH to, including flags you may want to use.
Example:
run_over_ssh sylvia@machine ~/bin/deepest_subdir_within_threshold -t 10 -hv /some_dir
Same as run_over_ssh, but runs it in a root shell.