This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package info.usmans.blog.vertx | |
import org.eclipse.jgit.api.Git | |
import org.eclipse.jgit.revwalk.RevCommit | |
import org.eclipse.jgit.transport.UsernamePasswordCredentialsProvider | |
import java.io.File | |
internal const val GIST_REPO_URL = "https://gist.github.com/someid.git" | |
fun gitCredentialProvider(gistToken: String = System.getenv("GITHUB_GIST_TOKEN")) = UsernamePasswordCredentialsProvider(gistToken, "") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
# sh run-blog.sh start|stop | |
PIDFILE="/root/blog.pid" | |
JAVA_HOME="/opt/jdk" | |
JARFILE="/root/uzi-vertx-shadow.jar" | |
case $1 in | |
start) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package info.usmans.blog.vertx.examples | |
import io.vertx.core.AbstractVerticle | |
import io.vertx.core.Vertx | |
import io.vertx.core.http.HttpClient | |
import io.vertx.core.http.WebSocketFrame | |
import io.vertx.core.json.JsonObject | |
fun main(args: Array<String>) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package info.usmans.blog.example | |
import io.vertx.core.AbstractVerticle | |
import io.vertx.core.Vertx | |
import io.vertx.core.net.NetClientOptions | |
fun main(args: Array<String>) { | |
Vertx.vertx().deployVerticle(NetClientExample()) | |
println("Running NetClientExample!") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plugins { | |
id 'io.vertx.vertx-plugin' version "0.0.6" | |
id "org.jetbrains.kotlin.jvm" version "1.2.10" | |
} | |
repositories { | |
jcenter() | |
} | |
dependencies { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.gradle | |
build/ | |
out/ | |
logs/ | |
# Ignore Gradle GUI config | |
gradle-app.setting | |
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored) | |
!gradle-wrapper.jar |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package info.usmans.blog.vertx | |
import io.vertx.core.AbstractVerticle | |
import io.vertx.core.Vertx | |
import io.vertx.core.net.NetClient | |
import io.vertx.core.net.NetClientOptions | |
import org.slf4j.LoggerFactory | |
fun main(args: Array<String>) { | |
//hack for windows - netty cause dns resolver error |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<configuration> | |
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> | |
<file>logs/vertx-net-client.log</file> | |
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> | |
<!-- daily rollover --> | |
<fileNamePattern>logs/vertx-net-client.%d{yyyy-MM-dd}.log</fileNamePattern> | |
<!-- keep 30 days' worth of history capped at 3GB total size --> | |
<maxHistory>30</maxHistory> | |
<totalSizeCap>3GB</totalSizeCap> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<configuration> | |
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> | |
<file>logs/vertx-net-server.log</file> | |
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> | |
<!-- daily rollover --> | |
<fileNamePattern>logs/vertx-net-client.%d{yyyy-MM-dd}.log</fileNamePattern> | |
<!-- keep 30 days' worth of history capped at 3GB total size --> | |
<maxHistory>30</maxHistory> | |
<totalSizeCap>3GB</totalSizeCap> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plugins { | |
id 'io.vertx.vertx-plugin' version "0.0.6" | |
id "org.jetbrains.kotlin.jvm" version "1.2.10" | |
} | |
repositories { | |
jcenter() | |
} | |
dependencies { |