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.reflect.InvocationTargetException; | |
import java.lang.reflect.Method; | |
class LoadedClassFinder extends ClassLoader { | |
static synchronized Class<?> findFrom(final ClassLoader classLoader, final String name) { | |
final Method findLoadedClass; | |
try { | |
findLoadedClass = ClassLoader.class.getDeclaredMethod("findLoadedClass", String.class); | |
} catch (final NoSuchMethodException ex) { | |
throw new RuntimeException(ex); |
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.time.DateTimeException; | |
import java.time.LocalDate; | |
import java.time.chrono.ChronoLocalDate; | |
import java.time.chrono.Chronology; | |
import java.time.chrono.IsoChronology; | |
import java.time.format.ResolverStyle; | |
import java.time.temporal.ChronoField; | |
import java.time.temporal.ChronoUnit; | |
import java.time.temporal.IsoFields; | |
import java.time.temporal.Temporal; |
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 python3 | |
from pathlib import Path | |
import os | |
import subprocess | |
import sys | |
def main(argv): | |
if len(argv) < 3: |
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 kotlinx.coroutines.CoroutineExceptionHandler | |
import kotlinx.coroutines.CoroutineScope | |
import kotlinx.coroutines.Dispatchers | |
import kotlinx.coroutines.Job | |
import kotlinx.coroutines.SupervisorJob | |
import kotlinx.coroutines.delay | |
import kotlinx.coroutines.launch | |
import kotlinx.coroutines.runBlocking | |
import kotlinx.coroutines.slf4j.MDCContext | |
import mu.KotlinLogging |
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
fun main() { | |
println("Hello!") | |
} |
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
public class Main { | |
public static void main(final String[] args) { | |
System.out.println("#1"); | |
Sub.safe(); | |
Sub.unsafe1(null); | |
Sub.unsafe2(null); | |
Sub.unsafe3(null); | |
Sub.unsafe4(null); | |
System.out.println("#2"); | |
} |
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.graalvm.polyglot.Context; | |
public class TryGraalOnStockJvm { | |
public static void main(final String[] args) { | |
final Context context = Context.newBuilder().logHandler(System.err).build(); | |
context.eval("js", "print('Hello, GraalJS!');"); | |
} | |
} |
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.function.Consumer; | |
final class RuntimeExceptionStacker { | |
RuntimeExceptionStacker() { | |
this.exception = null; | |
} | |
synchronized RuntimeExceptionStacker add(final RuntimeException ex) { | |
if (this.exception == null) { | |
this.exception = ex; |
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 python3 | |
import subprocess | |
import sys | |
EMAIL_REPLACE = { | |
"[email protected]": "[email protected]" | |
} |
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 python3 | |
import subprocess | |
import sys | |
def git_author_date(commit): | |
return subprocess.check_output(['git', 'show', '--format=%aD', '--no-patch', commit]).decode("utf-8").strip() | |
NewerOlder