json
Mendhak / Code
code.mendhak.com · English
Articles, information, and tutorials on development, programming, technology, science.
json
https://code.mendhak.com/feed.json
- Last post
- Sep 16, 2026
- Posts in 24 h · 7 days · 30 days
- 0 · 0 · 2
- Our last check
- Answering
- Served from
- United States
- Text score at discovery
- 14,038
- Format
- json
Posts
What our queue read from this feed. Open one to read it here, or go to the site that published it.
- Routing only a few domains over a VPN
Sep 16, 2026 · original
While researching topics around relatively niche subjects, mostly cats, I’ve needed to access certain websites that block traffic from the UK, namely imgur and civitai. These platforms are global in nature and otherwise accessible to most people, who will have little reason to cater to my geographic circumstances. The most common, but inconvenient, workaround is to turn on a full VPN, visit the pages, and then disconnect and resume normal browsing. A more seamless approach would be to route just the traffic for those domains through a VPN, while keeping the rest of my traffic at its normal speed and routing. This is possible as a follow-up to my existing gluetun VPN setup post . Here it is actually working: A cat image on imgur visible from the UK. The principles are the same, it involves routing traffic for a container through gluetun, which acts as the VPN gateway. The idea here is to - Image rendering in the terminal to aid with descriptive prose
Sep 4, 2026 · original
Although I enjoy reading, having no mental imagery means that rich, descriptive passages are often lost on me. I will skip them and move on, not without feeling guilty about doing so. For this reason I’ve made attempts in the past to aid me, including displaying rendered images on the Kobo . This setup was a bit cumbersom, as I’d lose the changes on firmware updates or device resets. My latest tenuous attempt is to render the images in the terminal using the kitty terminal graphics protocol , which is supported by a number of modern terminal emulators, including WezTerm . On the left I am reading an ebook using epy reader . I copy passages from it and paste it into my running script which waits for input. The script then passes the text, along with a JSON workflow, to ComfyUI; ComfyUI then generates the image and returns it to the script, which then renders it using a kitty graphics prot - A homepage for the terminal
Aug 25, 2026 · original
I’ve mostly used terminals transactionally; though I don’t avoid them, I’ll usually interact with a terminal window to run a few commands, and get back to what I was doing. Over the past few years, though, this has been changing. Thanks to a profusion of modern text-based user interfaces (TUI) applications and modern terminals, it’s now becoming increasingly viable and enjoyable to spend extended amounts of time in here. Its appeal lies in the sense of calm provided by these barebones display capabilities, which are being cleverly adapted into experimental new interaction patterns. This setup manages to provide a much-needed buffer against the increasingly hostile and clamorous nature of the modern web, and the vendor-infested browsers that host it. Modern terminals Over the past decade, several new terminal emulators have emerged, such as Ghostty, Alacritty, Kitty, and WezTerm. They dif - Privacy is not a soundbite
Jul 19, 2026 · original
An unfortunate aspect regarding the privacy discourse is how it has been subverted into a set of meaningless soundbites that detract from actual privacy issues. A commonly used refrain, often used to gatekeep software and services, is about how “they are selling your data”. That’s a gross oversimplification of what privacy is, and actively harms the concept of privacy by framing it as a binary. It takes just a few seconds of critical thinking to watch it fall apart. If a company were to give your data away for free, would that be acceptable? If they use your data as leverage over other entities, would that be acceptable? If they’re selling your data, but you’ve given them fake data, is that acceptable? How about if you want your data to be sold, but also want to be paid for it? These are deliberately rhetorical questions, not meant to be answered, but to illustrate that the evaluation of - Undervolt your GPU for better performance and longevity
May 16, 2026 · original
Undervolting is something I’ve been ignoring for a long time on my GPU. In recent times, with the GPU shortage and the need to hold on to our PC parts for longer, undervolting is becoming more important. It helps reduce heat, reduce power consumption, might make the components last longer, and in some cases can even improve performance. I will cover how I undervolted my GPU on both Windows and Linux, and the performance improvements I got from it. How undervolting works A GPU will usually run at a stock speed that it is designed for. During intense operations such as gaming or rendering, it will normally boost its clock speed to improve performance, and it does this by increasing the voltage drawn. That in turn increases heat and power consumption. However, the stock voltage is often higher than what is actually needed for the GPU to run at that speed. By undervolting, you reduce the vol - ON1 Photo RAW on Linux
Apr 4, 2026 · original
While Linux is the best environment for development purposes, Windows has been my go-to for gaming and photo processing needs. But given how much time I spend in Linux, I naturally wondered whether I could reduce the need to dual boot. Gaming has certainly improved considerably, thanks to the efforts of Proton and Wine, but photo processing has always felt out of reach. Recently though, the same effort that’s gone into gaming has made it possible to run ON1 on Linux, and it works quite well. In this post I will walk through the steps I took. Approach I have previously explored running Windows applications in Linux natively using containers , but that approach is limited to CPU-bound applications. There isn’t currently a way to run GPU-accelerated applications in that way, which is often required for photo processing. Linux native photo processing applications do exist , but I haven’t yet - How do terminal progress bars actually work?
Mar 1, 2026 · original
Terminal progress indicators are a common sight in command-line applications, often used to show progress of long running tasks and ensuring users don’t get bored. Implementing them in scripts these days is pretty straightforward thanks to various libraries, but I’ve been curious about how they actually work under the hood. The answer turned out to be very simple; the magic sauce is the character \r , the carriage return character. The carriage return is actually what’s called a control character, it moves the cursor back to the beginning of the line. That in turn allows the next output to overwrite the previous output on the same line. To put it another way, this act of overwriting the previous output is little more than a crude animation technique. Most modern terminal emulators and environments support this behaviour just fine, and that is how most progress indicators are implemented - We should probably start taking backups of Stack Overflow
Jan 18, 2026 · original
I have been seeing a number of articles and discussions regarding the decline of Stack Overflow posting activity over the past year. My immediate first thought was around the value that the question-answer dataset holds, and what would happen if it were to be shut down, or its vast repository of questions and answers rendered inaccessible; would it be prudent to start taking backups of the data, not just for archival purposes but for continued access to its highly valuable knowledgebase? It isn’t possible to predict what the actual outcome will be. Although posting activity is down, that isn’t the full story, and I haven’t any clue whether visitor traffic is down as well. However, given that it’s owned by a for-profit company , and metrics tend to be a key factor in decision making for rent-seeking entities, it isn’t out of the question that they could simply decide to shut it down if th - Run your development environments in isolation with Docker and CUDA
Dec 23, 2025 · original
When running machine learning workloads that require GPU access, it’s usually necessary to have the CUDA toolkit ready. Although installing CUDA directly on the host is possible, I prefer to keep the host system clean and isolated from major dependencies. This is especially useful when working with libraries such as PyTorch, TensorFlow, and others that can end up in weird states of conflict with each other, especially when some libraries expect specific versions of CUDA. The most straightforward way to achieve this isolation is to use Docker with GPU support in devcontainers. This allows for a reproducible environment that can easily be shared and version controlled. Installing the NVIDIA Container Toolkit Docker is pretty simple to install, I usually use the convenience script from their site. Now by default, Docker doesn’t have GPU access. The way to enable this is to install the NVIDI - How to connect to internal AWS resources from GitHub Actions
Dec 16, 2025 · original
The most common way to run GitHub Actions is to use the hosted runners provided by GitHub, but these runners don’t have direct access to internal AWS resources such as databases or API/HTTP services in private VPCs. The usual approach to solving this would be to use self-hosted runners deployed within the same VPC, but that comes with the overhead of running and maintaining your own runners. One approach I’ve used is to set up a proxy in the VPC that the Github Actions runner can connect to, which then forwards the requests to the internal resources. This is a better approach than self-hosted runners, since it still makes use of managed services, but works best for simple use cases. How it works To put that into a little more detail: the approach is to create an ECS Fargate task that runs in the same VPC as the internal resources, and then use AWS Session Manager to create a secure tunne - Running Windows apps natively in Linux with Docker
Dec 8, 2025 · original
Traditionally there have been two main ways to deal with having to run Windows applications when using a Linux environment as a daily driver. The first is to dual boot into Windows, and the other is to use an emulation layer such as Wine or Proton. Recently I have been exploring alternatives to these approaches — running Windows applications in a lightweight Docker container or virtual machine. This has the advantage of near native performance, and without compatibility issues that may arise through emulation layers. All this while staying within Linux but maintaining a clean separation. In this screenshot below I am running Affinity Studio natively on my Linux Desktop, while the application itself is running in a Windows 11 installation inside a Docker container. Affinity Photo on Linux Mint WinApps and Winboat are two projects that facilitate this approach. WinApps winapps-org/winapps - Talking to a local LLM in the Firefox sidebar
Sep 4, 2025 · original
Firefox has a chatbot sidebar that can be used to interact with the popular LLM chatbot providers, such as Claude, Gemini, and ChatGPT. It is possible to allow it to also talk to a local LLM, although it’s not a readily visible option. Firefox with local chatbot The steps, roughly, involved installing ollama, open-webui, and configuring Firefox. Ollama Ollama is a tool that helps simplify running LLMs locally, and it provides a CLI as well as an HTTP API interface. Installing ollama was simple enough, there’s a convenience script which also sets it up as a systemd service. The only change I made was to the /etc/systemd/system/ollama.service file, to make it listen on all interfaces. I added this line to the [Service] section: ... [ Service ] Environment = " OLLAMA_HOST=0.0.0.0 " ... Of course I also pulled a few models locally: ollama pull llama3.2:1b ollama pull qwen2.5:1.5b open-webui - Managing multiple SSH keys for multiple GitHub organisations in a simple way
Aug 19, 2025 · original
When working with multiple GitHub organisations, it is common to have to manage multiple SSH keys for git operations. The following solution is the one I have found to be the most convenient, with the least amount of overhead or behavioral changes, and as close to seamless as possible. Suppose you are in two orgs, org_1 and org_2 , and you have registered two SSH keys id_ed25519_org_1 and id_ed25519_org_2 for those orgs. First, create a configuration file for each org. For org_1 , create ~/.gitconfig_org_1 with an SSH command that uses the key for that org. Replace the path to the SSH key with yours. [ core ] sshCommand = " ssh -i /home/ubuntu/.ssh/id_ed25519_org_1 -F /dev/null " Similarly, for org_2 , create ~/.gitconfig_org_2 with the key path for that org. [ core ] sshCommand = " ssh -i /home/ubuntu/.ssh/id_ed25519_org_2 -F /dev/null " Now, edit your main ~/.gitconfig file to include - Developing personal Python apps for Android's Linux environment
Aug 10, 2025 · original
Since the Linux Terminal app was introduced for Android, I’ve been curious about the possibilities it could open up for personal app development. Considering that a smartphone is a portable computer, it makes sense that a user ought to have the ability to run their own apps on their own devices. The notion of running bespoke scripts or utilities for personal workflows feels logical and privacy friendly (and is long overdue). Exploring and installing tools The Android Linux Terminal app is technically a webview which connects to a local Debian Bookworm VM, and works well. All the usual suspects worked straight away. It is a tradition that the first thing to do is run neofetch : Neofetch, as is tradition The Gemini CLI installed, and the authentication step was straightforward. Of course I have also configured it to be a simple adhoc helper , so I can just type ? "How do I..." and get an a - Using Gemini CLI as an adhoc commandline question answerer
Jun 30, 2025 · original
Google’s Gemini CLI is command line, context aware assistant: it looks at your current directory, tools, and tries to make helpful suggestions. Here I go over how I was able to somewhat trim it down to a simple adhoc helper. I just type ? "How do I..." and get an answer. What gemini does By default, gemini runs in an interactive mode. It starts up a text interface with a little text-input-box, where you can ask questions, it provides answers, and you carry on the chat there.  What I want I’m not so interested in this mode, I would prefer that this tool answer my question and get out of my way. And I’m really keen on using ? as the invoker because it’s so short and easy to type. $ ? "How do I list all files in a directory?" You can use the `ls` command to list files in a directory! Gemini CLI’s n - edit is a terminal text editor that doesn't make me think
Jun 2, 2025 · original
My terminal-based text editing almost always occurs in short sessions. I’ll usually want to modify something and get out. To me, it makes no sense to have to step on a learning curve for a text editor. A good tool gets out of your way, which is why I don’t tend to favour vim , and only tolerate nano . Recently, edit was open-sourced, and by chance I spotted that it had a Linux build , so I decided to try it out. It comes in a zstd file, which was new to me, but installing it wasn’t too difficult: wget https://github.com/microsoft/edit/releases/download/v1.1.0/edit-1.1.0-x86_64-linux-gnu.tar.zst tar --zstd -xvf edit-1.1.0-x86_64-linux-gnu.tar.zst cp edit ~/.local/bin/ exec bash After that, just edit a file: edit myfile.txt Writing this blog post Within just a few minutes, I had a pretty good grasp of it, mostly because there wasn’t anything to ‘learn’. It’s like the original gedit or note - There is a dearth of automatic infinite scroll mice
May 22, 2025 · original
My favourite feature of any mouse that I’ve ever used is the automatic infinite scroll wheel mode. This is a mode where the scroll wheel, in its normal clicky mode, is flicked with enough force, and then continues to spin freely for a while, eventually slowing down and returning to normal mode. It’s a productivity enhancer that lets me rapidly scroll through long documents. It’s a gaming enhancer that lets me rapidly zoom cameras or fly through weapons. It’s a mental health enhancer that gives me a fidget spinner to play with. This YouTube video shows the feature in action: The clip is worth watching, as the feature is frequently misunderstood and mischaracterized as the common ‘infinite scroll’ mode that many mice have. That plebian mode requires the barbarian mouse user to press a button to engage it, which puts the scroll wheel into free spin mode; aforementioned regressed caveman the - My brief attempt at learning about Software Defined Radio on Ubuntu
Apr 13, 2025 · original
When my previous office building shut down, I ‘inherited’ a Pi-aware which had been set up many years ago. I was vaguely aware that it made use of something called RTL-SDR, but I didn’t actually understand what that meant. I thought it was just for tracking aircraft, but it turns out the receiver is a general purpose radio receiver and can be used for other things. The SDR simply stands for Software Defined Radio, of which there are many implementations. The RTL in RTL-SDR (a specific implementation) and is probably related to the Realtek chipset that is used in the dongle. I found this excellent tutorial , but I wanted to try out its equivalents on Ubuntu. Getting started - installing the drivers This is the specific model I have: it’s a Nooelec NESDR Mini SDR & DVB-T USB Stick (RTL2832 + R820T) with Antenna . The antenna was easy to understand, the dongle, I believe its purpose is to c - A CI/CD friendly Dockerfile for `uv` based Python projects
Mar 14, 2025 · original
I have been looking at using uv for a Python project, and I’m quite satisfied with the productivity and performance it brings to the table for a local development environment. Currently, I find its documentation and examples could do with improvement in terms of CI/CD and Docker deployments; most examples and blog posts seem to focus on the final mile of running the application in a container, but I am not able to find much that covers the end to end of building, testing, and running the application. I have created a Dockerfile that would be suitable for running the application in a CI/CD pipeline, and also for running the tests. This Dockerfile assumes a Python project that makes use of uv for dependency management and running of tools. # This is the test runner image. It is used to run tests and linters. FROM ghcr.io/astral-sh/uv:python3.13-bookworm-slim AS testrunner ENV UV_COMPILE_BY - It's OK to hardcode feature flags
Jan 30, 2025 · original
Feature flags (or toggles) are often used to control the visibility of new features in a product. There are a few different ways to implement them, but the most talked and marketed about is to use feature flag management software. The simplest way of course is to hardcode them, though it’s the least written about. While feature flag management software can be powerful, they are also a source of complexity and risk. The blogspam marketing behind them is so strong, that admitting they’re unnecessary feels like confessing to technological impotence. We’ve convinced ourselves that we don’t just need a few feature flags, we need to scale to thousands of feature flags. And not just that, but we will absolutely need to change a feature at runtime, and we absolutely must do it without a deployment, and without a restart, and without a cache flush, and without a database migration, and without a
Discovered by the rss-feed-index crawler, which checks each feed at most once a month.
Same record as JSON: https://api.agentalog.com/api/feeds/fd_code_mendhak_com_058f71b123792fdd. More from this site: code.mendhak.com in the Feeds tab.