Save a list of all my music to a file

SSH to slave27.local and then issue one of the following commands: cd Music tree -l > /home/andy/Dropbox/music-2017-01-28.txt Which gives output that looks something like this: ├── !!! │   └── Thr!!!er │   ├── 01 Even When The Water’s Cold.m4a │   ├── 02 Get That Rhythm Right.m4a │   ├── 03 One Girl _ One Boy.m4a │   ├── … Read more

Non-interactive Debian upgrade script

This could be run as a cron job on any Debian based system (tested on Debian, Ubuntu, Raspian). #!/bin/bash export DEBIAN_FRONTEND=noninteractive yes ” | apt-get -y -o DPkg::options::=”–force-confdef” -o DPkg::options::=”–force-confold” dist-upgrade See http://slave27.local/debian-handbook/sect.automatic-upgrades.html for more details.

Converting .epub to .mobi

This assumes the source file is DRM free, and that the machine already has calibre installed. for book in *.epub; do echo “Converting $book”; ebook-convert “$book” “$(basename “$book” .epub).mobi”; done

Merging PDF files

The best graphical PDF merging tool for Linux is probably pdfmod. It’s in the Ubuntu repositories, and can do anything Preview can do as far as merging/exporting PDF files from multiple sources. For command line merging, pdftk does the job well. The syntax would be something like: pdftk *.pdf cat output combined.pdf Which would merge … Read more

Adding cowsay to login

To get an interesting picture and quote each time you log in to a terminal session add the following to /etc/profile: echo;fortune | cowsay -f dragon;echo This requires fortune and cowsay to be installed first (through apt or homebrew depending on platform). The optput should look something like: _________________________________________ < Caution: Keep out of reach … Read more