Things I Have Written

Deploying SSH Keys To Your Server

I’ve yammered quite a bit about SSH and SSH key theory on this site. By now you should be itching to quit reading and start working, especially considering my glacial pace at wrapping this series up.

Previously in this series:

SSH Basics
SSH Key Theory
SSH Key Creation

In order for you to use a particular SSH key to login to a server, you need to have the private key on your local device or computer, and you need to have the public key stored on the server.

Remember, the private key is the one you hold close and the public key is the one you share to anyone who needs to authenticate you. The public key lets the server encrypt a message to you. You can decrypt the message with your private key and prove to the server that you must be you, since you are in possession of that private key. …

(Read More)

Servers and Shortcuts

I’m not the most prolific writer in the best of times, and I’ve spent the past month doing many interesting and detailed things to Linux servers with my friend and BubbleSort co-wrangler Vic Hudson.

Rather than presenting this information to you as an excuse for my tardiness in publishing anything new, the takeaway here is that all this server poking and prodding has resulted in me having a new workflow for publishing to my sites, and that has resulted in me reworking my blog post publishing shortcut (and next, my podcast episode publishing shortcut).

Far from being more complex, my workflow is now simpler: all I have to do is parse the text of my blog post and make some text transformations that will make my post work when Hugo compiles it, choose a section, category, and some tags, and update my git repo and push that to GitHub.

The …

(Read More)

Emmet extension for Panic Nova

Someday I need to write about Nova, the code editor from Panic that I use for web development. In the meantime, let me instead tell you about an extension for Nova that I just installed tonight which I knew about from Visual Studio Code.

It’s called Emmet.

Emmet lets you use shorthand to quickly enter html tags and css rules.

If you use Nova for web development, install Emmet. As Tim Cook would say, we think you’ll love it.

SSH Key Creation

Now that you know that SSH keys are about authentication and not session encryption, and that they let you disable password logins on your server, you may be excited about getting to work using SSH keys with your server. There are just two things that can stop you:

  1. You have no SSH keys.
  2. Your server doesn’t know your (as of yet non-existent) public key.

Fortunately, we can solve both of these problems without too much suffering. Today we’ll solve problem one and generate ourselves some SSH keys.

As always, I am writing from the perspective of a person using a Mac or iOS device, and working on Linux servers. If you are running Windows or Linux on your local computer, you’ll have to google elsewhere. Today I’m just going to show how to generate keys on the Mac. Later sometime I’ll show you some iOS and iPadOS apps that can generate or transfer keys for you. …

(Read More)

SSH Key Theory – A Simple Primer

Time is a fluid concept these days, but approximately 25 years or one week ago, I wrote about SSH and what is it good for. The bottom line is that SSH itself is very simple, and there’s not a lot of exciting dramatization that can be produced around its actual use unless you’re really into weird incantations like “ss -pant | grep ‘ESTAB’”. And let’s face it, no one is. You do have to enjoy the fact that we can shove the word “pant” into a perfectly valid Unix command though.

However, there is something directly related to SSH that we should talk about, primarily because it will give me an excuse to write exactly 255 posts about it, and that is the topic of SSH keys.

When you think of a key, you probably think of something that unlocks something else, and that’s exactly what SSH keys are used for. Although SSH keys …

(Read More)

SSH Basics

There’s an adage about how the Cloud is just someone else’s computer, which is just a humorous way of pointing out some of the inherent insecurities of using the Cloud for all your data storage.

But it also expresses the fact that whenever we need to work on files located on a server, we’re just using someone else’s computer from a distance, and we need a reliable, secure method of doing so. SSH is a protocol for securely accessing remote systems, and it’s integral to the functioning of the internet.

SSH – What Is It Even?

SSH stands for “Secure Shell”. The shell part of it means it is a command line interface. When you connect via SSH, you’re harkening back to the days when everyone typed commands into their computers instead of clicking on buttons with a mouse. For many …

(Read More)

File Name Parsing With Regular Expressions

I haven’t talked more about regular expressions like I promised I would, but I’ll partially rectify that today by writing about a regular expression I created last night for my Blog Post Publish shortcut. This one applies specifically to how I name my blog post files for WTF Weekly.

Since WTF Weekly post titles are just dated blurbs like WTF Weekly for Oct 12th, 2020, I decided to name the post markdown files as consecutive numbers, starting at 1. I also make the post slug match this number so that the URLs are very simple, such as in the case of the one for Oct 12th, 2020.

Originally when I wrote my Blog Post Publish shortcut, I was entering slugs and file names manually as user input. This was partly because I do this already for this site, because instead of numbering posts, I give the files and slugs names related to the topic. The …

(Read More)

Super Nova

Nova is here, and it’s every bit as super as you’d expect software from Panic to be.

What is it? It’s a Mac-native text editor for programmers that seems like has been under development forever, but in reality it’s only been something like 14 months since Panic first announced that Nova was the future of Panic text editors, replacing Code Editor, née Coda.

Nova’s got style and it’s got features with style. Local and remote servers, local and remote terminals, git support, hierarchical element support, multi-language syntax and highlighting support, tabs, built-in preview browser with inspector tools, and much, much more.

Nova editor and preview browser

Nova git tool pane

Nova document hierarchy view

I’ll be interested to see how Panic does with this in the face of competition from the likes of Visual Studio Code and Atom, which are both very full-featured, support …

(Read More)

AQI Tracking Over Time with Shortcuts, Data Jar, and Charty

I live in an area that was recently the most polluted city in the world, thanks to fires on all sides of us. Although I have the ability to glance at the AQI (Air Quality Index) widget on my Apple Watch and see the AQI instantly at any time, I also wanted to track AQI over time. To do so, I created a shortcut that uses Data Jar to store samples into periodically throughout the day, and to use the last 45 samples to generate a chart using Charty for Shortcuts actions which can then be displayed in an iOS widget stack using a Charty Widget.

The shortcut itself is quite simple. It gets the weather for the current location, and from that, the current AQI value. It then stores that value in Data Jar in a table called AQI with the current date and time (down to the second) as the key. …

(Read More)

Level Up Your Zsh Terminal Prompt in macOS

Scott Hanselman is one of the good people in tech, and his YouTube channel is full of great tech topics explained in his clear, instructive fashion. While watching one of his git videos, I noticed his nice Windows terminal prompts that even indicate git status for him when he’s in a repo directory. You can see his terminal setup in his blog post How to make a pretty prompt in Windows Terminal with Powerline, Nerd Fonts, Cascadia Code, WSL, and oh-my-posh.

Obviously the first thing I did upon seeing this was pause the video and go in search of a way to make my Mac terminal do that crazy prompt thing. As I discovered, it’s easy if you use Zsh, which I already do.

Note: All this below assumes you’re already using Zsh as your shell.

You can see for yourself whether you’re using Bash or Zsh with the echo $SHELL command. You’ll …

(Read More)