Skip to content

Instantly share code, notes, and snippets.

View ghostflare76's full-sized avatar

kim hyung suk ghostflare76

View GitHub Profile
@ghostflare76
ghostflare76 / td-agent-graphite.conf
Last active February 16, 2016 07:58
fluentd config
# nginx log -> elasticsearch
# nginx log -> rabbitmq
# nginx log -> norikra -> email
# nginx log -> norikra -> elasticsearch
# spring metrcis log -> graphite
# metrics log ago
2016-02-16 06:55:15 +0900 event.log: {"date":"2016-02-16","times":"06:55:15,344","level":"INFO","type":"COUNTER","name":"gc.ps_marksweep.count","count":"2"}
2016-02-16 06:55:15 +0900 event.log: {"date":"2016-02-16","times":"06:55:15,344","level":"INFO","type":"COUNTER","name":"gc.ps_marksweep.time","count":"213"}
2016-02-16 06:55:15 +0900 event.log: {"date":"2016-02-16","times":"06:55:15,344","level":"INFO","type":"COUNTER","name":"gc.ps_scavenge.count","count":"114"}
Open Preferences (Window -> Preferences)
Browse to Java -> Editor -> Content Assist -> Favorites
Click 'New Type...'
enter org.junit.Assert
enter org.mockito.Mockito
enter org.mockito.Matchers
enter org.fest.assertions.Assertions
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:int="http://www.springframework.org/schema/integration"
xmlns:int-http="http://www.springframework.org/schema/integration/http"
xmlns:int-amqp="http://www.springframework.org/schema/integration/amqp"
xsi:schemaLocation="http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/integration/amqp http://www.springframework.org/schema/integration/amqp/spring-integration-amqp.xsd
http://www.springframework.org/schema/integration/http http://www.springframework.org/schema/integration/http/spring-integration-http.xsd">
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rabbit="http://www.springframework.org/schema/rabbit"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/rabbit http://www.springframework.org/schema/rabbit/spring-rabbit.xsd">
<rabbit:connection-factory id="connectionFactory" username="test" host="localhost" password="test" port="5672"/>
<rabbit:template id="amqpTemplate"
connection-factory="connectionFactory"
exchange="amq.topic"
routing-key="quakes.all"
package kr.co.plaync.lineage2.app.batch.rank.job;
import javax.sql.DataSource;
import org.springframework.batch.core.Job;
import org.springframework.batch.core.Step;
import org.springframework.batch.core.StepContribution;
import org.springframework.batch.core.configuration.annotation.JobBuilderFactory;
import org.springframework.batch.core.configuration.annotation.StepBuilderFactory;
import org.springframework.batch.core.scope.context.ChunkContext;
Build Trigeer Badge Plugin
JDK Parameter Plugin
Multiple SCMs plugin
Thinbackup
safe restart plugin
# Jenkins LDAP Check
java -jar jenkins-cli.jar -s YOUR_SERVER_URL login --username YOUR_LOGIN_NAME
h2.cygwin을 통해 설치시 password/group 이슈
cygwin 설치이후 신규 계정 생성시 해당 계정은 None 그룹으로 생성
이후 windows 연동시 권한 이슈가 발생됨
default group : none -> Domain Users의 groupID 변경필요 (ex:Domain Users : 1049089)
$ mkgroup -l > /etc/group : Windows local account 에서 조회후 Local Account 생성
$ mkgroup -D -S '_' >> /etc/group : Domain Controller에서 조회후 Domain Account 생성
현재 시간 기준으로 특정 시간대 시간과의 차이 구하기
- 몇 (분/시간/일/월/년)전 표기
한글로 표기시 한글팩 추가 혹은 lang 재정의
Manipulating Dates
var end = moment().subtract('minutes', 40).format();
var time = moment().format();
static class Weighting {
String name;
int weight;
public Weighting(String name, int weight) {
this.name = name;
this.weight = weight;
}