MacOS adaption

New role, new laptop, new Operating system — Having come from Windows & Linux desktops, I found MacOS to be extremely jarring when it came to a number of simple but crucial tasks, it was time-consuming to find the equivalents and workarounds for many typicalß developer tools. I’ll summarise my approach here and update as and when I find improvements. A quick summary on what I need; Git, Code editors, Linux CLI, Linux containers, productivity shortcuts....

June 7, 2023 · 5 min · Joe Heaton

WSLg - Graphical Apps on Windows Subsystem for Linux

Windows Subsystem for Linux supports displaying graphical Linux apps, it implements this via transparent RDP which forwards the visuals to Windows. ...

February 21, 2023 · 1 min · Joe Heaton

Git config per directory

I discovered gitconfig’s includeIf feature can change your global Git config depending on which directory you are working in. This is super useful if you have different identities for different project, or you need to specify the SSH key to use, etc.. in my case I want to use my personal email address for personal projects and work email for work projects. So let’s assume a directory layout like this:...

February 9, 2023 · 1 min · Joe Heaton

Split Audio for Streaming via OBS

Streaming from your PC can be tricky, your computer makes a lot of sounds that you don’t want to be broadcast; Whether that be a video tutorial playing in the background, chat notification sounds, or even your voice calls. This setup uses VB-Audio’s VB-CABLE Virtual Audio Device, you can download it for free at vb-audio.com/Cable . For more complex setups you can incorporate multiple virtual audio adapters, up to four extra are available on the same website as donationware....

February 5, 2023 · 2 min · Joe Heaton

Git Commands

Some of my most visited Stack Overflow answers are on how to use Git! We all remember how to add, commit, push, but how often to do you rebase, resolve merge conflicts, modify old commits? Here I’m going to list out all the Git commands I usually look-up! Including any relevant updates, since Git and the way we use Git is always evolving! Commands Git config for a directory full of repositories When you have sets of git repositories with different credentials it can be useful to manage shared git configuration across them....

February 2, 2023 · 5 min · Joe Heaton

Ansible via Google Cloud IAP Tunnel

Ansible is a great tool for managing configuration across a fleet of compute resources, but it struggles with dynamic sets of compute that are constantly being destroyed and spawned since it the user has to maintain a static list of hostnames. ...

September 23, 2022 · 2 min · Joe Heaton

Terraform init-validate-plan-apply Bash function

Tired of typing Terraform init, validate, apply? I’ve written this bash function to speed this up and implement some good practices. ...

July 14, 2022 · 3 min · Joe Heaton

Google Cloud CLI 'gcloud' Variables

I find it useful to frontload my terminals with context about my environment; You wouldn’t want to deploy to the wrong environment now would you? Here I extract information from Google Cloud CLI and print it at the start of every new terminal tab in order to understand exactly where my Google Cloud API requests will go by default. ...

June 21, 2022 · 2 min · Joe Heaton

Understand MermaidJS; Concepts & Syntax

MermaidJS is great because it brings graphs-as-code to the web! No longer do we need to run graphviz from the commandline to generate static image files each time we make a change; Now we see changes instantly, embed graphs with ease in source repositories and track their changes, etc.. The trouble I’ve had with Mermaid is figuring out the syntax, there are quite a few gotchas which don’t advertise themselves very clearly, such as it not tolerating blank lines, or spaces are comma-deliminated lists.. I’ll list these here so you can get graphing quicker than I did! ...

May 17, 2022 · 2 min · Joe Heaton

Styling MermaidJS

What’s better than a graph? A graph with style! Using Mermaid’s class definitions we can style blocks and subgraphs to reflect the ecosystem they belong to; In this case I want to style my infrastructure diagrams to Google’s branding. ...

May 13, 2022 · 2 min · Joe Heaton

Use Terraform Graph in MermaidJS

Terraform has a built-in command to generate a Graphviz digraph representing the output of terraform plan, but this output is pretty messy and can’t render in MermaidJS. ...

May 11, 2022 · 2 min · Joe Heaton

My VSCode

Visual Studio Code, “VSCode”, is the hugely featureful successor to projects like Atom & Visual Studio itself, the extensibility of VSCode is key to this success and I’m going to share what I do to make VSCode work for me. ...

May 2, 2022 · 3 min · Joe Heaton

Working with Gnome 3

I’m back on Ubuntu with the Gnome 3 desktop environment and here are a few customsations to make it more productive and make moving between Gnome 3 & Windows simple. ...

February 24, 2022 · 3 min · Joe Heaton

Monitor Internet Health with FluentBit & Grafana

I want to keep an eye on my Internet service provider after a series of prolonged outages, to that end I setup a Grafana dashboard to monitor my connectivity to various online services. ...

February 21, 2022 · 2 min · Joe Heaton

Understand Chia Pools and Farming your NFT Plots

Chia (XCH) is a cryptocurrency based on Proof of Space-and-Time rather than the much more familiar Proof of Work that plagues our efforts to decarbonise our energy grid. Chia was initially developed by @BramCohen , known for developing the BitTorrent protocol. ...

July 10, 2021 · 4 min · Joe Heaton

Bash opinions

Everyone has their own preferences when it comes to writing Bash scripts, I prefer very high safety & syntax consistency. A good example of both is variables, ${USER} can be shortened to $USER, but any following characters could be interpreted as part of the variable name. The longer syntax is also more powerful, enabling small conditional checks, which means we’ll likely end up using the longer syntax somewhere in our script, so why not keep it consistent and use it everywhere!...

June 25, 2021 · 2 min · Joe Heaton

Automatically set your github.io domain in GitHub Actions

Collaborative websites need to be forked, but if you set a hostname variable, such as baseURL in Hugo, the forked website will load resources from the original.. Not ideal. The fix I applied to my GitHub Actions CI to work around this: ...

April 20, 2021 · 1 min · Joe Heaton

Host Hugo static website on GitHub Pages using Actions and my domain

In a cost-saving exercise I wanted to try host my personal website on a free platform, since the code repository is hosted on GitHub, I decided to look into GitHub pages. ...

March 12, 2021 · 5 min · Joe Heaton

my Vim

This is my .vimrc, I find it benefitial to use this where I do development to normalise my editor across different operating systems, and to enable some useful untapped features to make Vim feel a bit less prehistoric. ...

October 14, 2020 · 3 min · Joe Heaton

Remote PostgreSQL using local PgAdmin inside Docker

PostgreSQL management is a never-ending rabbit hole and in my case I just want to create a user, a database and set up some ownership.. without resorting to SQL or complex configuration frameworks. ...

September 29, 2020 · 2 min · Joe Heaton