Setting up a free C64 emulator for retro game fun

August 8, 2018 Leave a comment

I just installed the C64 emulator VICE on an old Windows laptop and set it up with shortcuts for some old time games that I used to play in the 80s.

My 6 year old son really likes Donald Duck’s Playground where you do odd jobs as Donald to earn cents and dollars to buy playground equipment for your nephews and let them play:

Setting up the game required the download of a zip archive containing a *.d64 image file that can be autostarted by VICE. I created a desktop shortcut to the x64.exe file in VICE with the path of the d64 file as command line parameter. That gives you a shortcut that will start VICE and autostart the game right away. Add the -fullscreen option to start the emulator in fullscreen mode.

I had to enable keyboard mapping for Joystick 2 as shown on the WinVice c64-Wiki.

VICE is a cool emulator that runs on Unix, MS-DOS, Win32, OS/2, BeOS, QNX 4.x, QNX 6.x, Amiga, Syllable or Mac OS.

Games I might try next include Spy vs Spy, Aztec Tomb, Q-Bert and I few others. :)

Advertisements

Klassikradio MP3 streams

April 4, 2018 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. They can be found and played in your browser at http://www.klassikradio.de/webplayer

To play the audio streams outside of a web browser, I retrieved and saved the stream urls as m3u files, using the shell script below. It used to work until Klassikradio changed its website:

#! /bin/bash

index_url='http://www.klassikradio.de/webplayer'
audio_url='http://stream.klassikradio.de/[^/]*'

for x in $(wget -q -O - "${index_url}" | grep -o "${audio_url}"); do 
  echo "${x}" > "klassikradio-$(basename "${x}").m3u";
done

The resulting m3u files are still available from here.

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

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 Tags: , ,

“Parental control” against my internet overuse

April 2, 2018 2 comments

I am the parent and I just configured our router to block the internet for me at all the blue times.

Most of the white (unblocked) time during the week days coincides with my day job, which is unavoidable (paid) screen-stare time, since I earn a living as a computer programmer.

Life is too short to spend >50% of my waking hours staring at a screen. I am excited to spend more time with my kids, my wife, outside, in nature, reading books, etc.

Categories: coding Tags: , , ,

Delete “imported contacts” from LinkedIn

January 8, 2018 Leave a comment

If you ever “imported contacts”, perhaps from your GMail address book, then LinkedIn will offer you those repeatedly as new connections to “invite” to your network.

If you want to stop that, go to https://www.linkedin.com/mynetwork/contacts/imported/ then select all and Delete them. Note that this will not delete anyone from your LinkedIn connections, just the pointless email contacts.

If everything went well, the above URL should now display something like “You don’t have any imported contacts”. Congratulations!

Categories: coding

Enter Unicode characters in Linux

January 4, 2018 Leave a comment

To enter symbols and letters that are not on your keyboard, GTK applications on Linux offer something like Windows ALT codes, but for all Unicode characters, including the latest emojis.

Hold down CTRL-SHIFT-u and you will see an underlined u character that is waiting for input. Type the hexadecimal Unicode value and press space.

http://unicode.org/charts/ is a full collection of charts that list all Unicode characters with their codes.

Here is a cheat sheet for German:

Letter Hex code
Ä c4
ä e4
Ö d6
ö f6
Ü dc
ü fc
ß df
20ac

And here some emojis from the official Unicode chart:

Emoji Hex code Name
🙃 1f643 Upside-down face
💣 1f4a3 Bomb
🤡 1f921 Clown face

enter symbols and letters that are not on your keyboard

Categories: coding

Replace TODO in index files with Capitalized folder name

September 2, 2017 Leave a comment
file_name=index.html
pattern=TODO

for file_path in $(find -type f -name $file_name); do 
  dir=$(basename $(dirname $file_path))
  word=${dir^}
  sed -i -e "s/$pattern/$word/g" $file_path
done

Categories: bash, coding, html Tags: , ,

Recursively compare content of two directories

August 31, 2017 Leave a comment

Command line

This requires the diff and vim packages.

diff --recursive /dir/ect/ory1 /dir/ect/ory2 > 1_vs_2.diff
vimdiff 1_vs_2.diff

Potentially useful diff options:

--ignore-all-space
--exclude=.svn

GUI

Install Intellij CE.

Then either Run IntelliJ Diff from the command-line.

Or from within a running Intellij window:

  • Open a common parent directory as a project
  • Select the two directories to compare
  • Right-click – Compare Directories

Alternatives

I often see the GPL-licensed WinMerge tool recommended, But it works only on Windows, last release was 2013 and navigation into sub-directories and file diffs is a bit clunkier than in Intellij.