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
| /* | |
| * Copyright 2012 the original author or authors. | |
| * | |
| * Licensed 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 |
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/bash | |
| javac -cp /Users/dteo/.gradle/caches/artifacts-15/filestore/io.vertx/vertx-platform/2.0.0-SNAPSHOT/jar/aaeed5b66ffe6491ef4546a9b3ca136fc6d2c279/vertx-platform-2.0.0-SNAPSHOT.jar:/Users/dteo/.gradle/caches/artifacts-15/filestore/org.slf4j/slf4j-api/1.6.2/jar/8619e95939167fb37245b5670135e4feb0ec7d50/slf4j-api-1.6.2.jar:/Users/dteo/.gradle/caches/artifacts-15/filestore/log4j/log4j/1.2.16/bundle/7999a63bfccbc7c247a9aea10d83d4272bd492c6/log4j-1.2.16.jar:/Users/dteo/.gradle/caches/artifacts-15/filestore/io.netty/netty/3.6.2.Final/bundle/69be11c61427f0604a30539755add84ad9e37e5e/netty-3.6.2.Final.jar:/Users/dteo/.gradle/caches/artifacts-15/filestore/org.codehaus.jackson/jackson-core-asl/1.9.4/jar/8d8b2a3e5bc77ee1be67d060b44ac77d48a27d6e/jackson-core-asl-1.9.4.jar:/Users/dteo/.gradle/caches/artifacts-15/filestore/org.codehaus.jackson/jackson-mapper-asl/1.9.4/jar/5206191b35112f50b8e25fcbd3f3b84e12e11cee/jackson-mapper-asl-1.9.4.jar:/Users/dteo/.gradle/caches/artifacts-15/filestore/com.hazelcast/hazelcast/2. |
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
| // I don't believe this should be required | |
| public static MyObject hypotheticalFactoryMethod(Vertx vertx){ | |
| Vertx.container.getLogger().log("Created"); | |
| return new MyObject(); | |
| } | |
| // or even this | |
| public static MyObject hypotheticalFactoryMethod(Logger logger){ | |
| logger.log("Created"); | |
| return new MyObject(); |
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
| makePromise("Hello World") | |
| .then(new PromiseHandler<String, Character>() { | |
| @Override | |
| public Character handle(String result) { | |
| return result.charAt(0); | |
| } | |
| }, vertx) | |
| .fin(new PromiseHandler<Void, Void>() { | |
| @Override | |
| public Void handle(Void value) { |
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
| rsync -avz /path/to/local/sync/folder -e "ssh -i /path/to/ssh/key" ubuntu@ec2instance:/path/to/remote/sync/folder |
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
| import org.vertx.java.platform.PlatformLocator; | |
| import org.vertx.java.platform.PlatformManager; | |
| public class Main { | |
| public static void main(String args[]){ | |
| PlatformManager man = PlatformLocator.factory.createPlatformManager(); | |
| } | |
| } |
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
| public class Verticle { | |
| public static void main(String[] args) throws Exception { | |
| StackTraceElement[] stack = Thread.currentThread ().getStackTrace (); | |
| for(StackTraceElement e : stack) { | |
| System.out.println(e); | |
| } | |
| StackTraceElement main = stack[stack.length - 1]; | |
| String mainClass = main.getClassName (); |
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
| apply plugin: 'maven' | |
| apply plugin: 'signing' | |
| project.afterEvaluate { | |
| def release = !project.version.endsWith('-SNAPSHOT') | |
| def sonatypeUsername = project.hasProperty('sonatypeUsername') ? project.sonatypeUsername : ''; | |
| def sonatypePassword = project.hasProperty('sonatypePassword') ? project.sonatypePassword: ''; | |
| configurations { |
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
| apply plugin: 'java' | |
| repositories { | |
| mavenCentral() | |
| } | |
| dependencies { | |
| compile group: 'net.spy', name:'spymemcached', version: '2.10.3' | |
| } |
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
| repositories { | |
| mavenCentral() | |
| mavenLocal() | |
| } | |
| apply plugin: 'java' | |
| apply plugin: 'eclipse' | |
| apply from: 'gradle/sonatype.gradle' | |
| group = 'com.darylteo' |