Skip to content

Instantly share code, notes, and snippets.

@Jotschi
Jotschi / HandlebarsExample.java
Created April 18, 2019 21:44
HandlebarsExample Vert.x Example
public class HandlebarsExample extends AbstractVerticle {
@Override
public void start(Future<Void> startFuture) throws Exception {
HttpServerOptions options = new HttpServerOptions();
options.setPort(9999);
HttpServer server = vertx.createHttpServer(options);
Router router = Router.router(vertx);
HandlebarsTemplateEngine engine = HandlebarsTemplateEngine.create(vertx);
Executing [
/opt/jvm/graalvm-1.0.0-rc1/bin/java \
-Xbootclasspath/a:/opt/jvm/graalvm-1.0.0-rc1/jre/lib/boot/graal-sdk.jar:/opt/jvm/graalvm-1.0.0-rc1/jre/lib/boot/graaljs-scriptengine.jar \
-cp \
/opt/jvm/graalvm-1.0.0-rc1/jre/lib/svm/builder/objectfile.jar:/opt/jvm/graalvm-1.0.0-rc1/jre/lib/svm/builder/pointsto.jar:/opt/jvm/graalvm-1.0.0-rc1/jre/lib/svm/builder/svm.jar:/opt/jvm/graalvm-1.0.0-rc1/jre/lib/jvmci/graal.jar:/opt/jvm/graalvm-1.0.0-rc1/jre/lib/jvmci/jvmci-hotspot.jar:/opt/jvm/graalvm-1.0.0-rc1/jre/lib/jvmci/jvmci-api.jar \
-server \
-d64 \
-noverify \
-XX:+UnlockExperimentalVMOptions \
-XX:+EnableJVMCI \
@Jotschi
Jotschi / PumpTest.java
Created December 21, 2017 19:55
Vert.x 3.5.0 RxJava2 PumpTest
import static org.junit.Assert.assertEquals;
import java.io.File;
import java.io.IOException;
import org.apache.commons.io.FileUtils;
import org.junit.Test;
import io.reactivex.Observable;
import io.vertx.core.file.OpenOptions;
@Jotschi
Jotschi / ServerWSTest.java
Created November 29, 2017 18:49
Vert.x 3.5.0 Websocket Regression Reproducer
import io.vertx.core.AbstractVerticle;
import io.vertx.core.Future;
import io.vertx.core.Vertx;
import io.vertx.core.http.HttpClient;
import io.vertx.core.http.HttpClientOptions;
import io.vertx.core.http.HttpServer;
import io.vertx.core.http.HttpServerOptions;
import io.vertx.core.json.JsonObject;
import io.vertx.ext.bridge.PermittedOptions;
version: '3.1'
services:
mesh:
image: gentics/mesh-demo
ports:
- 8080:8080
@Jotschi
Jotschi / translationTable.ts
Created September 28, 2017 14:16
Mesh UI Translations
module meshAdminUi {
const userAuth = {
'LOG_IN': {
en: 'Log In',
de: 'Einloggen'
},
'LOG_OUT': {
en: 'Log Out',
de: 'Ausloggen'
@Jotschi
Jotschi / nodeA.log
Created August 24, 2017 13:48
ODB Issue 9219
This file has been truncated, but you can view the full file.
2017-08-24 15:42:38:846 INFO OrientDB auto-config DISKCACHE=14,292MB (heap=14,292MB direct=14,292MB os=64,307MB) [OMemoryAndLocalPaginatedEnginesInitializer]
2017-08-24 15:42:38:847 INFO Lowering disk cache size from 14,292MB to 14,290MB. [OGlobalConfiguration]Adding vertex type for class {Root}
2017-08-24 15:42:39:186 FINE {db=storage} Created cluster 'internal' in database '/home/johannes2/workspace_mesh/orientdb-cluster-test/servers/target/data1/graphdb/storage' with id 0. Clusters: [plocal cluster: internal] [OLocalPaginatedStorage]
2017-08-24 15:42:39:189 FINE {db=storage} Created record #0:0 v.1 size=4 bytes (thread=1 tx=false) [OLocalPaginatedStorage]
2017-08-24 15:42:39:219 FINE {db=storage} Created cluster 'index' in database '/home/johannes2/workspace_mesh/orientdb-cluster-test/servers/target/data1/graphdb/storage' with id 1. Clusters: [plocal cluster: internal, plocal cluster: index] [OLocalPaginatedStorage]
2017-08-24 15:42:39:241 FINE {db=storage} Created cluster 'manindex' in database '/
@Jotschi
Jotschi / main.java
Last active March 7, 2017 19:12
Mesh Vert.x Example
public static void main(String[] args) {
VertxOptions options = new VertxOptions();
Vertx vertx = Vertx.vertx(options);
vertx.deployVerticle(new Server());
}
@Jotschi
Jotschi / base.njk
Last active February 1, 2017 12:21
Gentics Mesh Express Example
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/css/bootstrap.min.css">
<meta charset="UTF-8">
<title>Gentics Mesh Demo</title>
<style>
.row.products > div {
height: 500px
}
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [QSA,L]