これは Kotlin Advent Calendar の26……じゃなくて13日目です!
がんばって読んでください。読まなくても良いですけど。
public class VertxModule { | |
@Produces | |
@ApplicationScoped | |
JsonObject config() { | |
String profile = ProfileManager.getActiveProfile().toLowerCase(); | |
JsonObject vertxConfig = new JsonObject(); | |
Config config = ConfigProvider.getConfig(); | |
StreamSupport.stream(config.getConfigSources().spliterator(), false) | |
.filter(cs -> cs.getName().contains("application.properties")) |
;;; based on the discussion at https://groups.google.com/d/msg/netty/mcGswAZ5NeQ/ivG9snRSFy4J | |
(ns netty4.core | |
(:import [io.netty.bootstrap AbstractBootstrap ServerBootstrap] | |
[io.netty.channel ChannelFuture ChannelInitializer ChannelOption | |
ChannelHandlerContext ChannelInboundHandlerAdapter ChannelHandler] | |
[io.netty.handler.logging LogLevel LoggingHandler] | |
io.netty.buffer.ByteBuf | |
io.netty.channel.socket.SocketChannel | |
io.netty.channel.nio.NioEventLoopGroup |
// lib to add: http://code.google.com/p/google-gson/downloads/detail?name=google-gson-2.2.2-release.zip&can=2&q= | |
// file Main.scala | |
package demo | |
import scala.collection.JavaConverters._ | |
import com.google.gson.Gson | |
import java.util.ArrayList | |
import java.lang.reflect.Type | |
import com.google.gson.reflect.TypeToken |
これは Kotlin Advent Calendar の26……じゃなくて13日目です!
がんばって読んでください。読まなくても良いですけど。
package com.woo | |
import com.hazelcast.client.HazelcastClient; | |
import com.hazelcast.client.config.ClientConfig; | |
import com.hazelcast.client.config.ClientNetworkConfig; | |
import com.hazelcast.config.*; | |
import com.hazelcast.core.*; | |
import org.junit.Assert; | |
import org.junit.Before; | |
import org.junit.Test; |
/* | |
* Copyright (C) 2013 Square, Inc. | |
* | |
* 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 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
apply plugin: "osgi" | |
apply plugin: "java" | |
apply plugin: "maven" | |
version = "0.0.1" | |
buildscript { | |
repositories { | |
mavenCentral() | |
} |
#!/bin/bash | |
command="$1" | |
shift | |
fileSpec="$@" | |
sentinel=/tmp/t.$$ | |
touch -t197001010000 $sentinel | |
while : | |
do |
import java.io.File; | |
import java.util.ArrayList; | |
import java.util.Collection; | |
/** | |
* Script para renomear jars de releases snapshots baixados do Artifactory | |
* Possibilita time de QA rodar versão snapshot instalada da seguinte maneira | |
* java -jar instalador.jar -repo http://50.56.88.164:8080/artifactory/repo | |
* -snapshot os jars instalados vem com um timestamp adicionado ao nome e isto | |
* impossibilita a execução pois os MANIFESF.MF referenciam jars no formato |
import scala.collection.mutable.ListBuffer | |
import akka.actor.{Actor,ActorRef} | |
import akka.actor.Actor._ | |
import akka.routing.{ Listeners, Listen } | |
//Represents a domain event | |
trait Event | |
//A builder to create domain entities | |
trait EntityBuilder[Entity] { |