Skip to content

Instantly share code, notes, and snippets.

@grimrose
grimrose / build.gradle
Last active August 29, 2015 13:57
#yokohamagroovy #22
buildscript {
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
classpath group: 'com.danveloper', name: 'provisioning-gradle-plugin', version: '0.1-SNAPSHOT'
}
}
@grimrose
grimrose / vertx_client.rb
Created March 19, 2014 16:07
Vert.xからfluent-plugin-websocketへ繋げる為のVert.x client #shibuyarb
require "vertx"
client = Vertx::HttpClient.new
client.host = 'localhost'
client.port = 9000
client.connect_web_socket('/') do |websocket|
websocket.data_handler do |buffer|
puts "received: #{buffer}"
res ={:status => 'ok', :data => buffer}
@grimrose
grimrose / HelloWorldServer.scala
Created March 24, 2014 11:57
#yurufuwa_scala
import org.vertx.scala.core.http.HttpServerRequest
import org.vertx.scala.platform.Verticle
import java.util.Date
import org.vertx.scala.core.json.Json
class HelloWorldServer extends Verticle {
override def start() {
vertx.createHttpServer().requestHandler {
apply plugin: 'java'
apply plugin: 'idea'
/*
repositories {
mavenCentral()
}
dependencies {
compile 'org.apache.camel:camel-core:2.13.0'
compile 'org.slf4j:slf4j-simple:1.7.6'
@grimrose
grimrose / yokohama_groovy_23.md
Last active August 29, 2015 14:00
#yokohamagroovy #23
@grimrose
grimrose / demo_server.js
Created April 28, 2014 09:38
Nodyn on web server
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n');
}).listen(1337, '127.0.0.1');
var vertx = require('vertx');
vertx.createHttpServer().requestHandler(function(req) {
req.response.headers['Content-Type'] = "text/plain";
req.response.statusCode(200).end("Hello World");
@grimrose
grimrose / yokohama_groovy_24.md
Last active August 29, 2015 14:02
#yokohamagroovy #24
@grimrose
grimrose / yokohama_groovy_26.md
Last active August 29, 2015 14:04
#yokohamagroovy #26