Skip to content

Instantly share code, notes, and snippets.


Arnaud Esteve aesteve

  • Lille
Block or report user

Report or block aesteve

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
aesteve / JDK8 OpenShift
Created Feb 19, 2015
Download Oracle's JDK 8 on Openshift DIY cartridge
View JDK8 OpenShift
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie"
tar -zxvf jdk-8u31-linux-x64.tar.gz
rm -f jdk-8u31-linux-x64.tar.gz
# JAVA_HOME and PATH are set in startup hook according to these paths
aesteve / build.gradle
Last active Aug 29, 2015
Multi-project Vert.x 3 + Gradle
View build.gradle
if (!JavaVersion.current().java8Compatible) {
throw new IllegalStateException("This needs Java 8. You are using ${JavaVersion.current()}.")
buildscript {
repositories { jcenter() }
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:1.1.1'
View JavaNature eclipse
<!-- comments / name / etc. -->
aesteve / JSXTransform
Last active Apr 9, 2018
Transforming JSX with nashorn
View JSXTransform
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import javax.script.Invocable;
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
aesteve / _.mapjava 8
Created Feb 26, 2015 Java 8
View _.mapjava 8
List<String> strings = new ArrayList<String>();
// ... populate list
List<String> mappedStrings = -> someString.toLowerCase()).collect(Collectors.toList());
aesteve / logback.groovy
Created Apr 2, 2015
Logback configuration for rolling files
View logback.groovy
import static ch.qos.logback.classic.Level.*
import ch.qos.logback.classic.encoder.PatternLayoutEncoder
import ch.qos.logback.core.rolling.RollingFileAppender
import ch.qos.logback.core.rolling.TimeBasedRollingPolicy
import ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP
appender("FILE", RollingFileAppender) {
file = "logs/server.log"
append = true
encoder(PatternLayoutEncoder) { pattern = "%d{HH:mm:ss.SSS} %-5level %logger{60} - %msg%n" }
aesteve / build.gradle
Created Apr 3, 2015
vertx-metrics-demo Gradle
View build.gradle
plugins {
id 'java'
id 'eclipse'
id 'idea'
id 'com.github.johnrengelman.shadow' version '1.2.1'
repositories {
aesteve / Perf example
Created Jul 10, 2015
Some example on what we could benchmark
View Perf example
// create an object
public class SomeObject {
public Date someDate;
public Integer someInt;
public String someString;
public Double someDouble;
// create vertx handler
router.put("/vertx", ctx -> {
View GroovyTestBase.groovy
import io.vertx.core.Handler
import io.vertx.groovy.ext.unit.Async
import io.vertx.groovy.ext.unit.TestContext
import io.vertx.groovy.ext.unit.junit.VertxUnitRunner
import org.junit.runner.RunWith
abstract class GroovyTestBase {
public GroovyTestBase() {
public static authorize(JsonObject authInfo, Handler<User> onAuthorized, Handler<Throwable> onFailure) {
return res -> {
if (res.succeeded()) {
User user = res.result();
user.isAuthorised("newsletter:edit:13", res2 -> {
if (res2.succeeded()) {
boolean hasPermission = res2.result();
You can’t perform that action at this time.