redacted.sh: share your logs, not your secrets

Quick post. Sometimes it is necessary to share logs on public issue trackers, forums... and wanting to protect secrets, tokens, IPs is normal.

I've cooked my own minimal bash script for this quest, which I've just added to my public shared snippets : https://gitea.zoemp.be/sansguidon/snippets/raw/branch/main/redacted.sh

#!/usr/bin/env bash

default_rules=(
  's/[0-9]\{1,3\}\(\.[0-9]\{1,3\}\)\{3\}/<REDACTED_IP>/g'
  's/\b[a-zA-Z0-9._-]\+\.[a-zA-Z]\{2,\}\b/<REDACTED_DOMAIN>/g'
  's/\b[A-Za-z0-9+\/=]\{20,\}\b/<REDACTED_TOKEN>/g'
  's/\(password=\)\S\+/\1<REDACTED_PASS>/g'
)

rules=()
while [[ $1 =~ ^s/ ]]; do
  rules+=("$1")
  shift
done
[[ ${#rules[@]} -eq 0 ]] && rules=("${default_rules[@]}")

sed_expr=()
for r in "${rules[@]}"; do
  sed_expr+=( -e "$r" )
done

# If files are passed, process them to stdout.
# If none, read from stdin to stdout.
if [[ $# -gt 0 ]]; then
  sed "${sed_expr[@]}" "$@"
else
  sed "${sed_expr[@]}"
fi

Feel free to reuse, copy, extend, contact me to give feedback! πŸ’š

πŸ’Œ The best way to get in touch is via my email morgan at zoemp dot be. You can also follow me on the Fediverse / Mastodon at @sansguidon@mamot.fr. I speak (a lot) French, English and a bit of Dutch.


Scrobbling RTBF live radios to Last.fm and ListenBrainz with userscripts

Finding a way to scrobble live RTBF radios like Classic 21 and Classic 21 Metal to Last.fm and ListenBrainz was not as straightforward as it should have been.

I've stopped Spotify for a long time and I have switched to Navidrome and Jellyfin/Finamp on Android, which embark scrobblers for Last.fm and ListenBrainz, luckily for me.

However in the universe of music scrobblers, I had yet to find how to scrobble my favorite local radios, RTBF Classic21 and Classic21 Metal (https://www.rtbf.be/radio/liveradio/classic21_metal) πŸŽΈπŸ‡§πŸ‡ͺ.

They integrate a player compatible with an awesome web-scrobbler extension (https://github.com/web-scrobbler) whose purpose is to work for live radios web players. Sadly I couldn't make it work with those radios despite history is showing it is supposed to have worked years ago. There is an integration for RTBF live radios at https://github.com/web-scrobbler/web-scrobbler/pull/2377/files - it was supposed to work for Classic 21 as well, unfortunately the code seems obsolete now and I couldn't ship a working fix for this. So I paused a bit, and gave up, ... not long enough πŸ˜‚.

I had the idea of running Shazam in the background and send it findings to some backend for scrobbling my songs, and I thought it would be very epic and complicated. I did try anyway the Shazam web extension and noticed that it would mismatch the song and artist displayed on the radio website most of the time. This is concerning. Why is that? I do not know yet, so just in doubt I have contacted the website admin for RTBF about this.

Anyway, diving back into the code and opening Dev Tools in Brave, helped me discover an interesting URL: https://core-search.radioplayer.cloud/056/qp/v4/events/?rpId=29 which returns the songs being played for this radio, I mean the recent ones, the next one and the one currently playing!

Then I decided to try hacking my own solution for this problem. It wouldn't work with Navidrome nor with a chrome extension, I wanted a simple minimalist hack. I'm used to tweak websites UX with Tampermonkey and I'd to give a try. The result is https://gitea.zoemp.be/sansguidon/snippets/raw/branch/main/tampermonkey/rtbf_scrobbler.js.

I’ve adopted ListenBrainz as an alternative to Last.FM, but I still can’t fully let go of it. That’s why my userscript supports both, and it's hackable for those who want to extend it πŸ˜‰

I've tested it on:

And it should likely be compatible with most radios at:

My scrobbling profiles are https://www.last.fm/user/SansGUidon and https://listenbrainz.org/user/SansGuidon/.

Feel free to share, copy, reuse and provide feedback! I'll keep this post updated if RTBF radio answers my questions πŸ˜‰ or if I get interesting feedback. I've also mentioned this post in https://github.com/web-scrobbler/web-scrobbler/discussions/5327.

πŸ’Œ The best way to get in touch is via my email morgan at zoemp dot be. You can also follow me on the Fediverse / Mastodon at @sansguidon@mamot.fr. I speak (a lot) French, English and a bit of Dutch.


LLMs – Chat Interfaces vs. Raw APIs: Why I Choose Conversations

I recently read Max Woolf's post on LLM use, where he explains why he rarely uses generative LLMs directly, preferring raw APIs for control. It's an interesting take, but I fundamentally disagree. For me, chat interfaces aren't just convenientβ€”they’re an essential part of understanding.

LLMs are more than code generators. They are interactive partners. When I use ChatGPT, Mistral, or Copilot in chat mode, it's not just about fast results. It's about exploring ideas, challenging my thinking, and refining concepts. The back-and-forth, the debugging, the reflectionβ€”it’s like pair programming with a tireless assistant. If I need to test an idea or explore a concept, the chat interface is perfect for that: it's always available, from any device, no API or IDE needed.

Max argues APIs allow for more fine-tuningβ€”system prompts, temperature control, constraints. Sure. But in a chat session, you can iterate, switch topics, revisit past decisions, and even post-mortem the entire conversation, as a way to learn from it and log your decisions. And yes, I archive everything. I link these sessions to tickets in TickTick to revisit ideas. Try doing that with an API call.

The chat interface is a workspace, not a magic wand. It’s where you can think, break things, fix them, and learn. Isolating interactions to API calls removes that context, those learning moments. To me, that’s missing the point.

APIs are fine for deterministic output. But I prefer the chaos of conversationβ€”it forces me to engage deeper, explore failures, and actually think. That’s why I don’t just use LLMs to generate. I use them to reason. Not just for hard skills, but soft skills too.


Ghost – not fitting as WordPress replacement

I've a Cloudron instance where I experiment various tools. This time, it was Ghost, as a replacement to WordPress, especially as Ghost was acclaimed by some folks I follow.

The good parts

  • Simple and modern.
  • The migration of content from WordPress, works great!

The worst parts

  • I couldn't find a good theme for my taste.
  • Distinct UIs for browsing your blog and quickly editing your posts. Far more complicated than in WordPress. If I want separate tools for editing and browsing content, then I just go with static site generators πŸ™‚
  • The extreme minimalism and simplicity makes it less appealing for me, I like to customize the content and web administration UI, I feel out of control here. For instance I dislike the appearance of my content in Ghost.

Conclusion for now

  • Still looking for alternatives to WordPress. But likely thinking of scripting my own thing.

Things nerds commonly have, but I don’t

Inspiration: https://forkingmad.blog/things-people-commonly-have-but-i-dont/

In a conversation recently with a colleague I casually mentioned I didn't have something. He was shocked... "but how then do you..." was the response.

So here's my list of don't haves

  • Spotify account. I have CDs and I've bought a CD player from KLIM. I just find the CD to be a very nice looking and collectible object, pleasant to listen to. Also I feel it's mine, and I like the creative goodies and packaging that you don't have with a digital copy of an album.
  • A NAS. I don't need a NAS to backup pictures or stream videos through Plex. I have a VPS where I run a Cloudron which hosts most of my web apps, one is for sharing my family pictures. And I also use Syncthing, and Dropbox to keep my photos in sync and backed up in several places. And next to that I use Plex but I just don't host it on my infra, I pay a provider for their generous bandwidth and for the fact they take care of streaming my content through Plex. It's so fluid. I couldn't and wouldn't maintain this at home.
  • A gaming machine nor a gaming chair. Seriously I do not see the point, because I consider most games do not require super advanced graphics or material to be fun. In fact I love minimalistic games with pixellated art. I'm old and also feel nostalgic of specific games that are all forgotten now. Anyway I'm developing the best game ever, which is the only one I play. More about this soon, when I'll buy the domain for the website, after I decide on a name.
  • A mechanical keyboard. Seriously, what's the deal is with those noisy expensive impractical keyboards.
  • A 3D Printer. Seriously, this is so cool to possess one, I just don't have the space for this now. Maybe when I'll have my own space in our future home.
  • A VPN. Sure it sounds secure but it's just someone else glorified proxy, and it's vulnerable to authority requiring logs or to any part getting compromised. You have to blindly and naively trust the VPN and people behind it to not disclose your information when their company will be required to by the authority. If different contexts I use them, i.e at work, of course, wherever it's mandatory.


Mastodon