Code or Die Welcome to my kitchen

Yak shaving tips, Infosec, Astronomy, Gardening

This is my blog. Proud guardian of three cats and two dogs, I currently reside in San Antonio, Texas.

I'm interested in gardening, astronomy, infosec among other pursuits. About this site.

Past and current projects. You can also browse the blog archive if you like.

Message of the Day: Party on dudes!

Let's Use Homebrew curl

While macOS supplies a fine and dandy curl binary for Terminal, let’s install an updated version managed by brew.

First let’s see what is there.

$ which curl                                                                        
/usr/bin/curl

$ curl --version                                                                           
curl 8.7.1 (x86_64-apple-darwin23.0) libcurl/8.7.1 (SecureTransport) LibreSSL/3.3.6 zlib/1.2.12 nghttp2/1.61.0
Release-Date: 2024-03-27
Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns ldap ldaps mqtt pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS GSS-API HSTS HTTP2 HTTPS-proxy IPv6 Kerberos Largefile libz MultiSSL NTLM SPNEGO SSL threadsafe UnixSockets

Not too shabby. To be frank I’d expected worse 😂 But now let’s install curl via brew. Optionally add binary filepath to $PATH env var so brew’s curl is used instead of system’s.

From curl docs1:

$ brew install curl

$ echo 'export PATH="$(brew --prefix)/opt/curl/bin:$PATH"' >> ~/.zshrc

$ source ~/.zshrc

However if you are like me and use .zshenv for your env vars, use the following line in that file instead. (Or use ~/.zshev as target of above echo command.)

export PATH="$(brew --prefix)/opt/curl/bin:$PATH"

After reloading/sourcing terminal window, we now see this.

$ which curl                                                                 
/opt/homebrew/opt/curl/bin/curl

$ curl --version    
curl 8.13.0 (aarch64-apple-darwin23.6.0) libcurl/8.13.0 OpenSSL/3.4.1 (SecureTransport) zlib/1.2.12 brotli/1.1.0 zstd/1.5.7 AppleIDN libssh2/1.11.1 nghttp2/1.65.0 librtmp/2.3
Release-Date: 2025-04-02
Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns ldap ldaps mqtt pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp ws wss
Features: alt-svc AsynchDNS brotli GSS-API HSTS HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz MultiSSL NTLM SPNEGO SSL threadsafe TLS-SRP UnixSockets zstd

Addendum:

I had to revert the interpolation in .zshenv as it was not working as intended. Using /opt/homebrew hard coded instead of $(brew --prefix).

¯\(ツ)

Welcome to Jekyll, again!

Updated my blog’s Ruby version and bundle. Just a couple of snags along the way.

Prep

After brew upgrade, had to restart postgres brew services restart postgresql@15

Also couldn’t seem to launch VSCodium even after updating it via brew: brew upgrade vscodium --cask

“Apple can’t check app for malicious software” Using an app that can’t be checked for malicious software might harm your Mac or compromise your privacy.

Turns out had to actually grant exception in System Settings > Privacy & Security in the sidebar, then scroll down to “Open Anyway”. Security!

Also, when running bundle update, ran into messages like Bundler 2.4.19 is running, but your lockfile was generated with 2.5.18. Installing Bundler 2.5.18 and restarting using that version., and then it went and failed on some more gems. Solution: was to remove Gemfile.lock and regen it by re-running bundle install.

Now ready to actually upgrade Ruby

rbenv install 3.3.5

  • Need to prepend be (alias for bundle exec) to jekyll serve once getting thru bundle update.

  • Re-add _drafts directory.
  • Update _config.yml, permalink: /blog/:title.html
  • Check the links n assets n stuff

Now I’m seeing a new-to-me Netlify feature: Branch deploys!🎉

This will let me see build errors on branch rather than having to push to prod (main).

Now seeing something new is wrong with the new branch’s build:

An error occurred while installing bigdecimal (3.1.8), and Bundler cannot
continue.

In Gemfile:
  jemoji was resolved to 0.13.0, which depends on
    html-pipeline was resolved to 2.14.3, which depends on
      activesupport was resolved to 7.2.1, which depends on
        bigdecimal
Error during gem install
5:32:07 PM: Failing build: Failed to install dependencies
5:32:07 PM: Failed during stage 'Install dependencies': dependency_installation script returned non-zero exit code: 1

Things I’ve tried from Netlify config side to troubleshoot:

  • Update node Netlify uses from 8.x(!) to 20.x
  • Activate the aforementioned branch deploys.
  • Naturally check the Build image Linux version. Rats, this was already on latest selection possible Ubuntu Focal 20.04 (default). Only other option was Ubuntu Xenial 16.04 (deprecated).
  • I found where to make the deploy logs private, not sure why that isn’t the default. While it’s not a huge deal to my personal threat model, pretty sure I wouldn’t want my biz out there like that..
  • To be continued…

TODOS:

  • Promote synergy
  • Post excerpts on index page
  • Update /history?
  • Finally get around to whatever Googs replaced Universal Analytics with.
  • WHY ARE THESE CHECKBOXES SHOWING THE LIST BULLETS
  • ???
  • Profit

UPDATE!

I managed to deploy the branch by simply downgrading ruby version to 3.1.6, (originally was 3.1.3 so still an upgrade.) Tried 3.2.5 for shits and giggles, but bundler failed with some weird stuff. So I just said, ‘screw it’.

Was inspired to try downgrading from this Stack Overflow answer, you know, that poor-man’s LLM, pounding digital pavement the old-school way.

Seems there were quite a few breaking changes in Ruby 3.2.0 so I’m still not 100% on what the issue was 🤷