Skip to content

Instantly share code, notes, and snippets.

Down the code mine

Adam Retter adamretter

Down the code mine
Block or report user

Report or block adamretter

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
View javadoc errors
[ERROR] Exit code: 1 - /Users/aretter/code/exist.maven2/exist-core/src/main/java/org/exist/test/ error: unterminated inline tag
[ERROR] * <pre>{@code
[ERROR] /Users/aretter/code/exist.maven2/exist-core/src/main/java/org/exist/test/ error: unknown tag: Test
[ERROR] * @Test
[ERROR] /Users/aretter/code/exist.maven2/exist-core/src/main/java/org/exist/test/ error: malformed HTML
adamretter / dtx.xqm
Last active Sep 19, 2019
Date/Time/DateTime XQuery functions
View dtx.xqm
import module namespace functx = "";
(: NOTE -- functx uses 1 to 7 to represent MON-SUN, whereas eXist-db's datetime module used 1 to 7 to represent SUN-SAT :)
declare variable $local:MON := 1;
declare variable $local:TUES := 2;
declare variable $local:WEDS := 3;
declare variable $local:THURS := 4;
declare variable $local:FRI := 5;
declare variable $local:SAT := 6;
adamretter / exist-message-digest-algs.txt
Last active Nov 13, 2018
MessageDigest algorithms offered by eXist-db
View exist-message-digest-algs.txt
adamretter /
Created Aug 17, 2018
* eXist Open Source Native XML Database
* Copyright (C) 2001-2018 The eXist Project
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
adamretter / pedb.xml
Last active Aug 13, 2018
pedb example for Luca
View pedb.xml
<TEI xmlns="" xml:id="pedb">
<title>Database of persons</title>
adamretter / Unzip.scala
Created Jun 15, 2018
Unzip with Cats Effect
View Unzip.scala
import java.nio.file.{Files, Path, StandardOpenOption}
import{ZipEntry, ZipInputStream}
import cats.effect.{IO, Resource}
object Unzip {
adamretter /
Created Oct 21, 2017
Potential design pattern for Asymmetrical lock release
import java.util.Optional;
import java.util.function.Supplier;
// See
public class AsymmetricalLockingExample {
public static void main(String args[]) throws Exception {
try (final ManagedRelease<Collection> mcol =
new ManagedRelease<>(getCollection("col1 name", LockMode.WRITE_LOCK))) {
adamretter / ant-show-deps.xqy
Created Sep 25, 2017
XQuery to display the dependencies tree of an Ant target
View ant-show-deps.xqy
: XQuery to display the dependencies of an Ant target.
: There are two modes of operation:
: 1) Display all targets and immediate dependencies, specified by $project-file
: 2) Show a tree of a single targets dependencies, this happens when $target-name is set as well.
: External parameters:
: $project-file The initial Ant file to start parsing from (imports will be expanded)
: $target-name If specified we examine only a single target and produce a tree of all dependencies (recursively)
adamretter / .jdk1.8.jinfo
Created Jul 7, 2017 — forked from olagache/.jdk1.8.jinfo
Generate ".jdk1.8.jinfo" and "" files to install java 8 using ubuntu alternatives.
View .jdk1.8.jinfo
jre servertool /usr/lib/jvm/jdk1.8/jre/bin/servertool
jre keytool /usr/lib/jvm/jdk1.8/jre/bin/keytool
jre java /usr/lib/jvm/jdk1.8/jre/bin/java
jre jcontrol /usr/lib/jvm/jdk1.8/jre/bin/jcontrol
jre rmid /usr/lib/jvm/jdk1.8/jre/bin/rmid
jre ControlPanel /usr/lib/jvm/jdk1.8/jre/bin/ControlPanel
jre rmiregistry /usr/lib/jvm/jdk1.8/jre/bin/rmiregistry
jre orbd /usr/lib/jvm/jdk1.8/jre/bin/orbd
package org.rocksdb;
import java.nio.file.*;
import java.nio.file.attribute.BasicFileAttributes;
import java.util.ArrayList;
import java.util.List;
* Created by aretter on 30/05/2017.
You can’t perform that action at this time.