Skip to content

Instantly share code, notes, and snippets.

Avatar
🎹
Focusing

Bohyung kim dsdstudio

🎹
Focusing
View GitHub Profile
View GenericArgumentTest.java
import java.util.List;
import java.util.Collections;
public class GenericArgumentTest {
List<String> tokenList;
public void setTokenList(List<String> tokenList){
this.tokenList = tokenList;
}
@dsdstudio
dsdstudio / hack.sh
Created Apr 8, 2012 — forked from erikh/hack.sh
OSX For Hackers
View hack.sh
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@dsdstudio
dsdstudio / JarManifestTest.java
Created Apr 26, 2012
extract manifest from url stream
View JarManifestTest.java
package test;
import org.hamcrest.core.Is;
import org.junit.Test;
import java.net.JarURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Map;
import java.util.jar.Attributes;
View TimeZoneTest.java
package test;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.SimpleTimeZone;
import java.util.TimeZone;
import org.junit.Test;
public class TimeZoneTest {
View gist:3180782
public class ImageChartException extends Exception {
private static final long serialVersionUID = 2058807664126002021L;
public static final int DATAEXCEPTION = 0;
public static final int STATEEXCEPTION = 1;
private Integer type = DATAEXCEPTION;
public ImageChartException(Integer t) {
this.type = t;
}
@dsdstudio
dsdstudio / SocketClientHandler.java
Created Oct 4, 2012
Netty 대용량파일 전송
View SocketClientHandler.java
package net.dsdstudio.sharebox.client;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
import org.jboss.netty.channel.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.File;
import java.io.RandomAccessFile;
View LargeDataChunkDecoder.java
package net.dsdstudio.sharebox.server.socket;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.channel.Channel;
import org.jboss.netty.channel.ChannelHandlerContext;
import org.jboss.netty.handler.codec.replay.ReplayingDecoder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
@dsdstudio
dsdstudio / build.gradle
Created Dec 2, 2012
Gradle non-recursive dependency
View build.gradle
configurations {
wenest
}
dependencies {
wenest('com.wenest.core:wenest-core-userdefined-module-register:0.0.1-SNAPSHOT') {
transitive = false
}
}
jar {
View dependency.gradle
/**
* SNAPSHOT repository 에있는 artifact 같은버전을 여러번 참조하는경우 <br />
* 못 가져오는경우도 있을수 있으므로 cache expired 를 1초로 세팅한다.
*/
configurations.all {
resolutionStrategy.cacheChangingModulesFor 1, 'seconds'
}
View wardeploy.gradle
task deployToDevEnvironment(type:Copy, dependsOn:['clean','war']) {
def targetDir = file('your_deployment_target_path')
from zipTree(file(war.archivePath))
into targetDir
}