Skip to content

Instantly share code, notes, and snippets.

🐢
Too busy to set my status

David Gageot dgageot

🐢
Too busy to set my status
Block or report user

Report or block dgageot

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 main.go
package main
import (
"archive/tar"
"fmt"
"io"
"log"
"os"
tartar "github.com/vbatts/tar-split/archive/tar"
View main.go
// 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
// http://www.apache.org/licenses/LICENSE-2.0
View gist:d2f95074863253cdb954
public Process startProxy()
{
try
{
String proxyPath = Path.Combine(Paths.ResourcesPath,"whale.exe");
return Process.Start(proxyPath);
} catch(System.ComponentModel.Win32Exception we)
{
Logger.LogError(we.Message);
return null;
View keybase.md

Keybase proof

I hereby claim:

  • I am dgageot on github.
  • I am dgageot (https://keybase.io/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
dgageot / fluentHttp.groovy
Created Jun 9, 2015
fluent-http Groovy Style
View fluentHttp.groovy
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"}}
.start()
}
startWebServer()
@dgageot
dgageot / FindParametersTypes.java
Created Aug 19, 2014
Find Lambda parameter types with serialization. Works only on serializable lambda
View FindParametersTypes.java
package avaj.lang.invoke;
import java.io.*;
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
dgageot / FindParametersTypes.java
Created Aug 19, 2014
Find Lambda parameter types
View FindParametersTypes.java
package test;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.Arrays;
import java.util.function.Function;
import static java.util.stream.Stream.of;
public class FindParametersTypes {
@dgageot
dgageot / Events.java
Created May 23, 2014
Server-sent events in fluent-http
View Events.java
new WebServer(routes -> routes
.get("/events", () -> Stream.iterate(0, (a) -> a + 1)))
.start(9090);
@dgageot
dgageot / MyModule.java
Created May 2, 2014
Guice cycle proxies
View MyModule.java
@Override
protected void configure() {
// ... insert the bindings here
binder().disableCircularProxies();
}
You can’t perform that action at this time.