Skip to content

Instantly share code, notes, and snippets.

@ctipper
ctipper / keywords.xsl
Created September 28, 2012 17:10
Create Docbook keywordset from comma-delimited list of keywords. Of general applicability.
<!-- process keywords -->
<xsl:template match="keywords">
<xsl:element name="keywordset">
<xsl:call-template name="keyword">
<xsl:with-param name="keyword-names"><xsl:value-of select="."/>
</xsl:with-param>
</xsl:call-template>
</xsl:element>
</xsl:template>
@ctipper
ctipper / CallbackA.java
Last active August 29, 2015 14:22
Websocket onMessage with a callback and then using JDK 8 CompletableFuture
public interface Callback<T> {
public void call(T value);
}
import java.io.Console;
public class ConsoleTask implements Runnable {
Console console;
#!/bin/sh
set -e
set -x
if ! mount -t cd9660 /dev/cd0 /mnt; then
echo 'Must run Virtual Machines > Install VMware Tools first' >&2
exit 1
fi
VMWARE_TOOLS=/tmp/vmware-tools-distrib
@ctipper
ctipper / About.txt
Last active October 17, 2018 14:33
OSX app menu compatibility shim for JDK 9+ releases
Abstract:
Hooks existing preferences/about/quit functionality from an existing Java app into handlers for the Mac OS X application menu.
It is tailored to provide compatibility with the Java 10 releases so that an app may be built on other platforms.
This work was inspired by an OSX compatibility layer provided by Apple that used a different API. This is an otherwise original contribution and is a reimplementation using newer interface methods.
Usage:
@ctipper
ctipper / README.md
Last active June 25, 2017 12:26
Fix emacs 25 ps-print-buffer with own routine

Emacs 25 does not print visual-line-mode correctly words are split at the page boundary. This fixes it, I recommend installing it to local site-lisp and referencing from init. Maybe you will need to install longlines-mode.

The inspiration is a post about rendering to pdf at

@ctipper
ctipper / README.md
Last active February 1, 2023 21:54
Install versions of Adoptium OpenJDK for Windows

Usage: fetch-jdk.sh [-v] <version> [-jdk]
-jdk will install for all users

Script assumes that user is running Git for Windows https://gitforwindows.org/

Requisites are jq and gsudo
Follow instructions at https://scoop.sh/ and then install

scoop bucket add main