Archive
Erasing ~2 decades of Twitter
A while back (about 15 months ago), I stopped using Twitter. At first, I thought I might delete my account, but then I realized that somewhere along the lines, Twitter has begun to enforce a “you have to have an account to watch this content” rule.
Bash Function to Remove Github Ghost Notifications
Every now and then my inbox in Github shows x total unread updates without having actual updates. When I click on it, there are no unread notifications. This is a known issue and it’s been around for a while. The notifications are called “ghost notifications” and they are not visible in the UI.
Git stashes for ADHDers
If you are like me you probably typed more than once git stash and meant git stash list while working on many different things at the same time. If not, then feel free to go somewhere else and don’t waste your time here :]
Refactoring Gohugo Aliases
GoHugo’s documentation recently started to show functions and methods with their “real” name, instead of the alias used in the GoHugo codebase. Did you for instance knew that apply is actually collections.Apply and append is collections.Append? Knowing these exact names seems to be important to me, because I think it’s easier to understand what functions are connected and what features are available.
Url shortening service using a static website on Netlify
This is a quick and practical proof of concept of a “free” link redirection service, hosted on Netlify. I am using one of my domains to redirect to various URLs, to my own projects. The setup is simple and can be done in a matter of minutes.
Kurzschnitte II - Third Linkdump
Two is a company, three’s a crowd. … But three is also a magic number. So here’s the third installment of my linkdump series, Kurzschnitte II. I’m sharing a collection of articles and tutorials that caught my attention in the past few weeks.
Showing the Current Breakpoint for Bootstrap
The problem: I am refining the display of certain sections of my website and I need to know what exact break point is userd currently by Bootstrap. I am using the latest Bootstrap version. The solution: I created a shortcode or partial that I can use in my templates to display the current breakpoint.
Music to Program to, Part 8
“Flow State” by Above & Beyond is in my opinion an ideal soundtrack for enhancing concentration and workflow. The album’s 49 minutes of ambient compositions and neo-classical soundscapes create a serene and non-intrusive background, conducive to entering a state of deep focus, often referred to as the “flow state” in programming and other cognitive-intensive tasks.
Pantone's color of the year Peach Fuzz in CSS
During difficult times, Pantone has chosen Peach Fuzz as its color of the year 2024. Peach Fuzz promotes community, togetherness, and self-awareness. It conveys a message of compassion and empathy, reflecting our desire for simpler times with a contemporary touch.
The Year Twitter Died
There is this really well-written collection of articles on 2023, the year Twitter died on The Verge.
Back to the Top without Javascript
In my lifelong quest to minimize the code required to display my view of the world (aka this website) I today realised, that I can get rid of all the Javascript to display my “Back to top” button. Just look at this commit.
Kurzschnitte II - Sophomore Edition
Welcome to Kurzschnitte II, a collection of links I came across in recent weeks. These links were noteworthy to me, but I don’t want to write a full blog post about them. Instead, I’ve gathered them here for you to enjoy.
Run Hugo server when VSCode opens a workspace
I recently realised that every time I opened a certain project, I was running the same sequence of actions and commands to start the Hugo server. This involved opening a terminal, navigating to the project folder, and executing npm run server.
Well, well, well, not so fast...
As I reported a while ago, I embarked on an exhilarating journey with the #100DaysToOffload challenge, a quest to enrich my blog with 100 posts within a year. However, I realized that while I have had 80+ posts since then, I still have yet to write that many posts within a year, which is the original postulation of the challenge - quite a misrepresentation.
Patrick vs. the Bad Super Block
On my desk, I have a 20TB external hard drive, which is encrypted using LUKS. This is the default on Ubuntu when you choose to encrypt your hard drive during installation or when you format a drive using the Disks utility and choose encryption.
Diogenes vs. Plato
According to Diogenes Laërtius, when Plato gave the tongue-in-cheek definition of man as “featherless bipeds”, Diogenes plucked a chicken and brought it into Plato’s Academy, saying, “Behold! I’ve brought you a man”, and so the academy added “with broad flat nails” to the definition.
How to run NPM scripts without issues when they don't exist
A while back I started consolidating all my release scripts and ran into an issue, that on the second look is quite obvious to solve, but I still wanted to share it with you. You might run into situations, where you have scripts that are only relevant for certain builds or environments.
How to make browsers download a linked file
The download attribute for anchor (<a>) tags is a nifty feature that often flies under the radar but can significantly enhance the user experience on a website. This attribute, when added to an <a> tag, instructs the browser to download the resource linked by the anchor tag instead of navigating to it.
Prevent js.Build from removing un-used Javascript functionality
Today, I reworked my theme changer script from vanilla JavaScript to an Alpine.js-based component. This change cut down the code lines by 50%. However, initially, it didn’t work. The console error messages indicated that my theme switcher function was unrecognized. Intrigued, I decided to investigate.
How to create custom file type handlers for individual folders in VSCode projects
Visual Studio Code (VSCode) is a powerful code editor, but occasionally, it may provide different functionality than you need out of the box. Just have a look at the open feature requests on Github, and you’ll see that many users have encountered situations where VSCode doesn’t deliver as expected.
Howto get the next semver version number in a bash script
In my projects, I often encounter situations where I need to update the version number of the project before making a release. I follow the Semantic Versioning (Semver) standard for versioning. In this blog post, I’ll demonstrate how to retrieve the next Semver version number using a Bash script.
Reusable Gohugo Forms via Configuration
A while back (pre-COVID-19 era), I had the idea to create a GoHugo module that would allow me to create forms via configuration files. I also wanted to easily translate the form into different languages. I sketched out a solution but never got around to implementing it.
Git's missing status Hook
Despite its many advantages and nifty features of Git, there’s one feature it lacks: a status hook. In Git, hooks are scripts that I can execute automatically at specific points during the version control process. These hooks perform custom actions, such as running tests, enforcing coding standards, or sending notifications, at various stages like pre-commit, post-commit, and post-merge.
Update Npm Packages in All Available Nvm Environments
If you are like me, then you are probably using nvm to manage your node environments. I have a few projects that are using different node versions, and I have to switch between them from time to time. Sometimes then I forget having switched and type some globally installed npm command and end up, not having it installed in the current environment or not updated to the latest version.
Why is the sky blue?
Did you ever ask yourself why the sky is blue? Here is what you need to know: The color of the sky is a result of a phenomenon called Rayleigh scattering. Sunlight is composed of different colors of light, each with its own wavelength - just think of Pink Floyds album cover for The Dark Side of the Moon or the Rainbow flag.