Archive

Archive for the ‘doepner.net’ Category

Simplest Dependency Injection

January 17, 2017 Leave a comment

diy

Note to self: If you create a Java application and think you need DI but not AOP, then do not automatically reach for containers like Spring, CDI, Guice. Just do all construction and wiring in the standard main method.

Example: https://github.com/odoepner/bagh-chal/blob/master/src/main/java/net/doepner/baghchal/Main.java

Convert mpc to mp3 on Linux

January 1, 2017 Leave a comment

You need the lame and mpcdec commands. On Debian, mpcdec is in the musepack-tools package:

sudo apt-get install lame musepack-tools

Then to convert all mpc files in the current directory to matchingly named mp3 files:

for x in *.mpc; do mpcdec "${x}" - | lame -r - "${x%.mpc}.mp3"; done
Categories: bash, coding, debian, linux, music

Slightly better looking oliver.doepner.net ?

October 24, 2016 Leave a comment

My resume website http://oliver.doepner.net/ now has a new scaling background image and uses the Open Sans web font. I hope it looks nice. Any feedback is welcome.

Categories: coding, css, doepner.net Tags: ,

My favorite Free/Open Source Intellij Community plugins

July 28, 2016 Leave a comment

Spotify on Debian GNU/Linux in Canada

March 29, 2016 Leave a comment

Today I decided to try out the free ad-sponsored Spotify music streaming service. It has been available in Canada since September 2014.

After signing up you can immediately use the flash-based web player at play.spotify.com.

Installing the client app

Alternatively you can download and install the Spotify client app. I cannot say yet what the advantages or disadvantages are, maybe reading this article can be helpful.

Anyway, if you want to try the client app, for Debian (or Ubuntu) users it works like this:

  1. Add the repo key (to verify downloaded packages)
  2. Add the spotify repo to apt sources
  3. Update apt caches
  4. Install the spotify client

Here are the shell commands (requires sudo):

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys BBEBDCB318AD50EC6865090613B00F1FD2C19886
echo deb http://repository.spotify.com stable non-free | sudo tee /etc/apt/sources.list.d/spotify.list
sudo apt-get update
sudo apt-get install spotify-client

After successful installation you will find a “Spotify” entry in the “Multimedia” section of your start menu.

Using your Facebook login

If you use your Facebook account to sign into Spotify you will probably see this question:

Spotify would like to post to Facebook for you.
Who do you want to share these posts with?

It is safe to choose “Not Now” which prevents Spotify from posting to your timeline. The login will still work.

If your are using the downloaded stand-alone client app and the Facebook login fails with an error page, then simply enter the email address and password from your Facebook account into the login fields of the Spotify client app.

Spotify says that it only uses these credentials to pass through to the Facebook authentication and won’t store your password anywhere. I hope that’s true.

Categories: bash, debian, linux, music Tags:

Klassikradio MP3 streams

February 17, 2016 Leave a comment

Klassikradio is a German radio station with an easy-to-digest selection of classical music, movie themes and other relaxing sounds, with not too many commercials.

They have many channels, all available as mp3 streams. The full list and links to the streams can be found at http://stream.klassikradio.de/

On my computers, I have saved the m3u files for all the 192kb streams. I retrieved them using one convenient wget command and then moved them to my media/radio folder.

These are the shell commands (works on Linux, Unixes, Cygwin and probably MacOS):

cd
mkdir -p media/radio
wget http://stream.klassikradio.de/ -r -l1 -A '*.m3u' \
--accept-regex '.*\/mp3-192\/stream\.klassikradio\.de\/play\.m3u'
cd stream.klassikradio.de
for channel in *; do
mv "${channel}/mp3-192/stream.klassikradio.de/play.m3u" \
"${HOME}/media/radio/klassikradio-${channel}.m3u";
done
cd ; rm -rf stream.klassikradio.de

M3U files are the easiest way to “bookmark” media streams to be played by an audio player of your choice, outside the web browser.

I use the VLC player with the “Allow only one instance” setting and configure it as the default application for *.m3u files.

Categories: bash, music

Windows Alt Codes for German

September 1, 2015 Leave a comment

Hold Alt while typing Alt codes on your numeric keypad :

Umlaute

Ä : 0196
Ö : 0214
Ü : 0220

ä : 0228
ö : 0246
ü : 0252

Scharfes s

ß : 0223

Categories: doepner.net, windows Tags: , ,