Skip to content

Instantly share code, notes, and snippets.

View dgageot's full-sized avatar

David Gageot dgageot

View GitHub Profile
package main
import (
tartar ""
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
public Process startProxy()
String proxyPath = Path.Combine(Paths.ResourcesPath,"whale.exe");
return Process.Start(proxyPath);
} catch(System.ComponentModel.Win32Exception we)
return null;

Keybase proof

I hereby claim:

  • I am dgageot on github.
  • I am dgageot ( on keybase.
  • I have a public key whose fingerprint is 65D5 6C85 C3E2 D178 8B74 748A BD07 EF32 CB52 2D64

To claim this, I am signing this object:

dgageot / fluentHttp.groovy
Created June 9, 2015 16:40
fluent-http Groovy Style
import net.codestory.http.WebServer
@Grab(group='net.code-story', module='http', version='2.98')
def startWebServer() {
new WebServer()
.configure {routes -> routes.anyGet {ctx -> "Hello"}}
dgageot /
Created August 19, 2014 10:05
Find Lambda parameter types with serialization. Works only on serializable lambda
package avaj.lang.invoke;
import java.lang.invoke.SerializedLambda;
import static java.nio.charset.StandardCharsets.ISO_8859_1;
public class FindParametersTypes {
public static void main(String[] args) throws Exception {
System.out.println(getMethodSignature((String s) -> s));
dgageot /
Created August 19, 2014 10:03
Find Lambda parameter types
package test;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.Arrays;
import java.util.function.Function;
import static;
public class FindParametersTypes {
dgageot /
Created May 23, 2014 14:56
Server-sent events in fluent-http
new WebServer(routes -> routes
.get("/events", () -> Stream.iterate(0, (a) -> a + 1)))
dgageot /
Created May 2, 2014 10:24
Guice cycle proxies
protected void configure() {
// ... insert the bindings here