Techy blog of Kalle

I rant, I devlog, I guide. Don't expect anything serious, although sometimes there are golden nuggets.

#linux #guide #firefox #ostree #kinoite #silverblue

Fedora Kinoite and Silverblue come shipped with Firefox pre-installed, but without hardware acceleration libraries because of licensing issues with those dependencies.

To fix this, here's the short version:

# Uninstalls Firefox from base ostree image. Requires restart
sudo rpm-ostree override remove firefox firefox-langpacks

# Installs Firefox
flatpak install flathub org.mozilla.firefox

# Extensions for video codecs, hardware acceleration drivers, etc
flatpak install flathub org.freedesktop.Platform.ffmpeg-full org.freedesktop.Platform.VAAPI.Intel org.freedesktop.Platform.GL.default

More info on additional Flatpak runtime extensions: https://docs.flatpak.org/en/latest/available-runtimes.html

If this doesn't resolve your performance issues completely, there are more tips below in this post.

Read more...

#ansible #programming #guide

Did you know you can do more than just “OR”-ing groups and hosts with the Ansible --limit flag?

# Target hosts that are both in group_a AND in group_b
ansible --limit "group_a,&group_b"

# Target hosts that are in group_a, but NOT in group_b
ansible --limit "group_a,!group_b"

But there's more, like regex patterns and reading hosts from a separate file!

Read more...

#kubernetes #docker #programming #guide

Use case: You have a FROM scratch or otherwise really locked down Docker image running in Kubernetes. How do you debug it?

Like this:

kubectl debug my-mongodb-pod -it --image nixery.dev/mongosh -- mongosh

It's like, how did I not find this earlier!?

Read more...

#docker #podman #programming #guide

Those poor servers hosting APT packages. APT is superbly optimized with clever caching, but that goes away when you're doing Docker builds. And my poor slow internet access!

Yea we got Docker layer caching, but that doesn't really account for when you have to make small changes all of the time to the APT packages when developing locally. And does your CI/CD pipeline have distributed Docker layer caching? No? Thought so.

Personally I've found a 60-80% build speedup for apt update && apt install tasks thanks to just setting the http_proxy environment variable. Here's how!

Read more...

#guide #go #golang #cobra #cli

Cobra allows you to define custom value types to be used as flags through the pflag.(*FlagSet).Var() method (from the https://github.com/spf13/pflag package, that is used by Cobra). You have to make a new type that implements the pflag.Value interface:

Read more...

#life

Yours truly, formerly known as Kalle Jillheden, shall now be referred to as Kalle Fagerberg.

No, I've not gotten married, so hold back your applause. I still accept champagne though, but not because of the name change.

Read more...

#guide #quay #quayio #docker

Quay supports custom notifications based on different criteria. With the webhook notifications, you can tailor the notifications to integrate with almost any service.

Here I'll show you how to set up Quay –> Microsoft Teams notifications, such as when vulnerabilities are detected.

Message in Microsoft Teams

Read more...

#rant #youtube

YouTube has some annoying features. Some of which I am thankful for because they annoy me so much that I leave the platform and go do something else as I don't want to waste too much time on there anyway. But is there some kinks with its software that you as an UX designer or software developer could take use of?

First off, let me just rant a little about what I dislike, in descending order of how much I hate them.

Read more...

#guide #unity #unity3d #upm #il2cpp

In Unity (the game engine) you can tell the compiler not to strip away certain parts of your code, or to “preserve” it to use the correct term. You do this either with a [Preserve] attribute, or with a link.xml file.

Up until recently, it was unknown how to include such a link.xml file inside your UPM packages, as it had not been documented. Big thanks to maksimbu over at the Unity forums who did the most RnD here.

You have two main options:

  1. Add a section to your README.md telling your users to create a link.xml file themselves in their Assets/ directory and add given content you specify.

  2. Embed your link.xml inside a precompiled assembly (DLL) inside your package.

We will be going through option 2.

Read more...

#guide #podman #docker #dockercompose #podmancompose #linux

This was done on a Xubuntu machine. Not in WSL. May or may not work in WSL. Please message me on @kalle@javisst.space if you get it to work on WSL.

I'm just documenting how I got it to work, with the various sources in each section in case something gets outdated.

Read more...