set -g -s escape-time 0
21 October 2020
I’ve occasionally been using a SSH session from my Pixel phones for years to login to my servers and write Clojure code in Emacs. I’d often run into an issue where I find myself having a weird time switching between NORMAL and INSERT modes when I’d hit ESCAPE quickly and try to move the cursor.
Googling my random problems
is a favorite pastime,
and I’ve finally stumbled
upon an article about
tmux and vim escape key.
that it’s probably been
sporadically eating my ESCAPE key,
so I’ve tried disabling the built-in delay
by adding to my
set -g -s escape-time 0
30 August 2020
I was only trying to write that last article, but it took me days to finally do it. I had so much work to do before I got there.
I had come to appreciate Emacs automatically inserting the boilerplate namespace declarations in new Clojure files, and I really thought I needed such convenience for my blog posts written in AsciiDoc in JBake. I dove down a 20-tab-deep, yak-shaving hole to get it done. 
I had to figure out the right search terms
and names for what Emacs was doing for me.
I finally found yatemplate
which seems similar to yasnippets.
has the templates layer
for integrating yatemplate support,
so I added that layer and created a template
adoc files in my
My simple case worked,
but I recognized
that I’ll want that template
on all my machines,
so having a local copy of it
wouldn’t cut it.
I needed a way to check-in and version more Emacs/Spacemacs files
than just my
~/.spacemacs files I was previously distributing.
I learned yasnippets would default
to looking in
if the configuration was in there,
so I had to move my
To have the templates layer source templates
it required an extra bit of configuration
when introducing it to the
(templates :variables templates-private-directory "~/.spacemacs.d/templates")
At this point,
I could now commit
with the regular configuration file
and the supporting templates and snippets.
All those files will be cloned
to all my workstations.
I was almost ready to write
but yasnippet and yatemplate
have this fancy templating language.
I’m sure that can make
my article-creation even smarter!
I read a bit more
and found a couple cool
for automatically filling in the date
and building a title
from the file name.
With the final enhancements
I could write the article,
if I could only remember
what I was trying to do
in the first place.
I hope to at least remember
how to use these snippets and templates
for future work.
18 September 2018
Months ago, I started setting up LetsEncrypt using certbot on my Debian web server. It hosts multiple virtual hosts, so I setup 2 different sets of certificates: one for hjsoft.com/www.hjsoft.com and the other for johnflinchbaugh.com/www.johnflinchbaugh.com/blog.johnflinchbaugh.com.
at least when I got started,
it was recommernded to have
and let it start its own temporary web server
to verify the LetsEncrypt setup (
The other trick is
to register multiple domain names
for one certificate by repeating the
I did this with this invocation:
certbot \ --pre-hook "systemctl stop apache2" \ --post-hook "systemctl start apache2" \ --authenticator standalone \ --installer apache \ -d johnflinchbaugh.com \ -d www.johnflinchbaugh.com \ -d blog.johnflinchbaugh.com
I got it started a couple months ago,
but I didn’t know how to setup multiple domain names,
so I was always getting errors
that this certificate was for a different name:
johnflinchbaugh.com instead of
That’s all sorted out now, and all my sites should be SSL all the time.
For more information on setup, certbot has a great set of guides based on your OS and web server.
07 January 2018
A couple years ago, I replaced my old spinner drives with matching SSDs. I left the old drives mounted but disconnected the cables. I’ve been watching my photo collection grow and consume about half my live storage, so I figured it was time to bring those slower spinning drives back online, so I can move my archive of old photos off my fast drives and get a little extra room.
I plugged in the first drive,
and observed that it fortunately did not try
to join the existing RAID arrays.
lsblk showed me a list of drives and partitions
and how they were currently used,
so I could confidently
to wipe and recreate 1 primary partition on the drive
fd (Linux raid autodetect).
I rebooted to see the new partition table,
and then installed and did the second drive
/dev/sdb in my case).
I setup the new drives in a mirror:
# create a new RAID1 mirror out of those new partitions: mdadm --create /dev/md2 --level 1 --raid-devices=2 /dev/sda1 /dev/sdb1 # to ensure it's still called md2, and not md127 on reboot update-initramfs -u # create a filesystem mkfs -t ext4 /dev/md2 # mount it to copy mkdir /mnt/new mount /dev/md2 /mnt/new # migrate all my photos rsync -av /home/john/Photos/ /mnt/new
After the initial migration, I tested it:
Checked that the array is there with the same name:
(It initially had not kept the name,
and that’s when I learned
Mounted the new array as
Checked that Digikam still works.
That looked good, so it’s time to make it permanent:
Unmounted the new filesystem
Deleted all the old contents of
Added the new array to the
/etc/fstab to mount it automatically