Got New Moderna Booster & Flu Shot

October 16th, 2022

Microbe

Today it was time to get the latest Moderna COVID Booster, and back it up with the standard Flu Shot. It's been a while since my last booster, and with the new variants, it was clearly time to schedule a visit to Walgreens just down the street, where it's so easy to get the hosts.

So in a few weeks, I'll be all set for Thanksgiving which is about my only social event of the Fall, and I'll be safe from the worst of it. Science is a good thing. 🙂

Adding Let’s Encrypt Certs to Nginx

October 13th, 2022

Linode

This morning I had some time and wanted to finish up the work of getting my Cloud VM running Ubuntu 22.04 working just fine as a development box - including inbound webhooks from vendors, and calls from apps like HTTPbot on my iPad Pro. The key was that I needed to be able to install and configure nginx to forward all port 443 traffic to port 6543, and that also meant getting the nginx server to be listening on port 443 with a legit certificate.

Turns out, it wasn't as bad as I thought it might be. 🙂

Starting with my Ubuntu 22.04 install, I added the packages I was going to need, based on this blog post on the nginx site.

  $ sudo apt-get -y install --no-install-recommends nginx certbot python3-certbot-nginx

Once these are installed, we could set the server_name in the nginx config:

  $ sudo /etc/nginx/sites-enabled/default

and update the server_name line to be:

  server_name mybox.mydomain.com;

and then we can get the initial certificate from Let's Encrypt and register a new email account with them with:

  $ sudo certbot --nginx -d mybox.mydomain.com -d mydomain.com

and the second -d argument is for an additional domain for the certificate. I didn't need it, so I just had the one -d pair on my certbot command.

After this, we edit the config file again, updating the port 443 section's location specification with:

  location / {
    # forward all HTTPS traffic to port 6543
    proxy_set_header  X-Forward-For $remote_addr;
    proxy_set_header  Host $http_host;
    proxy_pass        "http://127.0.0.1:6543";
  }

and then verify the nginx config with:

  $ sudo nginx -t

and then tell nginx to reload the config with:

  $ sudo nginx -s reload

At this point, the box is answering HTTPS traffic, and forwarding it on to the Node service at port 6543. Excellent. 🙂

In order to refresh the Let's Encrypt Certificate on time, let's add a simple crontab entry:

  $ crontab -e

and then have the entries:

  # run all the commands on Bash not Bourne Shell
  SHELL=/bin/bash
  # send all the mail to my main account
  MAILTO=bob@mydomain.com
 
  # check the Let's Encrypt certificate each dat at noon UTC
  0 12 * * *   sudo /usr/bin/certbot renew --quiet

And that should do it.

Setting up iPad Pro Development

October 11th, 2022

IPadPro

I have been doing some manual tasks that I decided today I really wanted to automate. The problem was, it was updating a few rows in a database, and so I didn't really want to expose an endpoint that achieve this, just on the very slim chance that the service might get hacked. I know, we protect these things carefully with Google Cloud Tasks, but I just felt these tasks needed to be done outside the scope of the running service, and it was possible, but tiring, to do it manually. First, with psql, and then with a bash script which took command-line options, and then called psql, and made the updates.

In all, it wasn't a bad idea. And it was working just fine - except for the tired part. 🙂 So while I didn't want to set up a crontab job on my laptop, I could set up one on a Cloud VM that is only accessible by me based on an RSA key. That is secure, and it's out on the network, so I don't have to worry about my internet service going down.

So I needed to have some way to replicate my entire development environment onto my iPad Pro, and then from there use the tools I've pulled together to try and make this happen, and decided to push it that last little bit.

Starting with Working Copy on the iPad, I have a complete, stand-alone Git client that has created local directories on my iPad so that an editor like Textastic on the iPad can access these files, save to them, and Working Copy will detect the changes. Additionally, Textastic can upload the files to a hope using scp, so I can edit and save, upload and test, and then make a PR, and push up to GitHub.

I needed to be able to run Node, and a few more watching commands on the box, so I had to get everything up on the Ubuntu 22.04 box in the Cloud, and then wrangle everything to get it all going. The most troublesome thing is that mosh, the Mobile Shell that I use with Blink on my iPad, doesn't allow for SSH Key Forwarding. It's something about mosh, and I understand the reason, but I also know the mosh folks are working to fix this - but it is annoying not to be able to use git within mosh because the SSH keys aren't carried up in the communication stack.

Still, with conventional ssh, they are carried, and I can use that, as needed. Someday soon, there will be a way to use something like Guardian Angel for the SSH key forwarding in mosh, but for now, this works.

At this point, I can edit locally... push to the cloud, have nodemon restart the server on any change... and hit the service on the standard Node port 6543. But then I needed to get nginx forwarding HTTPS to port 6543, and that's another challenge for another day.

What I can do is to run the bash scripts on the Cloud VM, and then crontab the runs so that I can never again have to worry about being so tired from running these commands at odd hours. 🙂

Ordered my iPhone 14 Pro!

September 9th, 2022

IPhoneX

After a very smooth initial set-up yesterday, this morning, I pulled up my iPhone 13 Pro, and completed the ordering of my iPhone 14 Pro... Space Black, and it's going to be here on the 16th - about a week. It's a yearly fun thing to do, and I always like shipping my current phone to my sister so she has something fun to get in the mail this time of year.

I mean, who doesn't love a surprise? 🙂

As always, there are a lot of things to look forward to, but the Camera is a biggie, as is the new Dynamic Island, or "What to do with the notch". I think it's going to be very interesting what they use that for.

It'll be a fun Friday!

Upgraded Postgres to 14.4 on Homebrew

August 11th, 2022

PostgreSQL.jpg

Nothing major, but I did notice that 14.4 was the stable release of Postgres, and so I decided it was time to upgrade to the latest from Homebrew. And it really is very easy (again):

  $ brew upgrade postgresql

and then after all the downloading and installing, we have:

  $ psql --version
  psql (PostgreSQL) 14.4

Then we are good to go! 🙂

Interestingly, this time I didn't have to run:

  $ brew services restart postgresql

for when I did, it told me it was already running. Nice - it restarted on it's own. 🙂

Another Water Sample Day!

July 19th, 2022

Beaker

This morning I took another water sample, and they are collecting it this morning for analysis. It's part of what Naperville is doing to monitor water quality, and it's always nice to get the reports back and make sure I'm not drinking "bad" water.

The City drops off liter-sized bottles, and picks them up, and sends the results... what could be easier? I'm sure there are folks that think this is annoying, but it's just a really great perk to me. 🙂

Google Kills Third-Party GTalk Clients

June 23rd, 2022

Adium.jpg

This morning Google finally shut down third-party access to GTalk - basically, the Pidgin protocol users, and that included Adium, the multi-protocol IM client that I've been running for a long time. True, Google has created a Chat app for iOS/iPadOS, and that allows me to stay in contact with folks that are still on GTalk, but it's sad to see the openness of the IM space shrink to the point of insignificance.

Adium used to be able to handle ICQ, Yahoo, Talk, AOL IM, Twitter, Facebook IM, but one by one, those have all shut down, and Talk was the last one. Sad to see it go. But it was the last Intel-based app I ran on my MacBook Pro, so now it's native Apple Silicon apps... which is something.

Temurin 11 is on Homebrew

May 24th, 2022

Homebrew

This morning I decided to see if I could get the AdoptOpenJDK 11, now called Temurin 11, going on my M1Max MacBook Pro. In the past, they have had the AdoptOpenJDK 11 on Homebrew, but it was Intel, and I didn't want to bring in Rosetta 2 for any Clojure work, so I was willing to wait. I read on Twitter from the Eclipse Foundation that they had placed Java 11 and 8 for Apple Silicon on Homebrew, so why not?

It turns out, it's not bad at all:

  $ brew tap homebrew/cask-versions
  $ brea install --cask temurin11

and it's ready to go. Then I can use my setjdk function to switch between JDK 11 and 17 on my laptop, which is nice when there are some issues I've had to deal with in the past. Don't know when I'll need this again.

Sadly, the architecture for JDK 8 is still Intel:

  $ brew info temurin8
  temurin8: 8,332,09
  https://adoptium.net/
  Not installed
  From: https://github.com/Homebrew/homebrew-cask-versions/blob/HEAD/Casks/temurin8.rb
  ==> Name
  Eclipse Temurin 8
  ==> Description
  JDK from the Eclipse Foundation (Adoptium)
  ==> Artifacts
  OpenJDK8U-jdk_x64_mac_hotspot_8u332b09.pkg (Pkg)

that last line is the kicker: x64... so it goes. Still... I have JDK 11 for Apple Silicon now, that's good. 🙂

Play.js Updated to CodeSandbox

May 4th, 2022

PlayJs

I was doing a little Node/JS coding on play.js on my iPad Pro this week, and ran into a few issues that I wrote to the developers about. They weren't all that big a deal, save one:

  • Logging is iffy - using Node/Express, their default is the debug logging package, and yet you can't see any of the log messages in the console in the app.
  • Running nodemon doesn't reload on changes - it would be nice to have a way to auto-reload changes in the files - specifically because the editor is saving them.
  • Exceptions aren't logged - if there's an uncaught exception, it's not logged/printed in the console at all. Just silence.

And it's really the last one that's the kicker... no way to see if there has been any exceptions... that's something that would make it very hard to find errors in the code.

They wrote back that there would be updates that were coming soon that would fix most of these, and that I should sign up for the CodeSandbox Beta program and look for the updates. Well... this morning, I saw that they had an update, and changed the name of the app on iPadOS to CodeSandbox. So I fired it up to see how things had changed.

There were lots of changes, but the key problems I was having haven't changed, and they have really moved it away from what I liked about it, and towards another style, with different goals. It's OK... it's their app, but it's not the direction I was hoping they were going.

So... it looks like I'll have to wait a little longer to see what comes up as a development platform for the iPad...

Upgraded Postgres to 14.2 on Homebrew

April 20th, 2022

PostgreSQL.jpg

This morning I was looking into the Ubuntu 20.04 to 22.04 LTS upgrades, and decided that it was probably a good time to see about the latest version of Postgresql for my laptop. Thankfully, it's a minor version upgrade from 14.0 to 14.2, and this is something that Homebrew can do quite nicely:

  $ brew upgrade postgresql
  $ brew services restart postgresql

and then after all the downloading and installing, we have:

  $ psql --version
  psql (PostgreSQL) 14.2

Then we are good to go! 🙂

I haven't had a need to use the local Postgres server a lot in the last year or so - using a Google Cloud instance for a while, but it's nice to have all the client support, and to have something local as that's still the best insurance to off-the-grid development.