Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block digulla

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
digulla / ConfigException.groovy
Created Mar 14, 2019
Code for a nested config that can validate path and type errors
View ConfigException.groovy
class ConfigException extends RuntimeException {
ConfigException(String message) {
ConfigException(String message, Throwable cause) {
super(message, cause)
View Steam System Information.log
Computer Information:
Manufacturer: Unknown
Model: Unknown
Form Factor: Desktop
No Touch Input Detected
Processor Information:
CPU Vendor: GenuineIntel
CPU Brand: Intel(R) Core(TM) i5-8400 CPU @ 2.80GHz
CPU Family: 0x6
digulla /
Last active Oct 17, 2017
Variant of StandaloneServletContextUriLocator from wro4j which can also load from web resources from the classpath.
package ch.swissquant.gkb.ui.wro;
import static org.apache.commons.lang3.Validate.notNull;
import static org.apache.commons.lang3.Validate.validState;
digulla /
Created Jun 9, 2017
Jetty helper to manually load web-fragment.xml from JARs and class folders on the classpath.
* Manually load <code>web-fragment.xml</code> from JARs and class folders on the classpath.
* <p>Jetty can only find them automatically if the fragment is in a JAR in <code>WEB-INF/lib/</code>.
protected void loadWebFragments(WebAppContext ctx) {
Map<Resource, Resource> frags = getOrCreateFragmentResources(ctx);
try {
ArrayList<URL> urls = Collections.list(getClass().getClassLoader().getResources("META-INF/web-fragment.xml"));
urls.forEach(url -> {
digulla / PageRegion
Last active Jan 25, 2017
Support code to write unit tests that validate PDF documents
View PageRegion
import java.awt.geom.Rectangle2D;
import org.apache.pdfbox.text.PDFTextStripperByArea;
public class PageRegion {
private String name;
private Rectangle2D rect;
// Coordinates are in the order in which the Apache PDF-Box Debugger displays them
digulla /
Last active Jul 12, 2019
How to check whether a file is on a network share with Java
/** Copyleft (C) 2016 by Aaron Digulla. Use as you wish. This copyright notice can be removed. */
package bug507401;
import java.util.Arrays;
import java.util.List;
digulla /
Last active Apr 29, 2016
Make ZK play nice with Fediz SSO
digulla / Dockerfile.template
Last active Dec 22, 2015
Oracle XE 11 Docker image without license issues
View Dockerfile.template
FROM ubuntu:14.04.1
ADD chkconfig /sbin/chkconfig
ADD init.ora /
ADD initXETemp.ora /
RUN cat /@BASENAME@.deb?? > /@BASENAME@.deb
digulla /
Last active Aug 22, 2018
Test case for multi-threaded access to an H2 database
package de.pdark.h2.txtest;
import static org.junit.Assert.*;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import org.h2.jdbcx.JdbcDataSource;
import org.junit.Test;
public class H2TransactionTest {
digulla / c't_Inhaltsverzeichnis_sortieren.user.js
Last active Aug 29, 2015
Sortiert das Inhaltsverzeichnis der c't nach Seitenzahl, wenn man auf "aktuell" klickt
View c't_Inhaltsverzeichnis_sortieren.user.js
// ==UserScript==
// @name c't Inhaltsverzeichnis sortieren
// @namespace
// @version 1.0
// @description Sortiert das Inhaltsverzeichnis der c't nach Seitenzahl, wenn man auf "aktuell" klickt
// @match*
// @copyright 2014+, Aaron Digulla
// @grant unsafeWindow
// ==/UserScript==
You can’t perform that action at this time.