A 2D puzzle game in Go using Fyne

Last month I wrote Minesweeper written in Go using Fyne. It was a port of the Ebiten game engine implementation to desktop using the Fyne GUI library. During the implementation I ran into 3 problems that I eventually solved. In this post I’ll explain what they were and how I solved them. Source code: https://github.com/mevdschee/fyne-mines 1: MinSize of container without layout Fyne can use a (JWT-like) borderlayout, but you can also freely place your controls (or “widgets” as Fyne calls them) using a container without a layout. To set the size of this container you can put this container in a a stack container together with an image of a certain (minimum) size. ...

April 22, 2024 · Maurits van der Schee

Free Dutch postcodes CSV dataset

Web shops in the Netherlands need accurate address validation and completion. Kadaster is a Dutch government body that can provide the data that we need. Unfortunately they only provide the data in an almost unusable format (about 96GB of XML data), while we need a CSV file with only a small subset of that data for our needs. In this blog post I’ll explain how to reduce the vast dataset into a small file of either 40MB (megabyte) including locations in RD coordinates or 17MB without. ...

April 18, 2024 · Maurits van der Schee

Creating 103mail.com - Update 1

I am building a free email service that respects privacy and prevents profiling on 103mail.com (see: the plan). In this post I explain how outgoing mail can be captured to be handled by a web hook, while internal email is delivered normally. The post assumes you are running Postfix as mail server and assumes you run this on a recent Debian (based) Linux server. Make Postfix deliver to a web hook Install postfix using ...

April 12, 2024 · Maurits van der Schee

Creating 103mail.com - The plan

I am building a free email service that respects privacy and prevents profiling on 103mail.com. The simple premise is that even if you don’t use Gmail then Google still has half of the world’s email messages and since email messages tend to contain all previous content, they can still profile all people in the world (even people that try to avoid Google). When using 103mail.com the email (content) will never leave the server. The outgoing email will be replaced with a notification with a link to the web mail viewer. Thus the outgoing mail content can only be viewed over the web and people or servers reading the mail will be logged. Nevertheless 103mail.com will be a standard compliant IMAP/SMTP server that can be used with any mail client on desktop or mobile. ...

April 11, 2024 · Maurits van der Schee

Minesweeper written in Go using Fyne

It was already 3 years ago that I wrote Minesweeper for Ebiten in Go. I wanted to try to bring the application to desktop. I have ported that implementation from using the Ebiten game engine to desktop using the Fyne GUI library and I have just released version 1.0.0 that can be run on Windows and Linux. Download You can download the Windows and Linux releases from Github: https://github.com/mevdschee/fyne-mines It is a portable (single-file) executable without any dependencies. ...

April 5, 2024 · Maurits van der Schee

Using Brotli to deliver smaller WASM files

I ran into the free online solitaire card games by Oddstream Games and I loved the (open source) implementation of solitaire card games in Go and Ebitengine. I noticed that the 12.4MB WASM file had been compressed with GZIP which resulted in only 4.8MB of transfer. I compared the support for Gzip with the support for Brotli and also compared the resulting file sizes. The Brotli compression is not only better supported, but it also compressed the same 12.4MB file to 3.5MB instead of 4.8MB. In this blog post I’ll explain how to serve Brotli compressed WASM files using Apache. Note that I am using pre-compressed files (not on-the-fly compressed) as Brotli compression can be heavy. ...

April 4, 2024 · Maurits van der Schee

The P in CAP is for Performance

I was reading the (well written) article “The CAP Theorem. The Bad, the Bad, & the Ugly” by Dominik Tornow (recommended read). On “partition tolerance” (the P in CAP) he writes: “network partitions are inevitable in a realistic system model” and that tolerating partitions is a “non-negotiable requirement”. His opinion is a common one, shared by Eric Brewer (author of the CAP Theorem), who also wrote in “CAP Twelve Years Later” that his framework was misleading and that “designers cannot forfeit P”. I disagree as the same could be said about Consistency or Availability: people won’t lightly give those up on those either. ...

March 7, 2024 · Maurits van der Schee

Install KVM from the CLI on Debian 12

In a previous post I have showed how to install Debian 12 with disk encryption. In this post I will show how to install KVM on it, so that you can start using it as a GNU/Linux hypervisor to run virtual (Windows 10) machines. In this post I will also show how to load a graphical tool to connect to your KVM enabled server. Install KVM KVM requires CPU virtualization support (VT-x/AMD-V) to be enabled in the BIOS. You can check if your CPU is supported by installing cpu-checker and running the kvm-ok command. ...

December 24, 2023 · Maurits van der Schee

LUKS encrypted Debian 12 server (Hetzner)

In this tutorial I’ll walk you through the steps of setting up Debian 12 with LUKS full disk encryption on a server you bought from the Hetzner auction. I’m using the recommended method using the “installimage” script (that Hetzner provides) to make things really easy for myself. Enter the rescue mode Login to the Robot robot.hetzner.com and go to the “Server” page. Click on “Server” > “Key Management” > “New Key”, add your public key and click “Add Key”. Click on “Server” and click your server and choose the “Rescue” tab. Select your “Public key” and click “Activate Rescue System”. Now click on the “Reset” tab and choose “Execute an automatic hardware reset” and click “Send”. Wait for 60 seconds (duration depends on the hardware) for the server to reboot. Use an SSH client to connect with username “root” to the IP address of your server. Installation instructions Add your public keys to the rescue image by using an editor and pasting the public keys: ...

October 23, 2023 · Maurits van der Schee

ASRock N100DC-ITX

The fairly new N100 processor was mainly available in mini PC’s and firewall devices, but now we have ASRock that offers it as “N100DC-ITX” on an ITX sized motherboard. I’m using it to rebuild a PC in my living room that I designed to be powerful and silent and always on. My previous build was an ASRock J5040-ITX motherboard in an Inter-Tech ITX-601 HTPC case with 32 GB of RAM a 1 TB SSD. It used 8 watt at idle and I wrote a post about it. No reason for real complaints as I’ve used the machine daily, but certain websites (and sometimes VSCode) started to feel a bit slow. I wanted a little better performance and the N100 should be able to deliver and hopefully it will not consume much more power. ...

September 16, 2023 · Maurits van der Schee