Cleanbrowsing DNS + dnsmasq

I have children and I want to keep porn out of our home network.

Cleanbrowsing DNS provides a free “Family” filter. You can set your router to use their DNS servers. It seems quite good in comparison to other DNS filters:

However, their filter is sometimes a little strict and even blocks reddit.com and, curiously, the Haligonian event magazine website thecoast.ca.

On the other hand, it does not block user-uploaded images on Twitter, and its many porn peddling accounts.

So basically what I wanted was a configurable whitelist and blacklist on top of the Cleanbrowsing Family filter.

To do that, I installed dnsmasq on a Linux server in our network and configured the DHCP server on our router to give out the IP address of that Linux box as DNS server, effectively directing all machines on our home network to get their DNS from the dnsmasq installation.

I configured dnsmasq as a proxy that by default passes on all DNS request to the Cleanbrowsing Family filter:

This is the content of /etc/dnsmasq.d/cleanbrowsing.conf :

# ignore /etc/resolv.conf
no-resolv
no-poll

# use cleanbrowsing family nameservers as default
server=185.228.168.168
server=185.228.169.168

This is currently the content of /etc/dnsmasq.d/whitelist.conf :

server=/reddit.com/1.1.1.1
server=/thecoast.ca/1.1.1.1

This is currently the content of /etc/dnsmasq.d/blacklist.conf :

# block twitter user media servers (porn and tracker pixels)
server=/pbs.twimg.com/
server=/video.twimg.com/

Whenever I edit any of the above I have to restart the dnsmasq service.

The files in /etc/dnsmasq.d are read by default on my Debian GNU/Linux. If you use a different distro you might have to adjust /etc/dnsmasq.conf accordingly, look for the “conf-dir” directive.

If your router allows you to configure outgoing firewall rules, block all DNS requests from anywhere but the dnsmasq server, to prevent a savvy teenager from bypassing your DNS filter.

Free long-term-support OpenJDK 8 for Windows with Webstart

Now that Oracle Java 8 is no longer free-of-charge for commercial use, and Oracle is dropping Webstart, you might be looking for an alternative way to let your users still execute your Webstart based Java applications.

There are two community based projects that provide OpenJDK builds for various platforms for free and who have committed to providing security update builds for an extended time:

The Java 8 MSI installer from ojdkbuild has options for installing OpenJFX, Webstart (the Open Source implementation from IcedTea-web) and an Update notifier.

The AdoptOpenJDK team is working on a similar package, also offering IcedTea-web.

Overall, it seems that Oracle’s move to charge commercial users for Java might be a good boost for OpenJDK community builds.

Security updates for Java 8 until 2023 and for Java 11 until 2024, are made possible by Redhat taking over the respective OpenJDK Updates projects.

Klassikradio MP3 streams

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.

“Parental control” against my internet overuse

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.

Delete “imported contacts” from LinkedIn

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!

Enter Unicode characters in Linux

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

Recursively compare content of two directories

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.

Work on profit-maximizing IT systems – No thanks

Recently I was contacted by a well-meaning IT recruiter (name omitted for privacy reasons) and explained why I don’t work on financial trading systems anymore:

The request

Hi Oliver,

I came across your profile in my connections this morning and I was keen to reach out to you.

I can see your current experience working with Java, I am currently working on some Core Java opportunities working on the new development of a real-time trading platform.

This opportunity would allow you to work with the latest Java technologies as well as giving the opportunity to learn Scala.

Please let me know when the best date and time to get hold of you would be so we can discuss?

Kind regards,
XXXX

The response

Hello XXXX,

Is it a trading platform in the financial services sector (i.e. banking)?

If so then I have to politely decline. I have worked on trading systems for a large investment bank in the past. My role was Senior Developer / Technical Lead.

But I decided that I didn’t want to spend my limited life-time helping Wall Street traders or other folks whose only business is to make more money for themselves and their (usually already wealthy) investors.

I currently work on systems that support the Canadian Search & Rescue helicopter fleet. Rescuing people’s lives or health is a cause I feel good about and that motivates me.

Please feel free to contact me again if you come across job openings that contribute to the common good.

Thanks
Oliver Doepner

Testing HTML5 / CSS3 editor BlueGriffon

I used to use the now-outdated Mozilla based editor Kompozer, which was a bug-fix fork of Nvu.

Today I realized that in the meantime (since 2015) the Nvu author Daniel Glazman has developed BlueGriffon, an Open Source next-generation Web Editor based on the current rendering engine of Firefox.

I just installed it on Windows at work and my Debian laptop at home and plan to give it a try.

If it is easy to use and generates clean standards-compliant code, I might use it for Web UI mock-ups and other prototyping. :)