Table of Contents

Random stuff

Freeplane mind mapping software

Stock freeplane on Ubuntu 23.04 stopped working:

*org.knopflerfish.framework.readonly=true
*org.knopflerfish.gosg.jars=reference:file:/usr/share/freeplane/core/
*org.freeplane.user.dir=/home/john
*org.freeplane.basedirectory=/usr/share/freeplane
org.freeplane.globalresourcedir=/usr/share/freeplane/resources
*java.security.policy=/usr/share/freeplane/freeplane.policy
*org.osgi.framework.storage=/usr/share/freeplane/fwdir
Exception in thread "main" java.lang.UnsupportedOperationException: The Security Manager is deprecated and will be removed in a future release
        at java.base/java.lang.System.setSecurityManager(System.java:416)
        at org.freeplane.launcher.Launcher.launchWithoutUICheck(Launcher.java:279)
        at org.freeplane.launcher.Launcher.main(Launcher.java:87)

Running Freeplane 1.11.4 gave a better error:

ERROR:   Found /usr/bin/java in $PATH.
ERROR:   It has version 18.0.2-ea
ERROR:   Currently, freeplane requires java version 8 or from 11 to 17
ERROR:   
ERROR:   Select a supported java version
ERROR:   by setting FREEPLANE_JAVA_HOME to a valid java location
ERROR:   OR use an unsupported java version
ERROR:   by setting FREEPLANE_USE_UNSUPPORTED_JAVA_VERSION to 1

Ubuntu 23.04 decided to install JDK 18, and I needed to downgrade the version of Java: sudo update-alternatives --config java and I selected Java 17.

grep

Treat a binary file as text

snippet.bash
grep -C3 myfile # matches in a binary file will not be shown
grep -a -C3 myfile # will attempt to show line context in the binary file

maven

Install a single artifact

This is useful if the artifact contains some sort of executable to run.

snippet.bash
mvn org.apache.maven.plugins:maven-dependency-plugin:2.4:get -DartifactId=[id of artifact] -DgroupId=[group of artifact] -Dversion=[version of artifact]

HTML

Character encoding

Unicode emojis won't appear unless your HTML is delivered with a character encoding of UTF-8. There are two ways to do this:

Check your page here: https://validator.w3.org/i18n-checker/

Things to look into