Calibre eBook Viewer - Settings and Stylesheets

I have fought with Calibre-Server book reader for a long time. The ability to use any web-browser to read my e-books and have it sync my position and annotations is a unicorn I’ve been chasing for a few years. I always end up looking for alternatives because the web reader seems to be so inconsistent. Since I always seem to come back to it, I’ve decided to keep a running list of various settings and stylesheets I’ve found effective. ...

June 30, 2023 · Chuck

Generic Directory Backup Script

I regularly have directories of files I want to back up in case of disaster. Usually these are files that change often, and I only want to keep recent versions in case I want to revert or recover changes. (Git? Git, who?) I have used this script over and over as a simple way to archive a directory to a location with a date-stamped filename. It also cleans up after itself by deleting files older than X days. I stick it in CRON and let it run on a schedule and I always have an archive of the last X days of the files in my directory. ...

May 7, 2023 · Chuck

Hardening SSH

Summary It’s about time I get a standard sshd_config file that doesn’t rely on sane defaults. Disabling Password-based Authentication You should disable password-based authentication altogether. Make sure to only do this once you have verified that you can log in with an account that can escalate to root - or that you have an alternate way of getting back onto your machine. To lock down your server, edit your /etc/sshd/sshd_config and set the following options: ...

August 15, 2022 · Chuck

Uncomplicated Firewall / Docker Workaround

To get UFW to work well with Docker, you have to add some rules to the bottom of /etc/ufw/after.rules # BEGIN UFW AND DOCKER *filter :ufw-user-forward - [0:0] :ufw-docker-logging-deny - [0:0] :DOCKER-USER - [0:0] -A DOCKER-USER -j ufw-user-forward -A DOCKER-USER -j RETURN -s 10.0.0.0/8 -A DOCKER-USER -j RETURN -s 172.16.0.0/12 -A DOCKER-USER -j RETURN -s 192.168.0.0/16 -A DOCKER-USER -p udp -m udp --sport 53 --dport 1024:65535 -j RETURN -A DOCKER-USER -j ufw-docker-logging-deny -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -d 192.168.0.0/16 -A DOCKER-USER -j ufw-docker-logging-deny -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -d 10.0.0.0/8 -A DOCKER-USER -j ufw-docker-logging-deny -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -d 172.16.0.0/12 -A DOCKER-USER -j ufw-docker-logging-deny -p udp -m udp --dport 0:32767 -d 192.168.0.0/16 -A DOCKER-USER -j ufw-docker-logging-deny -p udp -m udp --dport 0:32767 -d 10.0.0.0/8 -A DOCKER-USER -j ufw-docker-logging-deny -p udp -m udp --dport 0:32767 -d 172.16.0.0/12 -A DOCKER-USER -j RETURN -A ufw-docker-logging-deny -m limit --limit 3/min --limit-burst 10 -j LOG --log-prefix "[UFW DOCKER BLOCK] " -A ufw-docker-logging-deny -j DROP COMMIT Adding Rules Then you can add rules. Always add rules with comments. Examples below: ...

August 10, 2022 · Chuck

Linux Terminal Emulators: KiTTY over PuTTY

Summary Do you work on Linux machines? Do you only have a Windows machine from which to connect? Then you’re probably already using PuTTY. Well, step aside PuTTY, there’s a new terminal client in town. KiTTY is a fork of the original PuTTY software, with loads of new features, including a portable version that saves all of your sessions and settings into an INI file in the same folder. Installation Download KiTTY Portable ??? PROFIT! Just kidding. There are no other steps. The download is an exe that’s ready to go. Just double-click on it and enter your connection parameters (should be familiar if you’ve ever used PuTTY) ...

July 28, 2022 · Chuck

Fun with wget

wget multiple files wget -r -l1 -A.mp3 http://aaa.com/directory In the above example, -r and -l1 options together enable 1-level deep recursive retrieval, and -A option specifies lists of file name suffixes to accept during recursive download (.mp3 in this case). ways to wget entire webpage This one works so well, I’ve created an alias for it: wgetMirror='/usr/bin/wget -o wget.log -mkEpnp –wait=9 –user-agent='\''Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)'\'' –no-check-certificate' Other options: wget --recursive --no-clobber --page-requisites --html-extension --convert-links --restrict-file-names=windows --domains example.com --no-parent <url> Modify User Agent $ wget -U "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)" <url> wget from webdav with authentication wget --http-user=user-id --http-password=password <URL> Reference Download Multiple Files with wget Archiving website with wget Download entire webpage with wget Change the User Agent in wget

February 7, 2022 · Chuck

VS Code for Markdown Notes

My long, winding path to Markdown notes nirvana For years I’ve been looking for a cross-platform markdown editor. There are several good ones out there, but several are not free or they’ve got built-in workflows that I would need to either adapt or fight against. For the last several years my notes have consisted of a single directory of markdown files. I sync these files to various machines with Nextcloud. What I wanted was a way to manage them and perhaps link amongst them, almost like a wiki, which I used previously, but again found myself fighting with different implementations of Markdown and note portability. ...

October 18, 2021 · Chuck

Do It Out In The Open

I attended my first Ohio Linuxfest this year (2017) and had a great time. I found the lightning talks especially inspirational. One of the talks I especially like were the lightning talks. Lightning talks are a series of short (5 minute), impromptu talks that anyone can do. They hand you a microphone, and you say what you want to say. There were a lot of Linux advocacy speeches (as you’d expect) and “How Linux has affected me” type talks. One of the talks that hit home with me was a gentleman who talked about how when he attended his first Linuxfest, Linux was not his career. Fast-forward a few years, and he is back to say that he now has a Linux job that he secured by being active in the community and meeting people and learning on the job. ...

October 12, 2017 · Chuck