RSSAmplifier

Blog

Posts on Bad Sector

Recent content in Posts on Bad Sector

badsector.devRSS feed ↗13 posts

Latest posts

Dynamic Runtime Configuration in Angular 19

Angular applications traditionally require separate builds for different environments (development, staging, production). This approach has limitations: longer CI/CD pipelines, multiple artefacts to manage, and the inability to change configuration without rebuilding. Let’s implement a better solution using runtime configuration. The Problem with Traditional Environment Files Angular’s…

Managing Multiple Git Accounts with direnv

Working for multiple clients often requires maintaining separate GitHub accounts for each organisation. This means managing different SSH keys, commit signing configurations, and project-specific environment variables. Whilst you could manually switch configurations or maintain complex shell scripts, I believe there is a more elegant solution: direnv . If you are not familiar with direnv then you…

Targeted Use of GNU Tools on macOS using direnv

Working with bash scripts on macOS often leads to an interesting predicament. MacOS ships with the BSD variants of sed , date , base64 and others that diverge just enough from their GNU counterparts to cause incompatibilities. Take sed for example: # GNU (Linux) version - works fine sed -i 's/foo/bar/' file.txt # macOS version - fails sed -i 's/foo/bar/' file.txt # Error: sed: 1: 'file.txt':…

DIY kubectl plugins as aliases

The Problem I often find myself googling for some kubectl command that I have used before but can’t quite recall. If I thought long enough about it, I could usually construct most of these, but I like to choose where I deploy my brain cycles carefully, and repetitive CLI commands are not usually at the top of my list of things I want to think deeply about. For example, the command for…

DevOps Is A Culture Not A Function

DevOps is not a function, it is not a team, it is not a role. There, I said it. Click bait deployed. I am by no means the first to express this sentiment (and I urge you to go and read There Is No Such Thing as a DevOps Engineer to get a far more cogent analysis than I will offer here), but having recently been involved with clients that have a DevOps Team and are hiring for DevOps Engineers, I…

Shrink Your Symbol Fonts

Create a Custom Font Subset with Just the Glyphs You Need Imagine you’re sprucing up your website. You want crisp, scalable icons for RSS, Twitter, Instagram, and/or GitHub. You are no designer and you don’t want to mess around creating SVGs, so you opt for a symbol font - an excellent choice if I do say so myself. But then you realise it’s a whopping 900KB and includes glyphs…

Git Aliases for the Lazy and Grug Brained

I’ll admit that I am lazy, have a terrible memory and generally fit the archetype of the grug brained developer . As such I endeavour to make my life as easy as possible, ideally with as little effort as possible. Usually this manifests as me doing some work up front to make my life easier later on, and in fact this has turned out to be a corner stone of my my career to some extent,…

Realtime Status updates using a Telegram Bot

Or, How to Send Status Message from GitHub Actions to Telegram: A Guide I occasionally find myself wanting a quick and easy way to send alerts and status message and a solution I keep coming back to is using a Telegram bot. Telegram is free to use, reliable and easy to setup. It only takes a few minutes to set up the a bot and fire of a test message using curl. From there you can start sending…

Doubly Linked Lists

Very occasionally I write articles or long form notes around some idea or piece of technology that I want to think more deeply about, this is one of those notes that I managed to organise into a post, this time exploring the time honoured double Linked List data structure. A doubly linked list is a data structure that contains a collection of nodes, each of which holds references to both the…

Time Machine Backups Using Proxmox, Ubuntu and an External USB Drive

This guide assumes you already have a Proxmox host, at the time of writing v8.2 was current, which is what I used. It also assumes you have a basic Ubuntu 24.04 VM running on that host. If not, you should set that up first. The VM can be fairly minimal; for example, 8GB of storage and 1GB of RAM should more than suffice. It also assumes you have a USB Storage device that you want to use for…

pwsh64.sh - PowerShell amd64/x64 Docker Runner

This post presents a bash script that allows you to run PowerShell commands and scripts in an x64 environment using Docker on Arm based systems. It’s particularly useful for those using Apple Silicon (or other ARM based systems) who need to run x64-only PowerShell tools. Prerequisites Docker installed and running on your system Usage Save the script somewhere on your computer (and optionally…

Graph DB with Postgres

The Big Idea In this post we will leverage the power of PostgreSQL Common Table Expression to create a makeshift graph database. The goal is to represent nodes (things like stories, tags, etc.) and edges (connections between those things) using relational tables. This allows us to query and traverse the data as if we were working with a ‘real’ graph database. entity_map : This table is…

(untitled)

Agile: From Punk Upstart to Corporate Conformist The year is 2001. A ragtag crew of software developers and thought leaders hold a gathering in a ski lodge to draft a proclamation. They dub it Agile - a rebellious manifesto pushing back againt the established norms breaking free from traditional waterfall style project managment doctrines. Down with the top down project managment and up with…