Launch H2 shell

coursier launch com.h2database:h2:5:1.4.195 --main-class

Rendering GraphViz for web


GraphViz is a brilliant vendor-independent way of creating graphs and having them render into multiple formats such as SVG.

We can achieve stuff like this:

Just managed to map an #SBT project to an #SVG diagram. Clicking a node takes you to the project folder.

— William Narmontas (@ScalaWilliam) May 27, 2017

Two options:

Render on the client-side
Can use Viz-JS (GitHub).
Very easy to use:
<script src=""
    integrity="sha256-lLBbzF3IYSscIpBw/KgKjF1dDWMQdz1RWZnEdnNSDxA=" crossorigin="anonymous"></script>

    <script type="text/javascript">
    document.querySelector("#target").innerHTML = Viz(dotString, {format: "svg"});
    flw.innerHTML = image;
Render on the server-side
More powerful, can do XSL transforms, etc, etc, before serving SVG
Specific library however uses a V8 layer which seemed unstable to me.

Hub @ GitHub

Very useful utility, can just type hub push for example.

Scale stuff

Begin by using the non-scalable thing.

Then don't forget to scale.

These are just some ideas, non-committal I am.

Fast to useUsage scales
Markdown, Google Docs HTML, XML
Python, JavaScriptScala, Haskell
GitHub Self hosted
Twitter, Medium, Quora Self hosted

Execute XSLT in one line

Using Saxon and Coursier

coursier launch net.sf.saxon:Saxon-HE:9.7.0-18 --main net.sf.saxon.Transform -- -s:source -xsl:stylesheet -o:output

Very useful when you want to run an XSLT transform..

May 27, 2017

Convert BPMN to SVG via command line

Not very pretty at all but could be improved with a better XSLT sheet. Way better than manual clicking:

$ wget
$ coursier launch net.sf.saxon:Saxon-HE:9.7.0-18 --main net.sf.saxon.Transform -- -s:diagram.bpmn
$ dot -Tsvg -o diagram.svg

I also filed an issue on bpmn-js.

Identity XSLT transform

wget -O test.xsl ''

Also used the Link Shortener for this.

Split a Git repository

Suppose you now want to split away a project but keep the commit history in Git.

$ git filter-branch --tree-filter 'mkdir new-repo; mv x y z new-repo || true' HEAD
$ git filter-branch --prune-empty -f --subdirectory-filter new-repo -- --all

Why does software take so long?

When a non-techie asks you why you take so long to get the thing done, this is what you tell them. #software

— William Narmontas (@ScalaWilliam) April 15, 2017

BlueGriffon Entity conversions

BlueGriffon converts entities to their direct characters, which then don't render.

To fix this, go to 'Preferences' > 'Source' > 'Serialization' > 'Output the following characters as entities' > 'All HTML4 special characters'.

JSON array to TSV?

Yep, doable with jq. Useful when you want to process data with CLI tools more easily.


curl -s '' | jq -r '.[] | [.id, .nickname.nickname] | @tsv'

#json array to #tsv with #jq: `curl -s '' | jq -r '.[] | [.id, .nickname.nickname] | @tsv'` so nice.

— William Narmontas (@ScalaWilliam) May 11, 2017