me

notes from mnlwldr

Thoughts about programming and other things I want to share

@mnlwldr on Twitter @mnlwldr on GitHub @mnlwldr on Mastodon mnlwldr@gmail.com defer.cc

Moved my somafm ‘player’ to bashrc

_somafm() { 
   mpv $1 2> /dev/null | awk '/title/ { s = ""; for (i = 2; i <= NF; i++) s = s $i " "; cmd="(date +'%H:%M:%S')"; cmd | getline d; print d,"|",s; close(cmd) }' 
}
alias groovesalad='_somafm "http://ice.somafm.com/groovesalad-128-aac"'
alias defcon='_somafm "http://ice.somafm.com/defcon-128-aac"'
alias deepspaceone='_somafm "http://ice.somafm.com/deepspaceone-128-aac"'

Don’t forget to support

Tags: #bash #somafm

Listen to somafm from the command line.

#!/bin/sh

DEFCON="http://ice1.somafm.com/defcon-128-aac"
GROOVE="http://ice1.somafm.com/groovesalad-128-aac"
DEEP_SPACE_ONE="http://ice1.somafm.com/deepspaceone-128-aac"
COVERS="http://ice1.somafm.com/covers-128-aac"

case $1 in
        "defcon") URL=$DEFCON ;;
        "groove") URL=$GROOVE ;;
        "space") URL=$DEEP_SPACE_ONE ;;
        "covers") URL=$COVERS ;;
esac

echo "Listen to $URL"
mpv $URL 2> /dev/null | awk '/title/ { s = ""; for (i = 2; i <= NF; i++) s = s $i " "; cmd="(date +'%H:%M:%S')"; cmd | getline d; print d,"|",s; close(cmd) }'

Don’t forget to support

Tags: #bash #somafm

I published a Go application today to export the last tweets from your twitter timeline to your local hugo repository by using the Twitter API. You can find a copy of my tweets here, mostly written in German.

twitter2hugo-export on GitHub.

Tags: #golang #twitter #indieweb

Bunny

Tags: #watercooler

Thought about the Hugo -> GitHub -> Netlify stack and I think Hugify is a good name.

Tags: #showerthoughts

Found this tweet yesterday from Ryan and I did not know that either

I am shocked to discover that this works in bash from at least version 4.4.x:

๐ŸŽƒ(){ ๐ŸŽƒ|๐ŸŽƒ& };๐ŸŽƒ

Link to the original tweet here

Tags: #bash

“As If Nothing Happenedโ€: I Used Artificial Intelligence To See How Some Celebrities Would Look Today If They Were Alive

Boredpanda

Tags: #watercooler

Had a day trip to Paris today for a bit sightseeing. It’s around 5 years ago that I was here.

Paris

Tags: #travel #france #paris


Today I learned that Twitter still uses the original retweet style format “RT @” in the background for native retweets too.

So I muted “RT @” for everyone in my Home timeline and it looks like that it works.

Tags: #twitter