Skip to content

Instantly share code, notes, and snippets.

View yagee-de's full-sized avatar

Thomas Scheffler yagee-de

View GitHub Profile
@yagee-de
yagee-de / helloworld.java
Created November 10, 2022 14:41
Shell Scripting with Java
#!java --source 17
public class J {
public static void main(String[] args) {
System.out.println("Hello World!");
}
}
@yagee-de
yagee-de / new-derivate-snippet.java
Created May 17, 2017 09:01
Create new derivate using upload handler...
public Optional<MCRObjectID> createNewDerivate(MCRObjectID objectId, Path basePath, Path... file) {
if (file.length == 0) {
return Optional.empty();
}
for (Path f : file) {
if (Files.isRegularFile(basePath.resolve(f))) {
throw new NoSuchFileException(f.toString(), basePath.toString(), "Is not a file.");
}
}
MCRUploadHandlerIFS uploadHandler = new MCRUploadHandlerIFS(objectId.toString(), null);
@yagee-de
yagee-de / mycore_sort.xml
Created January 9, 2017 09:51
Default MyCoRe POM.xml sort order
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion />
<!-- Parent -->
<parent>
<groupId />
<artifactId />
<version />