<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Howto on Planet Hawleywood</title><link>https://blog.planethawleywood.com/tags/howto/</link><description>Recent content in Howto on Planet Hawleywood</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Fri, 30 Jun 2023 00:00:00 +0000</lastBuildDate><atom:link href="https://blog.planethawleywood.com/tags/howto/index.xml" rel="self" type="application/rss+xml"/><item><title>Calibre eBook Viewer - Settings and Stylesheets</title><link>https://blog.planethawleywood.com/posts/calibre-ebook-viewer-settings-and-stylesheets/</link><pubDate>Fri, 30 Jun 2023 00:00:00 +0000</pubDate><guid>https://blog.planethawleywood.com/posts/calibre-ebook-viewer-settings-and-stylesheets/</guid><description>&lt;p&gt;I have fought with &lt;a href="https://hub.docker.com/r/linuxserver/calibre"&gt;Calibre-Server book reader&lt;/a&gt; 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&amp;rsquo;ve been chasing for a few years. I always end up looking for alternatives because the web reader seems to be so inconsistent.&lt;/p&gt;
&lt;p&gt;Since I always seem to come back to it, I&amp;rsquo;ve decided to keep a running list of various settings and stylesheets I&amp;rsquo;ve found effective.&lt;/p&gt;</description></item><item><title>Generic Directory Backup Script</title><link>https://blog.planethawleywood.com/posts/generic-directory-backup-script/</link><pubDate>Sun, 07 May 2023 00:00:00 +0000</pubDate><guid>https://blog.planethawleywood.com/posts/generic-directory-backup-script/</guid><description>&lt;p&gt;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?)&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;</description></item><item><title>Hardening SSH</title><link>https://blog.planethawleywood.com/posts/hardening-ssh/</link><pubDate>Mon, 15 Aug 2022 00:00:00 +0000</pubDate><guid>https://blog.planethawleywood.com/posts/hardening-ssh/</guid><description>&lt;h2 id="summary"&gt;Summary&lt;/h2&gt;
&lt;p&gt;It&amp;rsquo;s about time I get a standard sshd_config file that doesn&amp;rsquo;t rely on sane defaults.&lt;/p&gt;
&lt;h2 id="disabling-password-based-authentication"&gt;Disabling Password-based Authentication&lt;/h2&gt;
&lt;p&gt;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 &lt;code&gt;/etc/sshd/sshd_config&lt;/code&gt; and set the following options:&lt;/p&gt;</description></item><item><title>Uncomplicated Firewall / Docker Workaround</title><link>https://blog.planethawleywood.com/posts/ufw-docker-workaround/</link><pubDate>Wed, 10 Aug 2022 00:00:00 +0000</pubDate><guid>https://blog.planethawleywood.com/posts/ufw-docker-workaround/</guid><description>&lt;p&gt;To get UFW to work well with Docker, you have to add some rules to the bottom of&lt;/p&gt;
&lt;p&gt;&lt;code&gt;/etc/ufw/after.rules&lt;/code&gt;&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;# 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 &amp;#34;[UFW DOCKER BLOCK] &amp;#34;
-A ufw-docker-logging-deny -j DROP
COMMIT
&lt;/code&gt;&lt;/pre&gt;&lt;h3 id="adding-rules"&gt;Adding Rules&lt;/h3&gt;
&lt;p&gt;Then you can add rules. Always add rules with comments. Examples below:&lt;/p&gt;</description></item><item><title>Linux Terminal Emulators: KiTTY over PuTTY</title><link>https://blog.planethawleywood.com/posts/linux-terminal-emulators-kitty-over-putty/</link><pubDate>Thu, 28 Jul 2022 00:00:00 +0000</pubDate><guid>https://blog.planethawleywood.com/posts/linux-terminal-emulators-kitty-over-putty/</guid><description>&lt;h2 id="summary"&gt;Summary&lt;/h2&gt;
&lt;p&gt;Do you work on Linux machines? Do you only have a Windows machine from which to connect? Then you&amp;rsquo;re probably already using PuTTY.&lt;/p&gt;
&lt;p&gt;Well, step aside PuTTY, there&amp;rsquo;s a new terminal client in town.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;h2 id="installation"&gt;Installation&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Download &lt;a href="http://www.fosshub.com/KiTTY.html"&gt;KiTTY Portable&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;???&lt;/li&gt;
&lt;li&gt;PROFIT!&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Just kidding. There are no other steps. The download is an exe that&amp;rsquo;s ready to go. Just double-click on it and enter your connection parameters (should be familiar if you&amp;rsquo;ve ever used PuTTY)&lt;/p&gt;</description></item><item><title>Fun with wget</title><link>https://blog.planethawleywood.com/posts/fun-with-wget/</link><pubDate>Mon, 07 Feb 2022 00:00:00 +0000</pubDate><guid>https://blog.planethawleywood.com/posts/fun-with-wget/</guid><description>&lt;h2 id="wget-multiple-files"&gt;wget multiple files&lt;/h2&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;wget -r -l1 -A.mp3 http://aaa.com/directory
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;In the above example, -r and -l1 options together enable 1-level deep recursive retrieval, and &lt;code&gt;-A&lt;/code&gt; option specifies lists of file name suffixes to accept during recursive download (.mp3 in this case).&lt;/p&gt;
&lt;h2 id="ways-to-wget-entire-webpage"&gt;ways to wget entire webpage&lt;/h2&gt;
&lt;p&gt;This one works so well, I&amp;rsquo;ve created an alias for it:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;wgetMirror=&amp;#39;/usr/bin/wget -o wget.log -mkEpnp –wait=9 –user-agent=&amp;#39;\&amp;#39;&amp;#39;Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)&amp;#39;\&amp;#39;&amp;#39; –no-check-certificate&amp;#39;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Other options:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;wget --recursive --no-clobber --page-requisites --html-extension --convert-links --restrict-file-names=windows --domains example.com --no-parent &amp;lt;url&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id="modify-user-agent"&gt;Modify User Agent&lt;/h2&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;$ wget -U &amp;#34;Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)&amp;#34; &amp;lt;url&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id="wget-from-webdav-with-authentication"&gt;wget from webdav with authentication&lt;/h2&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;wget --http-user=user-id --http-password=password &amp;lt;URL&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id="reference"&gt;Reference&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://xmodulo.com/how-to-download-multiple-files-with-wget.html"&gt;Download Multiple Files with wget&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.petekeen.net/archiving-websites-with-wget"&gt;Archiving website with wget&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://janezurevc.name/download-entire-web-page-using-wget"&gt;Download entire webpage with wget&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.networkinghowtos.com/howto/change-the-user-agent-in-wget/"&gt;Change the User Agent in wget&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>VS Code for Markdown Notes</title><link>https://blog.planethawleywood.com/posts/vs-code-for-markdown-notes/</link><pubDate>Mon, 18 Oct 2021 00:00:00 +0000</pubDate><guid>https://blog.planethawleywood.com/posts/vs-code-for-markdown-notes/</guid><description>&lt;h2 id="my-long-winding-path-to-markdown-notes-nirvana"&gt;My long, winding path to Markdown notes nirvana&lt;/h2&gt;
&lt;p&gt;For years I&amp;rsquo;ve been looking for a cross-platform markdown editor. There are several good ones out there, but several are not free or they&amp;rsquo;ve got built-in workflows that I would need to either adapt or fight against.&lt;/p&gt;
&lt;p&gt;For the last several years my notes have consisted of a single directory of markdown files.&lt;/p&gt;
&lt;p&gt;I sync these files to various machines with &lt;a href="https://nextcloud.com/"&gt;Nextcloud&lt;/a&gt;. What I wanted was a way to manage them and perhaps link amongst them, almost like a &lt;a href="https://www.dokuwiki.org/dokuwiki"&gt;wiki&lt;/a&gt;, which I used previously, but again found myself fighting with different implementations of Markdown and note portability.&lt;/p&gt;</description></item><item><title>Do It Out In The Open</title><link>https://blog.planethawleywood.com/posts/do-it-out-in-the-open/</link><pubDate>Thu, 12 Oct 2017 00:00:00 +0000</pubDate><guid>https://blog.planethawleywood.com/posts/do-it-out-in-the-open/</guid><description>&lt;p&gt;I attended my first Ohio Linuxfest this year (2017) and had a great time. I found the lightning talks especially inspirational.&lt;/p&gt;
&lt;p&gt;One of the talks I especially like were the &lt;a href="https://youtu.be/kUSBmYgCo1E"&gt;lightning talks&lt;/a&gt;. Lightning talks are a series of short (5 minute), impromptu talks that anyone can do.&lt;/p&gt;
&lt;p&gt;They hand you a microphone, and you say what you want to say.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;</description></item></channel></rss>