Posts
Unable to find the selected font "NovaMono for Powerline".
On one of my computers I use Windows Terminal with Git Bash and PowerShell as my default terminals. For these terminals I have customized the appearance in Windows Terminal, which is a pretty nice feature. For both terminals, I had configured the NovaMono for Powerline font, which I had previously installed to Windows.
On a certain day I suddenly started getting these messages while either one of the terminals was initializing:
Posts
Throw error on missing environment variables in Next.js
Since this year I have been working on a new project for our client. A Next.js project for the first time in years. This morning I was having some problems as the Next.js website tried to fetch data from the API but receiving errors instead. A query variable in the URL was set to "undefined". After some poking around, I found out it was due to a missing environment variable in the project’s .
Posts
A first encounter with ChatGPT
The arrival of DALL-E 2, Stable Diffusion, and GPT-3 has opened up a new world for developers, data scientists, and other tech adepts. These powerful AI models are capable of generating images, text, and other data in a wide range of styles and formats, and they offer exciting new possibilities for a variety of applications.
One of the most exciting developments in this field is ChatGPT, an AI model that is trained to generate conversational text in a natural and engaging way.
Posts
How to use Notion as a CMS for a Hugo powered statically generated site
This website is created using Hugo, the static site generator. I use Markdown for the posts. These posts exist in a Github repository. Github Actions then makes sure the site gets generated and deployed every time I make a commit. However, for a new post I have to open my code editor and start writing in Markdown. This can be a hassle sometimes.
It would be great if there was a way to create new posts without having to open my code editor.
Posts
Use a fallback for Safari’s problematic mix-blend-mode implementation, in TailwindCSS
Recently I had been working on a website that uses mix-blend-mode: color. I just found out it didn’t work on Safari. Apparently color is not supported image/svg+xml . I had to find a way to maintain this mix blend mode for non-Safari browsers, in which it worked fine, but override it in Safari.
Then I found this overly verbose answer image/svg+xml on Stackoverflow.
Posts
npm WARN old lockfile The package-lock.json file was created with an old version of npm
Recently, I’ve experienced this warning multiple times since I’ve installed a new version of Node.js and npm. Apparently we can update the version of the lockfile package-lock.json. It’s apparently quite easy to do. Just run:
npm install --package-lock-only Credits to this mothertrucker image/svg+xml
Posts
Format code on save using ESLint and VS Code
I have always had problems when combining Prettier image/svg+xml and ESLint image/svg+xml the same project in VS Code. Prettier would not respect my ESLint rules or vice versa. Sometimes I could mitigate the problems by using the eslint-config-prettier package in my ESLint configuration.
But now, thanks to James Quick image/svg+xml I’ve found a way to get rid of Prettier while still having the format on save feature in VS Code.
Posts
Prevent a flex button to take up full width
Regular html & css <style> .container { display: flex; flex-direction: column; } .item { display: flex; flex-direction: row; align-items: center; align-self: center; } </style> <body> <div class="container"> <button class="item"> <span>Click me!</span> <i>Icon</i> </button> </div> </body> Or with TailwindCSS <body> <div class="flex flex-col"> <button class="flex flex-row items-center self-center"> <span>Click me!</span> <i>Icon</i> </button> </div> </body> See also https://stackoverflow.com/a/67819933/4496102 image/svg+xml
Posts
Debug PHPUnit in Docker using PHPStorm
Problem I have a Docker setup that consists of:
A container that runs PHP A container that runs a MySQL database I am using PHPStorm for development and I would like to debug my PHPUnit tests that run inside of Docker container #1. However, when I try to do this, I get an error:
PDOException : SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo for tms-api-mysql failed: Name or service not known /var/www/html/vendor/illuminate/database/Connectors/Connector.
Posts
Gitlab CI/CD job is not showing up
This happened to me today: A Gitlab CI/CD job in a valid stage without any dependencies or rules was not showing up in my Gitlab CI/CD pipeline. It looked like this:
# Incorrect, job does NOT show up in pipeline as it is seen as a job template .e2e: image: cypress/browsers:node12.14.1-chrome85-ff81 stage: .post artifacts: when: always paths: - cypress/videos/**/*.mp4 - cypress/screenshots/**/*.png expire_in: 3 day script: - npm ci - npm run test:e2e After some experimenting I found out that the name of the job was the culprit.