❯ java --version
openjdk 11.0.7 2020-04-14
OpenJDK Runtime Environment GraalVM CE 20.1.0 (build 11.0.7+10-jvmci-20.1-b02)
OpenJDK 64-Bit Server VM GraalVM CE 20.1.0 (build 11.0.7+10-jvmci-20.1-b02, mixed mode, sharing)
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 javax.servlet.ServletOutputStream; | |
import javax.servlet.WriteListener; | |
import javax.servlet.http.HttpServletResponse; | |
import javax.servlet.http.HttpServletResponseWrapper; | |
import java.io.IOException; | |
import java.io.OutputStreamWriter; | |
import java.io.PrintWriter; | |
import java.util.Objects; | |
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 org.apache.curator.framework.CuratorFramework; | |
import org.apache.curator.framework.CuratorFrameworkFactory; | |
import org.apache.curator.retry.RetryOneTime; | |
import org.apache.curator.test.TestingServer; | |
import org.junit.rules.ExternalResource; | |
import java.io.IOException; | |
import java.io.UncheckedIOException; |
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 net.bytebuddy.ByteBuddy; | |
import net.bytebuddy.description.method.MethodDescription; | |
import net.bytebuddy.description.modifier.TypeManifestation; | |
import net.bytebuddy.description.modifier.Visibility; | |
import net.bytebuddy.dynamic.DynamicType.Builder.MethodDefinition; | |
import net.bytebuddy.dynamic.loading.ClassLoadingStrategy; | |
import net.bytebuddy.implementation.Implementation; | |
import net.bytebuddy.implementation.InvocationHandlerAdapter; | |
import net.bytebuddy.matcher.ElementMatcher.Junction; | |
import org.objenesis.Objenesis; |
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.lang.ProcessBuilder.Redirect; | |
import java.lang.reflect.Field; | |
import java.lang.reflect.Method; | |
import java.nio.Buffer; | |
import java.nio.ByteBuffer; | |
/** | |
* Usage: | |
* <p> |
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
/* | |
Moved here => https://github.com/bric3/java-pmap-inspector | |
*/ | |
public class JavaPmapInspector { | |
public static void main(String[] args) throws IOException { | |
System.err.println("Go to:"); |
rsync (Everyone seems to like -z, but it is much slower for me)
- a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
- H: preserves hard-links
- A: preserves ACLs
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
#!/bin/bash | |
# Customize this list | |
crd_domains="istio|bitnami|flux|strimzi|flagger|elastic|zookeeper|projectcalico|pingcap|coreos|kope|gke|google|cert-manager" | |
kubectl get crd \ | |
| grep -E ".*(${crd_domains})[^ ]+" -o \ | |
| xargs -I %% sh -c "kubectl get crd %% -o yaml > %%.yaml" -- %% | |
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 lombok.extern.slf4j.Slf4j; | |
import org.jetbrains.annotations.NotNull; | |
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.InputStreamReader; | |
import java.net.ServerSocket; | |
import java.util.Objects; | |
import java.util.concurrent.ArrayBlockingQueue; |
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.io.BufferedOutputStream; | |
import java.io.BufferedReader; | |
import java.io.InputStreamReader; | |
import java.io.PrintStream; | |
import java.net.ServerSocket; | |
import java.util.Date; | |
/** | |
* Simple HTTP server | |
* |