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 gist:69d9c0ed3d98abed8673eb6fbe01b4ce
https://twitter.com/rotnroll666/status/735456236280393730
https://twitter.com/rotnroll666/status/734421673026392064
https://twitter.com/rotnroll666/status/839844535664578561
https://twitter.com/rotnroll666/status/757439545155649536
https://twitter.com/rotnroll666/status/682837938770685952
https://twitter.com/rotnroll666/status/702070054637150208
https://twitter.com/rotnroll666/status/713967198973337600
https://twitter.com/rotnroll666/status/974170243525431296
@michael-simons
michael-simons / batch-rsync.sh
Created Jan 24, 2020
zsh script for "batching" rsync of a large tree alphabetically
View batch-rsync.sh
#!/bin/zsh
for x in {a..z}
do
rsync --delete -cav --include="[${x}${x:u}]*/***" --exclude="*" /largeSourceFolder/ /Backup/
done
@michael-simons
michael-simons / DemoApplication.java
Last active Dec 22, 2019
Simple JDK 11+ HTTP Client usage, POST'ing formdata
View DemoApplication.java
package com.example.demo;
import static java.nio.charset.StandardCharsets.UTF_8;
import java.net.URI;
import java.net.URLEncoder;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpRequest.BodyPublishers;
import java.net.http.HttpResponse.BodyHandlers;
View PlainAccessToAura.java
import org.neo4j.driver.AuthTokens;
import org.neo4j.driver.Config;
import org.neo4j.driver.Driver;
import org.neo4j.driver.GraphDatabase;
import org.neo4j.driver.Session;
public class AccessAura {
public static void main(String... a) {
Config config = Config.builder().withEncryption().build();
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;
You can’t perform that action at this time.