Skip to content

Instantly share code, notes, and snippets.

View cescoffier's full-sized avatar
⚗️
Quarking...

Clement Escoffier cescoffier

⚗️
Quarking...
View GitHub Profile
@cescoffier
cescoffier / create-project-cli.sh
Last active August 30, 2016 05:57
Simple scripts to generate Vert.x projects
#!/usr/bin/env bash
export PROJECT_NAME="vertx-starter"
# Read project name
read -p "What's the name of your project? [$PROJECT_NAME] : " projectName
if [ ${#projectName} -ge 1 ]; then PROJECT_NAME=$projectName;
fi
echo "Cloning project"
@cescoffier
cescoffier / pom.xml
Created June 16, 2016 15:53
Vert.x applications on openshift: shade, fabric8
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.redhat.developers.reactive-msa</groupId>
<artifactId>hello</artifactId>
<version>0.0.1-SNAPSHOT</version>
package io.vertx.example.microservices.conf;
import io.vertx.core.AbstractVerticle;
import io.vertx.core.json.JsonObject;
import java.util.Map;
import java.util.Objects;
import java.util.Properties;
/**
@cescoffier
cescoffier / sonar.conf
Last active May 24, 2017 05:03
nginx server proxy for Sonar
server {
server_name sonar.dynamis-technologies.com;
location / {
proxy_pass http://localhost:12356;
proxy_set_header Host $host;
proxy_buffering off;
}
}
@cescoffier
cescoffier / Vagrantfile
Last active January 20, 2016 15:45
Vagrant file to use with temporary Windows VM and scripts
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "vertx/win10"
config.vm.box_url = "http://209.132.178.63/vagrant/Win10.box"
# big timeout since windows boot is very slow
config.vm.boot_timeout = 500
@cescoffier
cescoffier / VertxMatcherAssert.java
Created January 15, 2016 09:14
Provide `assertThat` method that can be used with Vert.x Unit.
package io.vertx.unit.example;
import io.vertx.ext.unit.TestContext;
import org.hamcrest.Description;
import org.hamcrest.Matcher;
import org.hamcrest.StringDescription;
/**
* Provides {@code assertThat} methods usable with Vertx-Unit.
*/
//
// vert.x stack descriptor
//
// To add a dependency:
// - if the dependency is already listed, just set `included` to `true`
// - if not, add the dependency using the Maven coordinates, and set `included` to `true`
//
// You can also set `exclusions` and whether or not the dependency need to resolve its transitive dependencies.
//
// Then launch the resolution process with: vertx resolve --dir=lib --stack=./vertx-stack.json
#
# vert.x stack descriptor
#
# To add a dependency:
# - if the dependency is already listed, just set `included` to `true`
# - if not, add the dependency using the Maven coordinates, and set `included` to `true`
#
# You can also set `exclusions` and whether or not the dependency need to resolve its transitive dependencies.
#
# Then launch the resolution process with: vertx resolve --dir=lib --stack=./vertx-stack.yaml
@cescoffier
cescoffier / parent.xml
Last active October 29, 2015 13:58
Pom with docker
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>io.vertx.devoxx</groupId>
<artifactId>micro-service-workshop</artifactId>
<version>1.0-SNAPSHOT</version>

vert-x3/vertx-mongo-client