Skip to content

Instantly share code, notes, and snippets.

View benelog's full-sized avatar

Sanghyuk Jung benelog

View GitHub Profile
@benelog
benelog / AppTests.java
Created February 12, 2014 21:35
test gist
package com.springapp.mvc;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import org.springframework.test.web.servlet.MockMvc;
@benelog
benelog / inject-context.xml
Created February 20, 2014 21:26
Spring xml config files
<util:constant id="clob" static-field="java.sql.Types.CLOB"/>
<bean id="repository" class="org.springframework.batch.core.repository.support.JobRepositoryFactoryBean"" p:clobType-ref="clob"/>
@benelog
benelog / application.yml
Last active August 29, 2015 14:02
spring-boot example
spring:
view:
prefix: /WEB-INF/view/
suffix: .jsp
server:
tomcat:
uri-encoding : UTF-8
@benelog
benelog / 2014.md
Last active August 29, 2015 14:03
Google io
import static java.nio.file.StandardWatchEventKinds.*;
import java.io.IOException;
import java.net.URL;
import java.nio.file.FileSystems;
import java.nio.file.FileVisitResult;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.SimpleFileVisitor;
@benelog
benelog / preview.js
Created July 15, 2014 10:19
phatom.js
var server = require('webserver').create();
var service = server.listen(18080, function (request, response) {
var params = parseQueryString(request.url);
render(params.address, params.output);
response.statusCode = 200;
response.write("<html><body>");
response.write("<p>" + params.output + " writed! </p>");
@benelog
benelog / install.sh
Last active August 29, 2015 14:06
철도예약
git clone git://github.com/carpedm20/korail2.git
cd korail2
python setup.py install

1. Spring XD 설치

wget http://repo.spring.io/release/org/springframework/xd/spring-xd/1.0.1.RELEASE/spring-xd-1.0.1.RELEASE-dist.zip
unzip spring-xd-1.0.1.RELEASE-dist.zip
cd spring-xd-1.0.1.RELEASE/

이하 모든 경로는 위의 마지막 디렉토리를 기준으로 함.

2. JDBC Driver 다운로드

쓰고 싶은 DB의 JDBC드라이버를 다운로드해서 xd/lib 폴더에 복사. 여기서는 H2 DB를 사용함.

@benelog
benelog / xrebel.md
Created November 7, 2014 04:58
Xrebel

export MAVEN_OPTS="-javaagent:/home/benelog/programs/xrebel/xrebel.jar -noverify"