Skip to content

Instantly share code, notes, and snippets.

@fardjad
fardjad / considerations-for-running-postgres-on-nfs.md
Last active October 5, 2026 19:07
[Considerations for Running Postgres on NFS] Considerations for running a Postgres database on an NFS share #blog #postgres #nfs #fsync #fsexport #mount

Considerations for Running Postgres on NFS

Background

Over the weekend, I decided to try running a Postgres database in my Homelab. In my current setup, the most convenient option for storage is NFS. However, NFS is especially tricky for databases. A misconfigured setup can lead to performance or data corruption issues.

After watching

@fardjad
fardjad / taming-an-onyx-tablet.md
Last active September 28, 2026 12:46
[Taming an Onyx Tablet] The documented process of securing my Onyx Boox tablet #blog #onyx #boox

Taming an Onyx Tablet

Onyx tablets reportedly phone home and send "data" to some servers in China. The manufacturer apparently refuses to publish the source-code modifications to the OS and the open-source apps they are using and they even go as far as violating GPL.

Of course I learned all that after buying this tablet. To ease my mind, I spent some time debloating it and then blocked the outgoing traffic to

@fardjad
fardjad / !modern-typescript-app-no-build.md
Last active September 23, 2026 13:20
[Shipping A TypeScript Frontend App Without a Build Workflow] Exploring the idea of shipping a modern front-end application written in TypeScript without a build workflow #blog #frontend #typescript #nobuild #serviceworker

Shipping A TypeScript Frontend App Without a Build Workflow

I was once working with a client, and our team was facing a mix of technical and non-technical challenges in shipping a relatively simple web application. During one of our meetings, I cracked a silly joke: "At this rate, we might as well zip up the source code and send it to anyone who wants to try it." (note for the reader: our users were non-developer colleagues from the same organization)

Of course we chuckled and we moved on. But later, I found myself aching to try that silly idea out. Or a refined version of it:

@fardjad
fardjad / how-to-start-colima-automatically-on-macos.md
Last active September 19, 2026 08:43
[How to start Colima automatically on macOS] Instructions for starting Colima automatically on macOS similar to Docker Desktop #macos #colima #docker

⚠️ Note: Since the merge of the commit Homebrew/homebrew-core#149670, starting Colima is as easy as running brew services start colima. You can skip the following work-around.

Steps

  1. Create an executable script to run in foreground and manage colima:
cat <<-EOF | sudo tee /usr/local/bin/colima-start-fg
#!/bin/bash
@fardjad
fardjad / yet-another-guide-to-getting-started-with-local-ai-on-strix-halo.md
Last active May 17, 2026 13:19
[Yet Another Guide to Getting Started with Local AI on Strix Halo] Practical setup for running local AI on Strix Halo with ROCm, Lemonade, and optimized llama.cpp #localai #strixhalo #rocm #llamacpp #amd #blog

Yet Another Guide to Getting Started with Local AI on Strix Halo

AMD’s Strix Halo APU is one of the most interesting consumer options right now for running local AI workloads. It is relatively power efficient, and its unified memory architecture lets the GPU access large amounts of system RAM. This makes it possible to run larger models locally without a discrete GPU.

As the software is still maturing, running models with GPU acceleration is not exactly straightforward yet. So I wrote this guide after getting a setup working

@fardjad
fardjad / how-to-install-homebrew-on-debian-based-distros.md
Last active May 16, 2026 06:06
[How to Install Homebrew on Debian-based Distros] Steps required to install homebrew on MX Linux (and other Debian-based distros) #linux #debian #mxlinux #homebrew

How to Install Homebrew on Debian-based Distros

Steps required to install Homebrew on MX Linux (and other Debian-based distros)

Steps

  1. Update apt cache and optionally do a full upgrade

     apt update
    

apt full-upgrade # optional, reboot if needed

@fardjad
fardjad / minikube-on-wsl2-with-podman.md
Last active May 12, 2026 02:41
[Minikube on WSL2 with Podman] Tips for running a local development Kubernetes cluster on WSL2 with Podman #wsl2 #minikube #podman #kubernetes #docker
@fardjad
fardjad / base16-eighties.palette
Created April 20, 2026 02:39
Base16 Eighties Palette for Ptyxis
[Palette]
Name=Base16 Eighties
Background=#2d2d2d
Foreground=#d3d0c8
Cursor=#d3d0c8
Color0=#2d2d2d
Color1=#f2777a
Color2=#99cc99
Color3=#ffcc66
Color4=#6699cc
@fardjad
fardjad / how-to-install-homebrew-on-manjaro.md
Last active April 1, 2026 03:50
[How to Install Homebrew on Manjaro] Steps required to install homebrew on Manjaro Linux #linux #manjaro #homebrew

How to Install Homebrew on Manjaro

Steps

  1. Install base-devel

     pacman -Syu # CAUTION: this updates the whole system
     pacman -S base-devel
    
  2. Run the installer script

@fardjad
fardjad / exposing-ports-of-a-running-container.md
Last active December 10, 2025 08:24
[Exposing Ports of a Running Container] A method for exposing Ports of a running Docker container without having to recreate it #blog #docker #socat #stdio #tunnel

Exposing Ports of a Running Container

When running containers with Docker Compose, I sometimes want to access an unpublished port from a dependency container. For example, I sometimes need to connect directly to a database running inside a compose stack. The usual solution is to edit (docker-)compose.yml and recreate the container with a published port. This works, but it is disruptive when the service is already running.

After experimenting a bit, I discovered two ways to expose container ports without recreating the containers. I'll document those in this post.

Method 1: Mapping Ports Through Standard Streams

[!NOTE]