How to add itch.io games to the Steamdeck

I’m currently setting up some alternative game stores on my Steamdeck, specifically Emudeck for my retro collection, Heroic Launcher1 for GOG and Epic, and also itch.io. I stumbled across this Reddit post that recommended to use the itch.io Windows launcher instead of the native Linux one: Itch.io has an app, that even has linux version. But it has issues - it can only use one wine version, if you have it installed globally, it can’t even handle linux games well....

February 24, 2023 · 3 min

How to automatically sync screenshots from the Steamdeck to Google Photos

As a follow-up to my earlier post about how to sync screenshots to Google Drive here’s how to achieve the same but with a dedicated “Steamdeck” album on Google Photos instead. Once again we are using rclone for syncing. First I created a new target gphoto by running ~/bin/rclone config again and then following these steps. Quick summary: New remote gphoto Empty application ID and secret Full access No advanced config Use web browser to authenticate I then created a new album:...

February 19, 2023 · 1 min

How to add a switch for a port forward on Unifi to Home Assistant

This is admittedly something I did not learn today but rather learned and adapted a couple years ago from this post on the Home Assistant forum, but I just had to use it again today and so I figured I’d write it down with all the bells and whistles just in case I ever need this information again - or anyone else does. First of all, in your unifi controller you should create a new user that Home Assistant will act as to manage your port forward(s) for you....

February 17, 2023 · 3 min

How to automatically sync screenshots from the Steamdeck to Google Drive

I wanted to automatically sync the screenshots I take on my Steamdeck to some cloud, without having to manually do it for every single one in the Steamdeck’s own uploader. I came across this gist by pegasd that accomplishes this via rclone, a path monitoring systemd service and some reconfiguration in Steam. However, I had to adjust things slightly for everything to really work - I could imagine that some past Steam update changed things slightly vs when the gist was created:...

February 11, 2023 · Updated February 19, 2023 · 3 min

How to trim screenshots via the commandline

I just had to trim a bunch of screenshots that had some black borders around them. I didn’t want to do this manually or via a GUI, but ideally batch-able via the commandline. Thankfully, that’s one of the many things that ImageMagick can do for you. I put all my screenshot PNGs into a folder, and then in that folder ran this mogrify command: magick mogrify -trim -define trim:percent-background=0% -background black -path output/ *....

February 9, 2023 · 1 min

How to quickly generate a QR Code with transparent background

For an upcoming presentation I wanted to quickly generate a QR Code of my web site’s URL to include on the final slide. Since my slide theme has a green gradient background with white text, I wanted the QR Code to be white on a transparent background, as a PNG. Enter node-qrcode which runs easily via npx1: npx qrcode -o output.png -d FFFF -l 0000 -w 500 "https://foosel.net" -o output.png sets the output file -d FFFF sets the dark color (usually black) to white with 100% opacity -l 0000 sets the light color (usually white) to black with 0% opacity - fully transparent -w 500 sets the size to 500px For further options like error correction or QR code version, or how to use it as a library or in the browser, see node-qrcode’s repo linked above....

February 6, 2023 · 1 min

How to use jq to extract new posts from a JSON Feed

I’m currently looking into ways to automate some stuff around new posts on this page (be it blog or TIL post) directly during the page build on GitHub Actions. For this, I first need to be able to reliably detect new posts, from a bash run step. So here’s how to do that with jq. The idea is to get the current feed.json prior to publishing the page, and then compare it to the one that was just generated during the build....

February 2, 2023 · 2 min

How to grep a log for multiline errors

I just found myself in the position to have to grep an OctoPrint log file for error log entries with attached Python stack traces. I wanted to not only get the starting line where the exception log output starts, but the full stack trace up until the next regular log line. The format of the lines in octoprint.log is a simple %(asctime)s - %(name)s - %(levelname)s - %(message)s, so a log with an error and attached exception looks like this:...

February 1, 2023 · 5 min

How to run Playwright on GitHub Actions

Running Playwright on GitHub Actions is fairly straightforward at first glance, however it becomes a bit more tricky when you don’t want to download the whole browser binary zoo on every single CI build. Looking around a bit on how to go about caching these, I came across various approaches listed in this GitHub issue on the Playwright repo. Below is the result of reading through most of them and figuring out what works best for me and my use case (OctoPrint’s E2E tests, npm based test project)....

January 31, 2023 · 2 min

How to add JSON Feed support to Hugo

In order to add JSON Feed 1.1 support to Hugo you need to first add a new jsonfeed output format in config.yaml: mediaTypes: application/feed+json: suffixes: - json outputFormats: jsonfeed: mediaType: application/feed+json baseName: feed rel: alternate isPlainText: true This adds a new media type application/feed+json with the extension json and creates a new output format jsonfeed rendering into that media type with a base name of feed (so feed.json as recommended by the JSON Feed spec)....

January 29, 2023 · 3 min
Mastodon