Linux Simple VPN Split Tunnel on Linux The IP-based split-tunneling that I explore here allows control over which IP addresses go through a default VPN tunnel and which instead go through your regular network interface (or another VPN).
Linux Kubernetes Rolling Volume Backups Use rsync hard-links to perform rolling backups of Kubernetes Volumes
Quick Tricks Bash script to check SSL certificate expiry This script iterates through my list of targets, checks the certificate expiry and prints the details.
Android Reading and Writing files in Android 10+ Scoped Storage Use Kotlin and Jetpack Compose to read and write files with the new scoped storage system in Android 10 and above.
Android Making HTTP requests with Coroutines in Android Coroutines are a powerful feature in Kotlin to write asynchronous code that can look like synchronous code. Volley is a popular Android library for making HTTP requests. By combining the two we can drastically simplify code that depends on multiple API calls
Android Basic XML Parsing in Android A small code snippet showing how to read values from an xml file in Android
Quick Tricks Decode Webpages using FireFox Plugin Create a FireFox extension that allows post processing a webpage. Use a mapping file to decode hidden values.
Rust Writing Tests in Bevy Here I build the classic phone game Snake,with tests using the Bevy Game Engine.
Testing Unit Test Scope (Domain) By understanding what a function is and is not responsible for we reduce duplication and make our code easier to understand and more resilient to change.
Testing Smaller, Clearer Tests Generating test values can better express intent of input values. The examples are written using Typescript, but the same technique can be used elsewhere.
Quick Tricks Cmake, Conan, and GTest Example A minimal example of a project that uses cmake, conan, and gtest. I make use of the very handy cmake-conan wrapper. This setup also works seamlessly in CLion
C++20 Concepts in Concept Member Functions In this article I show a way to use Concepts in the member function parameters of other Concepts using function_traits.
C++ Dependency Injection with C++20 Concepts and the Service Provider Pattern In this article I explore a system of using C++20 Concepts for Dependency Injection
C++ Jthread, Stop Tokens, and Latches In this article I use jthread, stop tokens and latches to coordinate a worker pool
Quick Tricks List GitHub Repositories with Search Term GitHub provides search functionality, but it returns every mention in code. I just needed the list of repositories. Using the GitHub API we are able to fetch these results.
Terraform AWS Lambdas with Terraform This project was used to quickly create some server-less functions with AWS Lambda and make them accessible via HTTP requests.
Quick Tricks Rotating Password Generation Command Use Linux Watch to continually generate passwords for you
Quick Tricks Batch convert video files with grep, xargs, sed and ffmpeg Explore a combination of tools including pipe, grep, find, xargs, and sed to do some video conversion
Linux Docker is using all my inodes We recently had an issue where one of our servers was getting out of disk space errors when trying to pull new Docker images. This caught us by surprise as none of our disk usage alerts had fired. Once we got on the box to investigate we realised that it
Quick Tricks Multiple Git accounts with different SSH keys It's quite simple to setup multiple Git (in this case GitHub) accounts on the same machine, each using different SSH keys. The scenario that I use this for is to have both a personal account and a work account. Host github-personal HostName github.com IdentityFile ~/.ssh/personal_github_
Kubernetes K8s Grafana Doesn't Persist Data I recently setup monitoring on my home MicroK8s [https://microk8s.io/] cluster (Prometheus, Grafana, InfluxDB) and found out the hard way that by default the Grafana deployment does not have any kind of Persistence (emptyDir volume [https://kubernetes.io/docs/concepts/storage/volumes/]). If the pod gets restarted all of
Kubernetes K8 Host Storage Backups with Rsync and CronJob I host a single node Kubernetes cluster (MicroK8s) at home running various applications. I use simple hostpath volumes for storage and need a way to create backups of this data. The solution I chose is to combine K8 CronJobs with Rsync. The basic steps are: * Create a backups namespace * Create
Quick Tricks Application Data Sync with WebDAV Use WebDAV in your application to sync files (sqlite in my case) between devices. Storage backed by NextCloud, AWS S3, Google Drive, Dropbox and more