Today is March the 189th, 2020.
I like the COVID meme of counting the days since the beginning of March, the approximate beginning of the pandemic here in the US. Somehow it nicely expresses how frustratingly long and bizarre this year has been.
Here’s a quick shell one-liner to get the date:
echo "Today is March the $((($(date +%s)-$(date +%s --date "2020-02-29"))/(3600*24)))th"
I’ve very recently switched to zsh with oh my zsh as my primary shell. I’d seen a colleague make the switch, and didn’t really understand why until I saw his prompt work magic in git repos. The oh my zsh git plugin is fantastic - aside from providing a stable of git-oriented aliases, when you cd into a git repo your prompt will change to reflect which branch you’re in and whether that branch has uncommitted changes.
Come for the git plugin, stay for the tab complete. Being new to zsh, I’m not sure if the tab complete experience I’m seeing is native to zsh or if it’s specific to the oh my zsh environment. Either way, I love it. Tab complete suddenly offers look-ahead completions I didn’t realize I was missing.
Two things that irked me right off the bat:
- tab complete is case insensitive by default
- the default robbyrussell theme’s prompt doesn’t show hostname… ssh much?
Changing the tab complete behavior was incredibly easy - simply uncomment the following line in .zshrc:
# Uncomment the following line to use case-sensitive completion. CASE_SENSITIVE="true"
The second item required a little more research, but was easy enough to achieve. The trick was to add the following PROMPT variable extension at the bottom of my .zshrc:
”%m” is the variable for hostname. I made it cyan to match the default prompt’s color and avoid making the prompt any busier.
Now I’m happily typing away in my new shell. There’s so much more that’s available in oh my zsh, and I may get to some of it. I never exhausted bash’s capabilities either. For me it’s the little functional improvements in the things I use all the time that have made this switch so enjoyable.
For years I’ve hosted this site and a few others on a Linode VM running nginx, which was fine, but in the process of tidying up my monthly spending I decided to look for a cheaper alternative. I decided to go back and look at the hugo lambda project that I’d come across when I first started using Hugo to build my site. Somehow that led down a path to AWS Amplify Console for hosting static sites, and it seemed like just the sort of “serverless” web hosting I was looking for all bundled into a simple interface.
For my needs it was perfect. I just hooked it into the git repo I use for this Hugo site. It automatically detected the hugo build settings, and now every time I push to the master branch it triggers a build and deploys to Amazon’s Cloudfront CDN. Other neat features include the ability to specify alternate branches in git for test sites, etc. They can be configured to deploy to alternate URLs and the build system supports per-branch environment variables. This means for the ‘test’ branch, I can specify the HUGO_BASEURL as https://test.plain.cool and have a fully functional test site.
- More Astro -
- First Astro Photo: Andromeda -
- Astrophotography: Yet Another Hobby is Born! -
- Repairing a Samsung front-loading dryer -
- Testing Wifi with netcat -
- Setup CQRLOG -
- Setup TQSL with existing config -
- Monitoring radio audio through the computer -
- Setup WSJT-X -
- Setup hamlib -
- A ham prepares for Linux -
- CodeCommit: private git repos in AWS Free Tier -
- JPC theme posted to github -
- Hugo taxonomy crosswalk -
- Using File::PID for long-running jobs -
- Moving to Hugo -
- The folding of time and blogs -
- A little better all the time -
- Last Weekend's Scott Kelby Worldwide Photo Walk -
- Backyard Bokeh Fiesta! -
- Moto Smartphone In-Camera HDR: Color Saturation and Time Travel -
- Where Palm and Pine are Blowing; Where Southern Seas are Flowing... -
- Lake Alice Wildlife -
- Paper lamp as glowing orb -
- Preparing your camera to avoid condensation and lens fog. -
- A good place to start -
- Who is that guy? -
- First crack at HDR -
- The HDR Hole -
- How bees introduced themselves to me. -
- Strobist Lighting 102, Lesson 1.2 -
- Low cost fermentation cooler -
- PET care, or how not to scratch your Better Bottle -
- Nobody puts baby in a corner -
- Controlling a Canon EOS w/ your Android device: Setting up DSLR Controller -
- Strobist Lighting 102, Lesson 1.1 -
- Back to the Drawing Board: Brewing for Competition -
- Mead: the brew that launched a thousand ships -
- The blog is dead; long live the blog. -
- Step 1: Admit you have a problem. -
- Small Hopped Mead -
- Blackberry Mead - 2 ways -
- Dear Neighbors, -