This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
///usr/bin/env jbang "$0" "$@" ; exit $? | |
//DEPS com.squareup.wire:wire-schema-jvm:4.9.3 | |
import java.nio.file.FileSystems; | |
import java.util.Collections; | |
import java.util.Comparator; | |
import java.util.List; | |
import java.util.Set; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
///usr/bin/env jbang "$0" "$@" ; exit $? | |
//DEPS org.testcontainers:testcontainers:1.19.0 | |
//DEPS org.slf4j:slf4j-simple:1.7.36 | |
//JAVA 11 | |
import java.net.URI; | |
import java.net.http.HttpClient; | |
import java.net.http.HttpRequest; | |
import java.net.http.HttpResponse; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
///usr/bin/env jbang "$0" "$@" ; exit $? | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.IOException; | |
import java.util.ArrayList; | |
import java.util.Collections; | |
import java.util.Comparator; | |
import java.util.Iterator; | |
import java.util.List; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
///usr/bin/env jbang "$0" "$@" ; exit $? | |
import java.io.File; | |
public class ExecMain { | |
public static void main(String... args) throws Exception { | |
File directory = new File(System.getProperty("user.home")); | |
System.out.println("List files in " + directory); | |
exec(directory, "ls", "-a", "-l"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
///usr/bin/env jbang "$0" "$@" ; exit $? | |
//DEPS org.eclipse.jgit:org.eclipse.jgit:5.0.3.201809091024-r | |
//DEPS org.slf4j:slf4j-simple:1.7.36 | |
import java.io.File; | |
import java.io.IOException; | |
import org.eclipse.jgit.api.errors.GitAPIException; | |
import org.eclipse.jgit.api.Git; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
///usr/bin/env jbang "$0" "$@" ; exit $? | |
// Script to search all the operationId of a given OpenAPI spec. | |
// Usage: jbang run OperationIdsInOpenAPI.java <path to the OpenAPI spec> | |
// Example taken from https://openapitools.github.io/empoa/ | |
//DEPS org.openapitools.empoa:empoa-util:2.1.0 | |
//DEPS org.openapitools.empoa:empoa-swagger-core:2.1.0 | |
//DEPS io.swagger.parser.v3:swagger-parser:2.0.20 | |
//DEPS org.slf4j:slf4j-simple:1.7.36 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<mxfile agent="5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/17.4.2 Chrome/100.0.4896.60 Electron/18.0.1 Safari/537.36" etag="5BqQubEyUl9RtjgusI6h" host="Electron" modified="2022-04-25T10:16:45.897Z" type="device" version="17.4.2"> | |
<diagram id="PLuXOcR_mGlr0jXjKg2p" name="Page-1"> | |
<mxGraphModel arrows="1" connect="1" dx="1106" dy="774" fold="1" grid="1" gridSize="10" guides="1" math="0" page="1" pageHeight="583" pageScale="1" pageWidth="413" shadow="0" tooltips="1"> | |
<root> | |
<mxCell id="0"/> | |
<mxCell id="1" parent="0"/> | |
<mxCell id="IgmaPHdbTIZ3v5u-N69z-1" parent="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" value="" vertex="1"> | |
<mxGeometry as="geometry" height="40" width="80" x="20" y="10"/> | |
</mxCell> | |
<mxCell edge="1" id="IgmaPHdbTIZ3v5u-N69z-2" parent="1" source="IgmaPHdbTIZ3v5u-N69z-3" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
///usr/bin/env jbang "$0" "$@" ; exit $? | |
//DEPS org.junit.jupiter:junit-jupiter-api:5.7.2 | |
//DEPS org.assertj:assertj-core:3.11.1 | |
//JAVA 17 | |
import static org.assertj.core.api.Assertions.assertThat; | |
import java.util.ArrayList; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.ArrayList; | |
import java.util.List; | |
public class DisplayTree { | |
private static final boolean USE_UNICODE = false; | |
public static void main(final String[] args) { | |
final DisplayTree.Node node = new DisplayTree.Node("example") | |
.addChild(new Node("a")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
///usr/bin/env jbang "$0" "$@" ; exit $? | |
//DEPS org.gradle:gradle-tooling-api:7.4.2 | |
//DEPS org.slf4j:slf4j-simple:1.7.10 | |
//REPOS gradle-releases=https://repo.gradle.org/gradle/libs-releases | |
import java.io.File; | |
import org.gradle.tooling.GradleConnector; | |
import org.gradle.tooling.ProjectConnection; |
NewerOlder