Skip to content

Instantly share code, notes, and snippets.

View keesun's full-sized avatar
📺
On Air

Keesun Baik (a.k.a, Whiteship) keesun

📺
On Air
View GitHub Profile
@keesun
keesun / ApiClientUtils.java
Last active February 17, 2021 10:09
API 서버 사용 예제 코드
package herma.common;
import org.codehaus.jackson.map.ObjectMapper;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.web.client.RestTemplate;
import java.io.IOException;
import java.nio.charset.Charset;
#!/bin/bash
##########################################################
## Simple script to get maven dependency tree ##
## @author Lee, SeongHyun (Kevin) ##
## @veraion 0.0.1 (2013-01-17) ##
## ##
## To change the option 'include' and 'output', change ##
## the values of INCLUDE_NAME and OUTPUT_NAME ##
## respectively. ##
## e.g.) to change 'include' to 'inc' and 'output' to ##
import org.vertx.java.core.Handler;
import org.vertx.java.core.eventbus.Message;
import org.vertx.java.deploy.Verticle;
import java.util.concurrent.atomic.AtomicLong;
/**
* @author <a href="http://tfox.org">Tim Fox</a>
*/
public class Manager extends Verticle {
package sandbox;
import com.sun.xml.internal.ws.policy.privateutil.PolicyUtils;
import org.junit.Test;
import java.util.ArrayList;
import java.util.List;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
package sclass
/**
* @author Keesun Baik
*/
class AntProgression {
def next(num: String): String = {
val charList: List[Char] = num.toList
var nums: Map[Char, Int] = Map()
@keesun
keesun / Test.java
Created September 5, 2012 09:03
Vert.x VS Node.js performance
import org.vertx.java.core.Handler;
import org.vertx.java.core.http.HttpServer;
import org.vertx.java.core.http.HttpServerRequest;
import org.vertx.java.deploy.Verticle;
/**
* @author Keesun Baik
*/
public class Test extends Verticle {
@Override
@keesun
keesun / HelloVertxModule.java
Created August 27, 2012 13:25
Sample vert.x module
package me.whiteship;
import org.vertx.java.core.Handler;
import org.vertx.java.core.http.HttpServer;
import org.vertx.java.core.http.HttpServerRequest;
import org.vertx.java.core.http.HttpServerResponse;
import org.vertx.java.deploy.Verticle;
/**
* @author Keesun Baik
@keesun
keesun / SocketIoServerTest.java
Created August 27, 2012 09:48
Socket.IO Module for Vert.x Sample Code
package com.nhncorp.test;
import com.nhncorp.mods.socket.io.SocketIOServer;
import com.nhncorp.mods.socket.io.SocketIOSocket;
import com.nhncorp.mods.socket.io.impl.DefaultSocketIOServer;
import org.vertx.java.busmods.BusModBase;
import org.vertx.java.core.Handler;
import org.vertx.java.core.http.HttpServer;
import org.vertx.java.core.impl.VertxInternal;
import org.vertx.java.core.json.JsonObject;
@keesun
keesun / RegexUtils.java
Created August 7, 2012 09:53
Fucking Java Matcher & String class. Please add this method to String class.
/**
* @author Keesun Baik
*/
public class RegexUtils {
public static String[] match(String input, String regexp) {
Matcher matcher = Pattern.compile(regexp).matcher(input);
String[] results = new String[matcher.groupCount() + 1];
@keesun
keesun / WebConfig.java
Created April 27, 2012 11:13
adding thymeleaf to spring
// ****************************************************************
// ViewResolver for the Thymeleaf
// ****************************************************************
@Bean
public ThymeleafViewResolver viewResolver(){
ThymeleafViewResolver viewResolver = new ThymeleafViewResolver();
viewResolver.setTemplateEngine(thymeleafEngine());
return viewResolver;
}