Archive
HowTo fix Google Chrome not starting after renaming the host in Ubuntu 24.04
My recent days were marked by the biennial (as in every two years) prematurely (I’ll explain that in a later post) installation of a new Ubuntu LTS (long term support) version. In 2022 I stopped “playing” around and jumping distributions and upgrading every 6 months to the latest release and saved plenty of time researching why things that worked fine before now stopped working.
Git `push.default` setup
Pushing a new branch to a repository’s remote often requires two attempts by the scatterbrained developer, but there is help in push.autoSetupRemote
.
Automatically load workspace when starting VSCode
Workspaces are a great feature in VSCode. But they have their issues. For instance starting VSCode in a folder will not automatically load the workspace file. This can be annoying if you have a workspace file in the folder and you want to open it directly.
How to delete all files ignored by Git
The .gitignore file in a Git repository serves as a configuration file that specifies files and directories that Git should — as the name implies — ignore. When Git encounters a file or directory listed in .gitignore, it automatically excludes them from being tracked, preventing them from showing up in commands like git status and git add.
Highlighting blockquotes in GitHub Markdown format
GitHub recently introduced an innovative feature for Markdown documents that allows users to highlight “Note”, “Warning”, and other notification blocks more effectively. An enhancement useful for developers who want to draw attention to important information in their documentation or discussions.
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 ideal for enhancing concentration and workflow. The album’s 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.