Skip to content

Instantly share code, notes, and snippets.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@remkop
remkop / FileList.java
Last active December 22, 2019 00:47
Example picocli-based CLI application
/* STEPS FOR CREATING NATIVE IMAGE (MacOS, Linux):
# download this file
mkdir picocli-demo
cd picocli-demo
wget --quiet --show-progress https://gist.githubusercontent.com/remkop/4d0339d9a7f80fa848735bec745d203a/raw/8a3fcaf698b44a3a721e1ba800674cbb1a435e29/FileList.java
# download dependencies
wget --quiet --show-progress https://github.com/remkop/picocli/releases/download/v4.1.4/picocli-4.1.4.jar
wget --quiet --show-progress https://github.com/remkop/picocli/releases/download/v4.1.4/picocli-codegen-4.1.4.jar
@remkop
remkop / ByteBufferMessageLayout.java
Created May 29, 2016 12:28
Example layout for logging ByteBuffers straight to disk
import java.nio.ByteBuffer;
import org.apache.logging.log4j.core.Layout;
import org.apache.logging.log4j.core.LogEvent;
import org.apache.logging.log4j.core.config.Node;
import org.apache.logging.log4j.core.config.plugins.Plugin;
import org.apache.logging.log4j.core.config.plugins.PluginFactory;
/**
* Layout for writing ObjectMessages containing a ByteBuffer to the appender.