Skip to content

Instantly share code, notes, and snippets.

Michael Simons michael-simons

Block or report user

Report or block michael-simons

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Dafuq.java
import static java.lang.System.*;
public class Dafuq {
public static void main(String[] args) {
/*
\u002a\u002f
\u006f\u0075\u0074\u002e\u0070\u0072\u0069\u006e\u0074\u006c\u006e\u0028\u0022\u004e\u006f\u0022\u0029\u003b
\u000d\u000a\u0065\u0078\u0069\u0074\u0028\u0030\u0029\u003b
\u002f\u002a
@michael-simons
michael-simons / README.md
Last active Nov 1, 2019
Detect and migrate string properties of nodes to dedicated types
View README.md
View gist:46d69881e04665935bb3b7520a48be61
<script th:inline="javascript">
/*<![CDATA[*/
...
var username = /*[[${session.user.name}]]*/ 'Sebastian';
...
/*]]>*/
</script>
@michael-simons
michael-simons / ExecutableSyntaxTest.java
Last active Aug 30, 2019
JS, Ruby, Python and R versions of Graal Values that are immediately executable
View ExecutableSyntaxTest.java
package scripts;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
import org.graalvm.polyglot.Context;
import org.graalvm.polyglot.Value;
import org.junit.jupiter.api.Test;
/**
@michael-simons
michael-simons / build.gradle
Created Aug 22, 2019
Update Jackson's BOM in Spring Boot with Gradle
View build.gradle
plugins {
id 'org.springframework.boot' version '2.1.7.RELEASE'
id 'io.spring.dependency-management' version '1.0.8.RELEASE'
id 'java'
}
group = 'com.example'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '1.8'
@michael-simons
michael-simons / ContextualScenarious.java
Created Jul 22, 2019
Ongoing discussion about issue when shading Project Reactor
View ContextualScenarious.java
package com.example.demo;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import reactor.test.StepVerifier;
import java.util.NoSuchElementException;
import org.junit.Test;
import org.reactivestreams.Publisher;
View EnumTests.java
import static org.assertj.core.api.Assertions.*;
import org.junit.jupiter.api.Test;
class EnumTests {
enum YourFriendlyEnumMostPeopleUse {
THING1, THING2
}
@michael-simons
michael-simons / log4j2.xml
Created Jun 28, 2019
log4j: Route only subpackage to different appender
View log4j2.xml
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN" monitorInterval="30">
<Appenders>
<Console name="ConsoleAppenderA" target="SYSTEM_OUT" follow="true">
<PatternLayout pattern="mainlog> %m%n%ex"/>
</Console>
<Console name="ConsoleAppenderB" target="SYSTEM_OUT" follow="true">
<PatternLayout pattern="sublog> %m%n%ex"/>
</Console>
View WIthInitializer
@NeedsCausalCluster
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@ContextConfiguration(initializers = { BookmarkLoadTest.Initializer.class })
public class BookmarkLoadTest {
@Neo4jUri
private static String clusterUri;
static class Initializer implements ApplicationContextInitializer<ConfigurableApplicationContext> {
public void initialize(ConfigurableApplicationContext configurableApplicationContext) {
View gist:437c17847012e8e1f6ba7c0572346945
Ich guck hier auf den Stack drauf und verstehe ihn nicht:
```
2019-03-19 14:27:52,947 INFO [io.quarkus] (main) Quarkus 0.11.0 started in 0.036s. Listening on: http://127.0.0.1:8080
2019-03-19 14:27:52,991 INFO [io.quarkus] (main) Installed features: [cdi, resteasy, resteasy-jsonb]
WARNING: The sunec native library, required by the SunEC provider, could not be loaded. This library is usually shipped as part of the JDK and can be found under <JAVA_HOME>/jre/lib/<platform>/libsunec.so. It is loaded at run time via System.loadLibrary("sunec"), the first time services from SunEC are accessed. To use this provider's services the java.library.path system property needs to be set accordingly to point to a location that contains libsunec.so. Note that if java.library.path is not set it defaults to the current working directory.
2019-03-19 14:27:55,597 INFO [Driver] (XNIO-1 task-1) Direct driver instance 1633194162 created for server address localhost:7687
2019-03-19 14:27:55,598 WARNING [org.neo.dri.int.sha.io.net
You can’t perform that action at this time.