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.


Kudos, Hackers

A quick shout-out to everyone who built the web at its best. Using amazing tools, discovering inspiring sites and communities, connecting with peersβ€”no social networkβ€”rocks.

Despite zero promotion, I occasionally get valuable feedback on this blog and my Shaarli. That means a lot, especially during tough times.

We build on the work of brilliant creatives who laid the groundwork. We save time thanks to countless articles, podcasts, tools and platforms crafted by talented people.

For every idea I have, someone smarter and more passionate probably already built something betterβ€”I know that. Yet I keep building, hoping someone will one day build on my work. Maybe I’ll pave the way for others. So, although support is relevant, I prioritize building useful tools and sharing them with everyone.

And to conclude...


Zombiemerge

I do love code reviews but I'm convinced they're best done live β€” reviewed, merged, communicated immediately.

A few weeks ago I did submit changes through merge requests, and a few weeks later I had completely forgot about their implementation.

I context switched a few times since then....

Today the change was merged by the repository maintainers then a few colleagues were discussing one of its consequences. Only because I was in the same workspace, I did react on time.

My mistake was likely to not have communicated more proactively about the change, likely as I'm not the repository maintainer nor the release maintainer so I had no idea when the change would be merged.

Anyway, there are several such merge requests being queued. All recipes for future headaches.


Mastodon