Skip to content

Instantly share code, notes, and snippets.

View rherrick's full-sized avatar

Rick Herrick rherrick

  • Flywheel
  • St. Louis, Missouri
View GitHub Profile
@rherrick
rherrick / README.md
Created November 3, 2022 15:57
Excluding experiments from image session assessments list

Copy /src/main/webapp/xnat-templates/screens/xnat_imageSessionData/xnat_imageSessionData_assessments.vm to /src/main/resources/META-INF/resources/templates/screens/xnat_imageSessionData/xnat_imageSessionData_assessments.vm.

Look for the assessor loop:

#foreach ($assessor in $om.getMinimalLoadAssessors())

Add filtering under that:

#if ($assessor.xSIType != "ais:derivative1" && $assessor.xSIType != "ais:derivative2" && $assessor.xSIType != "ais:derivative3")
@rherrick
rherrick / failing-daemon-609609.out.log
Created March 17, 2021 20:59
Gradle debug output from building xnat-data-models with com.palantir.git-version
2021-03-17T11:01:10.720-0500 [DEBUG] [org.gradle.launcher.daemon.bootstrap.DaemonMain] Assuming the daemon was started with following jvm opts: [-XX:+CMSClassUnloadingEnabled, -Xms256m, -Xmx2g, -Dfile.encoding=UTF-8, -Duser.country=US, -Duser.language=en, -Duser.variant]
2021-03-17T11:01:10.778-0500 [INFO] [org.gradle.launcher.daemon.server.Daemon] start() called on daemon - DefaultDaemonContext[uid=d5d1f199-5814-4fea-b2fc-c62d1b9bb78f,javaHome=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.282.b08-1.el7_9.x86_64,daemonRegistryDir=/home/jenkins/.gradle/daemon,pid=609609,idleTimeout=120000,priority=NORMAL,daemonOpts=-XX:+CMSClassUnloadingEnabled,-Xms256m,-Xmx2g,-Dfile.encoding=UTF-8,-Duser.country=US,-Duser.language=en,-Duser.variant]
2021-03-17T11:01:10.788-0500 [DEBUG] [org.gradle.internal.remote.internal.inet.InetAddresses] Adding IP addresses for network interface ens192
2021-03-17T11:01:10.788-0500 [DEBUG] [org.gradle.internal.remote.internal.inet.InetAddresses] Is this a loopback interface? false
2021-03-17T11:01
@rherrick
rherrick / Anonymizer.groovy
Created September 21, 2020 18:00
A script that pulls in the XNAT Mizer library and DicomEdit 4 and 6 and applies an anonymization script to DICOM files. Requires Groovy installation. Save this file as Anonymizer.groovy, make it executable (e.g. chmod +x Anonymizer.groovy), then run it.
#!/usr/bin/env groovy
@GrabConfig(systemClassLoader = true)
@GrabResolver(name = "NRG Release Repo", root = "https://nrgxnat.jfrog.io/nrgxnat/libs-release")
@GrabResolver(name = "NRG Snapshot Repo", root = "https://nrgxnat.jfrog.io/nrgxnat/libs-snapshot")
@Grapes([
@GrabExclude("org.slf4j:slf4j-simple"),
@GrabExclude("org.slf4j:slf4j-log4j12"),
@Grab("info.picocli:picocli:4.5.1"),
@Grab("ch.qos.logback:logback-classic:1.2.3"),
@Grab("org.nrg.dicom:mizer:1.2.0-SNAPSHOT"),
@rherrick
rherrick / get-resources.sh
Created September 20, 2020 21:49
Get resource files from XNAT dataset collection
#!/usr/bin/env bash
showHelp() {
echo
echo "Usage: ${0} --server <URL> --username <USER> --password <PASSWORD> --project <PROJECT> --collection <COLLECTION_ID>"
echo
echo "Note: all options are required, with the exception of --password. If --password"
echo " is omitted, you must enter your password when the script runs."
echo
exit 255
@rherrick
rherrick / 2019-03-28T18_22_05_888Z-debug.log
Created March 28, 2019 18:48
Failure when launching test node app
0 info it worked if it ends with ok
1 verbose cli [ '/Users/username/.nvm/versions/node/v10.15.3/bin/node',
1 verbose cli '/Users/username/.nvm/versions/node/v10.15.3/bin/npm',
1 verbose cli 'run',
1 verbose cli 'dev' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle @~predev: @
6 info lifecycle @~dev: @
@rherrick
rherrick / Main.java
Created December 19, 2018 21:59
Refactor of advent day 1 code
package com.nerdnetworks;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.HashSet;
import java.util.Set;
import java.util.concurrent.atomic.AtomicInteger;
public class Main {
@rherrick
rherrick / add-to-java-cacerts.sh
Created May 10, 2018 01:29
Shows failure to install Charles proxy cert on Java 10 JDK on OS X
decker:Internet Plug-Ins root# JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-10.0.1.jdk/Contents/Home $(find /Applications/Charles.app/Contents/ -name "*.command")
############################################
Charles Root Certificate Java VM Import Tool
############################################
This tool imports your Charles Root Certificate into the Java VMs that it finds on
your computer, so that Java applications trust your Charles Root Certificate for
SSL Proxying.
@rherrick
rherrick / build.gradle
Last active February 27, 2018 18:58
Repositories element without dcm4che repo for XNAT pom.xml and build.gradle files. Note that the repositories block in build.gradle should _not_ be applied to a repositories block inside a buildscript block, only to the standard repositories block.
repositories {
mavenLocal()
maven {
url "http://maven.imagej.net/content/groups/public"
name "ImageJ Maven Repository"
}
jcenter()
mavenCentral()
maven {
url "https://nrgxnat.jfrog.io/nrgxnat/libs-release"
@rherrick
rherrick / build.gradle
Created December 8, 2017 01:07
Simple configuration of Javadoc coverage doclet for Gradle
configurations {
// Other configuration lines might be in here
javadocCoverage
}
dependencies {
// Your application's other dependencies go here.
javadocCoverage "com.manoelcampos:javadoc-coverage:1.1.0"
}
@rherrick
rherrick / xnat-ext-1.7.4-SNAPSHOT.gradle
Last active August 17, 2017 18:06
External Gradle configuration
apply plugin: "jacoco"
ext.propertyWithDefault = { String name, def value ->
hasProperty(name) ? property(name) : value
}
dependencyManagement.imports {
mavenBom "org.nrg:parent:${vXnat}"
}