This site consists mostly of articles and posts about technology.
As always, this is a work in progress, while experimenting.
May contain some opinionated content as well.
Generated with Hugo.
This site consists mostly of articles and posts about technology.
As always, this is a work in progress, while experimenting.
May contain some opinionated content as well.
Generated with Hugo.
Generated by GPT-4 with prompt:
Can you create a coloring page of a cute, sitting unicorn with wings and large eyes, with a broom ready to fly, with a halloween theme?
GPT-4 description:
A black and white Halloween-themed coloring page featuring a cute, sitting unicorn with wings, large expressive eyes, and holding a broom, ready to fly. The unicorn should have a flowing mane and tail, and a spiraled horn. Its wings are detailed and feathered. The Halloween theme is reflected in the unicorn’s playful costume elements like a witch’s hat, and Halloween decorations like pumpkins and bats around it. The background should be simple, enhancing the whimsical, festive atmosphere, perfect for a children’s Halloween coloring book.
Kent
November 16, 2023
Visual Studio got updated to 17.8, and the shortcut Alt-O
to open corresponding file in Visual Assist was unassigned 1.
Open Visual Studio options, and reassign the VAssistX.OpenCorrespondingFile
command to Alt-O
.
Kent
November 16, 2023
I started playing Space Engineers again on a multiplayer server I host. Even though I played alone, occasionally I got disconnected every 5-20 minutes. There was no pattern to it, and there were really no good hits on DDG or Google.
The server runs in Docker on a Linux host, I even rebuilt the image from scratch, and it didn’t help. I even ran the server on my local machine, where I’m running the game.
The server logs said ValidateAuthTicketResponse(TicketCancelled)
, which is Steam’s way of authenticating and authorizing a player to play a game on a server. With TicketCancelled
, it means my credentials are not valid somehow, even though I just logged in.
I even signed out and logged in to see if that got me fresh “tickets”, but no.
Sometimes I play with remote play from a laptop, in this case a Mac with M2 processor. And any time used remote play on that, I never got disconnected!
After some experimentation, I found that any time the Mac was sleeping, with Steam open in the background, I would get disconnected by irregular intervals. After I quit Steam on the laptop, the problem went away. I never got TicketCancelled
again.
Kent
October 25, 2023
Sometimes it is desirable to use a formatted string when building messages and when throwing exceptions. Using fmt::format()
or std::format()
on a function call is not too ergonomical.
int foo = 42;
throw CustomException(fmt::format("Foo is {:d}", foo));
Compare it to:
int bar = 43;
throw CustomException("Foo is {:d}", bar);
The latter case is much more ergonomical and simpler to use. The gist of it is forward the string and arguments to a custom construction, which uses perfect forwarding to formatting,
class CustomException : public std::runtime_error {
public:
template <typename... Args>
explicit CustomException(fmt::format_string<Args...> s, Args &&...args)
: runtime_error(fmt::format(s, std::forward<Args>(args)...)) {}
};
// usage
void formatter() {
int foo = 42;
throw CustomException("Foo is {:d}", foo);
}
Kent
October 13, 2023
If you happen to be working with Docker and Docker Compose, with multiple services, and you get
E! Write error: Post \"http://host:1234/api/v2/write?bucket=http-logs\": dial tcp: lookup influxdb on 127.0.0.11:53: no such host, batch kept for retrying"}
, make sure both the client and server are on the same docker network.
version: "3.7"
services:
caddy:
networks:
- monitoring
influxdb:
networks:
- monitoring
networks:
monitoring:
Kent
September 28, 2023
Add custom command in CMake can be used to copy assets and runtime dependencies into the build folder for easier debugging.
The one thing to remember when you’re about to copy assets/dependencies into the build folder, is that it should be done at the BUILD stage, and not the CONFIGURE stage of CMake.
If you find your self doing generator expressions during the configure stage of CMake, you’re doing something wrong.
# Wrong
configure_file(
${CMAKE_SOURCE_DIR}/bin/runtime-lib.dll
${CMAKE_BINARY_DIR}/$<CONFIG>/
# error ^^^^^^^^^
COPYONLY)
This generator expression will not be executed, since this is evaluated during configure. Generator expressions are only evaluated during build.
Use add_custom_command
to copy over runtime dependencies to the build folder.
Given the following CMakeLists.txt
;
|
|
Build with:
cmake -S. -Bbuild
Kent
September 26, 2023
There is a service called “IST Skola” which our daycare is using.
It’s an app for taking attendence, delivery and pickups and it is possible for the staff to share images and text from the preceeding days / weeks.
A couple of years ago they used another service called Truegroups. With that service it was possible to download the images and reports. We also got emailed copies of the images and reports.
When they changed to IST, it was not possible to download images, copy the reports or get an copy on email. The only “simple” way of making a copy of the images was by taking screenshots…
Kent
September 1, 2023
I was about to clean up some docker-compose.yml files, when I found out it is possible to include other files.
But then I got (root) Additional property include is not allowed
.
$ docker-compose pull
(root) Additional property include is not allowed
Kent
August 18, 2023
At the time of writing, I’m on my third project where I’m tasked with modernizing a C++ legacy codebase. Nothing wrong with legacy, and there is nothing wrong with C and C++-98 and C++-03, but the language has evolved and there are new patterns and new algorithms for doing most things.
This is a multipart series where pieces will be published when they are ready.
Kent
August 4, 2023
Lately, I’ve been importing 20 years of photos into iCloud, both as 3-2-1 backup, and to be able to access old photos on my phone from wherever I am.
There were no problems with most photos and videos, but with some videos from 1 type of phone (HTC One X), the EXIF data was wrong by 66 years into the past. A video taken in 2012, had the year set to 1946. Due to the chronographic nature of iOS/MacOS Photos, they popped into the front before everything else.
Kent
July 26, 2023