RSSAmplifier

Blog

glorifiedgluer

Scattered thoughts, ideas and experiences.

gluer.orgRSS feed ↗15 posts

Latest posts

Cloning private Forgejo repositories in Actions without Node.js

Sometimes cloning a repository doesn't require a complex dependency tree . Plain git is enough! It's possible to leverate the forgejo context for the information needed to clone. The gotcha is that forgejo.server_url contains the protocol (ie. https:// ). You need to strip that before passing to Git: - name : Checkout run : | SERVER="${{ forgejo.server_url }}" git clone --depth=1 --branch "${{…

Rethinking Perplex Systems website

Since the inception of Perplex Systems© our website wandered the digital space in a solid but confused outfit. Rocking a black t-shirt with blue denim pants. Sometimes even risking a white t-shirt. It's a clean outfit, timeless and... souless. It might have dressed skinny ripped jeans and chunky shoes once, but not even the comically large foam of its shoe's sole held down the image to be…

Structuring Standard ML Projects

Two years have passed and I still love writing Standard ML code! I've learned one thing and another about structuring the code in order to share it with ease and produce better development experiences. After trying out quite a few build systems, I decided to settle on MLBasis and Makefiles. While MLBasis is not a build system itself, you can use it to define what parts of the code should be…

Wrapping postgres with ts-results in TypeScript

Yes, I love result types and I dearly (and daily) miss them so much in TypeScript. import postgres from "postgres" ; import { Result , Some , Option , Ok , Err , None } from "ts-results" ; const pg = postgres ({}); export async function sql < T extends readonly ( object | undefined )[] > ( sql : TemplateStringsArray , ...params : any [] ) : Promise < Result < Option < T > , unknown >> { try {…

Simple SQL schema migrations with Go

On the last post I talked about using SQLite's user_version pragma to keep track of your schema version without the need of a separate table. However, how can we do schema migrations and use it in practice? One of the most elegant schema migration approaches I have found was that of Miniflux . First you need all your migrations on a single list of transactions: const schemaVersion = len (…

SQLite's user_version pragma for schema versioning

While reading through SQLite's PRAGMA statements page I stumbled upon the user_version pragma. The description says this: The user-version is an integer that is available to applications to use however they want. SQLite makes no use of the user-version itself. I immediately thought about using it to store the database's current schema version and wasn't surprised to discover I'm not alone ! // get…

Exporting all eslint rules into a file

At $CURRENT_JOB we are migrating as many eslint rules to biome 1 . Fortunately, biome provides a helpful page that lists rules from other sources . One easy way to find which rules you are using is to have them all on a file that you can easily skim over. Using node: npx eslint --print-config <eslint-config> \ | xargs -0 node -e "for(key of…

Dark themes with modern CSS

Since the release of Windows 10 in 2016, dual color scheme modes have been more and more common on our daily basis. Introduced in 2020, the color-scheme property in CSS is probably one of the most waited features to be implemented on the major browsers. Perhaps the most popular way of defining a color scheme is to define custom properties based on the user's system preference. : root {…

MacOS ignores the default web browser

I'm sorry, but I couldn't take it anymore! Every FUCKING time I clicked a link outside my default web browser, this system would insist I use Safari. It simply ignored the fact that I set Firefox as the default browser a thousand times a week! I have finally found a FUCKING solution for this on a reddit thread . It says: what worked for me: switch back to safari; quit the settings; open again and…

Please, donate to projects you regularly use

It happened yesterday and it's bound to happen again today. I have backed up the Debian box that runs this blog. The next update is going to be powered by Nix and the source code versioning managed by Magit. And guess how much I paid for these amazing pieces of software? Nothing! A few seconds of reflection show just how much of the software my life depends on is built and distributed for free.…

GNU Emacs modifier keys on MacOS

A few months ago I have started on a new job, and along with the huge excitement came a brand new Mac Mini M4. It's a extremely beautiful and powerful machine, but... after more than a decade on Linux, everything beyond its terminal feels a bit alien. OK, I had to tweak a few knobs to have they keyboard working as before, however I was extremely surprised that Home Manager and GNU Emacs worked…

Windows clock won't synchronize

I can't remember the last time I daily drove a Windows machine. What I do remember is the time being set incorrectly after a fresh install, and never being able to use the automatic synchronization button. Fortunately, I'm not alone on this and a reddit user shared a script that not only synchronizes the clock but also sets a more reliable NTP server. @ echo off ( NET FILE ||( PowerShell…

Using @db/sqlite on Deno with Nix

I’ve been exploring some of the newer web frameworks in the JavaScript ecosystem. To measure how productive I am from the get-go with each one, I reproduce part of the features contained on this blog. However, I don't like setting up a PostgreSQL instance for small experiments 1 . SQLite is the tool for this job and Deno has a pretty good library called @db/sqlite that uses Deno's FFI. The trick…

Ride: Vulcan S first trip

This weekend, we were invited to attend Mass at the Basilica of Our Lady of Aparecida. Perfect timing, as I had been looking for an excuse to ride my newly purchased Kawasaki Vulcan S! This is an easy trip to take on two wheels, as most of the time you’ll be riding in a straight line on an excellent road. The gas stations are relatively close to each other, and you’ll encounter many bikers coming…

Debian and the TP-Link AC600 device

Unfortunately, I can't have an Ethernet cable on the place I work at. Because of that I bought a TP-Link AC600, but this device is not plug and play on Debian. This is how I made it run on Debian Bookworm: $ sudo apt update $ sudo apt install linux-headers- $( uname -r ) build-essentials bc dkms git libelf-dev rfkill $ git clone https://github.com/morrownr/8821au-20210708 $ cd 8821au-20210708 $…