Running LXCs on Debian

· Reading time: ~4 minute(s) (783 words) linux homelab lxc

I discovered that you can run LXC containers on Debian without needing Proxmox. Sure, you miss out on the great tooling that Proxmox has, but it’s useful when you’re working with limited resources… which I am.

This follows on to my previous post where I talked about keepalived where I used it for providing resiliency to my home DNS. This time, I’ll be moving my second container onto another machine.

(Continue reading)

I discovered keepalived

· Reading time: ~6 minute(s) (1174 words) linux homelab networking

I’ve wanted to provide some resiliency to our home DNS setup for a while, mainly to stop needing to schedule any maintenance on my Proxmox “server”, but also because it makes sense.

So after some investigation, and conversing with Claude, I discovered keepalived.

What is keepalived?

Keepalived is a Linux daemon that provides high availability (HA) and load balancing for server clusters using the Virtual Router Redundancy Protocol (VRRP) to manage a virtual IP address, ensuring seamless failover and continuous service availability. It is commonly used in conjunction with other services like HAProxy and Nginx to enhance network resilience.

(Continue reading)

Pantheon Code on Arch Linux

· Reading time: ~2 minute(s) (231 words) tools programming linux

Prior to getting the MacBook Air as my portable beater machine, I was temporarily using my old HP DM1-4027. As expected, despite having 8GB RAM, it wasn’t very quick so I wasn’t going to get away with using VSCode as it’s not exactly resources friendly is it?

Enter “Pantheon Code”, a text editor that is built into ElementaryOS. It looks simplistic, offers syntax highlighting, git integration and it can load a terminal window into a panel at the bottom. What more do you want when you’re on the move!?

(Continue reading)

Arch Linux on Macbook Air

· Reading time: ~3 minute(s) (561 words) linux arch macbookair

A few months back I was looking for a “beater” laptop - a cheap device that can go (almost) anywhere and take a few bumps along the way that I’m not too bothered about. Sure I have my MacBook Pro, but even after 4 years, it’s still in great condition and I’d like to keep it that way.

After the usual hunt for Lenovos, and realising they hold their value better than they used to, I needed to think outside of the box. And that’s when I saw the MacBook Airs from 2015. After a few attempts, I managed to find one on eBay that was near to home and already had a bump or two but was in good working condition. I got lucky with the spec too… a 2015 MacBook Air with an i7-5650U processor, 8GB RAM, 1TB NVMe and a battery with only 11 charge cycles.

(Continue reading)

Arch Linux Installation

· Reading time: ~6 minute(s) (1171 words) techsupport notes linux macbookair

First of all, create a bootable USB (or CD) based on the ISO downloaded from the main Arch Linux website and boot it up.

The Arch Linux wiki is probably one of the best I’ve ever used, so the latest basic installation steps can be found here.

(Continue reading)

Storybook JS: 'Cannot GET /'

· Reading time: ~1 minute(s) (151 words) programming web javascript storybook react

When you run storybook locally, you might encounter the error ‘Cannot GET /’ when browsing to localhost:6006.

The general advice given online is to delete all node modules for your project and re-install the packages using your preferred package manager. However, this doesn’t always solve the problem and I was in this position just a moment ago.

Luckily, in the Storybook CLI docs, there is an argument --no-manager-cache which says that it will disable the Storybook manager caching mechanism. They recommend not using this every time you run it, but it’ll help when you need to refresh the Storybook UI, such as when editing themes etc.

(Continue reading)

React Native & Android: "Failed to Install the App"

· Reading time: ~1 minute(s) (137 words) programming mobile android react-native

I’ve been setting up a MacBook Pro to be able to work on a React Native mobile app and hit a stumbling block when running the Android app locally.

I had already installed all the relevant applications needed (Android Studio, a JDK etc.) but when I ran react-native run-android, it would give me the following error:

error Failed to install the app. Make sure you have the Android development environment set up

I tried a few different things until I came across a solution proposed by Menon Hasan on Stack Overflow where they proposed the following command to set the executable permission on the gradlew file:

(Continue reading)

iOS APNs/APS Environments

· Reading time: ~2 minute(s) (337 words) programming reactnative ios javascript

At work, we’re working on a React Native mobile app. For our iOS deployment, we have our test builds (that consumes APIs in a testing environment) going to MS App Center, and production builds going to TestFlight, eventually being promoted to the App Store.

We use MS Notification Hub to handle our push notifications that are triggered by internal systems etc. but we wanted to achieve a situation where we were using a testing APNs environment (i.e. the sandbox) for our App Center builds, and the production APNs environment for our TestFlight/App Store builds.

(Continue reading)

Reduce a large JSON object down to only what you need

· Reading time: ~2 minute(s) (393 words) programming javascript json web

Sometimes you need to use an API that returns a large payload, but you may only need to use a small number of fields from that payload. Rather than try storing that data, or hand-balling the data yourself, there is an alternative solution.

In various other languages, such as C#, you can serialise and deserialise data and strip out what data you don’t want (by not declaring those properties in the models). This post explains how you can achieve the same thing in JavaScript with a little help from a pre-defined model, and some recursion:

(Continue reading)

Stop your font sizes differing between Landscape and Portrait mode on iOS

· Reading time: ~1 minute(s) (56 words) programming css web ios

Have you ever had the problem where you’re styling some content but when you rotate the device to change between landscape and portrait modes on an iOS device, the font size changes?

The simplest way to resolve it is to include this in one of your primary css rules such as html or body:

-webkit-text-size-adjust: 100%;
(Continue reading)