Skip to content

Instantly share code, notes, and snippets.

Avatar
🏔️
Dreaming of mountains

Michel Krämer michel-kraemer

🏔️
Dreaming of mountains
View GitHub Profile
@michel-kraemer
michel-kraemer / VertxTrailerTest.java
Created Jul 27, 2018
This class demonstrates a bug (?) in Vert.x 3.5.3 that happens if GZIP is enabled and HTTP trailers are sent
View VertxTrailerTest.java
package main;
import io.vertx.core.Vertx;
import io.vertx.core.http.HttpClient;
import io.vertx.core.http.HttpClientOptions;
import io.vertx.core.http.HttpClientRequest;
import io.vertx.core.http.HttpServer;
import io.vertx.core.http.HttpServerOptions;
import io.vertx.core.http.HttpServerResponse;
@michel-kraemer
michel-kraemer / download-bug.patch
Created Feb 13, 2017
Patch for mikesnare download-bug repo
View download-bug.patch
diff --git a/child/build.gradle b/child/build.gradle
index 83788da..a4b77c7 100644
--- a/child/build.gradle
+++ b/child/build.gradle
@@ -6,7 +6,7 @@
//plugins {
// id "de.undercouch.download" version "3.2.0"
//}
-//import de.undercouch.gradle.tasks.download.Download
+import de.undercouch.gradle.tasks.download.Download
@michel-kraemer
michel-kraemer / test.fo
Created Nov 28, 2016
FOP image at top of page test
View test.fo
<?xml version="1.0" encoding="UTF-8"?>
<fo:root font-size="11pt" language="en" line-height="normal" line-height-shift-adjustment="disregard-shifts" text-align="justify" writing-mode="lr-tb" xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="content" page-height="297mm" page-width="210mm">
<fo:region-body>
</fo:region-body>
<fo:region-before extent="1in">
</fo:region-before>
</fo:simple-page-master>
</fo:layout-master-set>
@michel-kraemer
michel-kraemer / BenchmarkActsonNoCopyBuffer.groovy
Created Oct 3, 2016
Benchmark testing Acton's DefaultJsonFeeder vs. a FastFeeder that doesn't need to copy bytes
View BenchmarkActsonNoCopyBuffer.groovy
@Grab(group='de.undercouch', module='actson', version='1.1.0')
class Dummy {}
import de.undercouch.actson.JsonEvent
import de.undercouch.actson.JsonFeeder
import de.undercouch.actson.JsonParser
import java.nio.ByteBuffer
import java.nio.CharBuffer
import java.nio.charset.CharacterCodingException
import java.nio.charset.CharsetDecoder
@michel-kraemer
michel-kraemer / es7verticle.ts
Created Jan 3, 2016
ECMAScript 6/7 on the JVM with TypeScript and Vert.x
View es7verticle.ts
/// <reference path="./vertx-js/vertx.d.ts" />
// arrow functions ********************************************* [1]
vertx.createHttpServer().requestHandler(request => {
// block-scoped variables (let keyword) ********************** [2]
let response = request.response();
response.setChunked(true);
// default parameter ***************************************** [3]
function send(msg = "NOOP") {
You can’t perform that action at this time.