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/TransactionTestDSL.java:84: error: unterminated inline tag
[ERROR] * <pre>{@code
[ERROR] ^
[ERROR] /Users/aretter/code/exist.maven2/exist-core/src/main/java/org/exist/test/TransactionTestDSL.java:89: error: unknown tag: Test
[ERROR] * @Test
[ERROR] ^
[ERROR] /Users/aretter/code/exist.maven2/exist-core/src/main/java/org/exist/test/TransactionTestDSL.java:93: error: malformed HTML
@adamretter
adamretter / dtx.xqm
Last active Sep 19, 2019
Date/Time/DateTime XQuery functions
View dtx.xqm
import module namespace functx = "http://www.functx.com";
(: 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
adamretter / exist-message-digest-algs.txt
Last active Nov 13, 2018
MessageDigest algorithms offered by eXist-db
View exist-message-digest-algs.txt
PROVIDER | ALGORITHM
-----------|------------
SUN
MD2
MD5
SHA
SHA-224
SHA-256
SHA-384
SHA-512
@adamretter
adamretter / JMXServletTest.java
Created Aug 17, 2018
org.exist.management.client.JMXServletTest
View JMXServletTest.java
/*
* eXist Open Source Native XML Database
* Copyright (C) 2001-2018 The eXist Project
* http://exist-db.org
*
* 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
adamretter / pedb.xml
Last active Aug 13, 2018
pedb example for Luca
View pedb.xml
<TEI xmlns="http://www.tei-c.org/ns/1.0" xml:id="pedb">
<teiHeader>
<fileDesc>
<titleStmt>
<title>Database of persons</title>
</titleStmt>
<publicationStmt>
<ab/>
</publicationStmt>
<sourceDesc>
@adamretter
adamretter / Unzip.scala
Created Jun 15, 2018
Unzip with Cats Effect
View Unzip.scala
import java.io.IOException
import java.nio.file.{Files, Path, StandardOpenOption}
import java.util.zip.{ZipEntry, ZipInputStream}
import cats.effect.{IO, Resource}
object Unzip {
@throws[IOException]
@adamretter
adamretter / AsymmetricalLockingExample.java
Created Oct 21, 2017
Potential design pattern for Asymmetrical lock release
View AsymmetricalLockingExample.java
import java.util.Optional;
import java.util.function.Supplier;
// See https://stackoverflow.com/questions/46864834/best-design-pattern-for-managing-asymmetrical-resource-use
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
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
adamretter / .jdk1.8.jinfo
Created Jul 7, 2017 — forked from olagache/.jdk1.8.jinfo
Generate ".jdk1.8.jinfo" and "alternatives.sh" files to install java 8 using ubuntu alternatives.
View .jdk1.8.jinfo
alias=jdk1.8
section=non-free
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
View TestMerge1.java
package org.rocksdb;
import java.io.IOException;
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.