This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: "osgi" | |
apply plugin: "java" | |
apply plugin: "maven" | |
version = "0.0.1" | |
buildscript { | |
repositories { | |
mavenCentral() | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* FileUploadLibrary | |
* @since 2014.07.24 | |
* by Bohyung kim a.k.a dsdstudio ( dsdgun@gmail.com, http://blog.dsdstudio.net ) | |
* { | |
* el:'#element', // ElementSelector | |
* responseConverter:function(data) // default -> json converter | |
* actionUrl:'upload', // Action URL, default value => form.action | |
* success: function(data){}, // success callback | |
* error: function(err) {}, // error callback |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
########################################### | |
# RAW Image to jpeg conversion script # | |
# for Mac OSX # | |
# author : <Bohyung kim> dsdgun@gmail.com # | |
########################################### | |
__pwd="${PWD}" | |
__exec_sips=`which sips` | |
__rawfile_pattern="nef|cr2|rw2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -name *.java -exec wc -l {} \; | awk '{sum+=$0} END {printf "%d Line of code \n", sum}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ObjectMapper mapper = new ObjectMapper(); | |
JsonNode decodedNode = mapper.readTree(f); | |
if (decodedNode instanceof ObjectNode) { | |
((ObjectNode) decodedNode.with("networkInfo")).put("realip", remoteRealIP); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var regmap = { | |
nonargfuncreg:/(function)\s(\w*)\s\(\){/, | |
fnargreg:/(function)\s(\w*)\s\(([a-zA-Z,]*)\){/ | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
########################################### | |
# Linux/Unix Daemon control script # | |
# @author : Bohyung kim<dsdgun@gmail.com> # | |
# @since : 2013.06.06 # | |
########################################### | |
# 기본경로는 현재 위치지만 따로 설정할수도 있다. | |
__workdir=`pwd` | |
# application 이름 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.*; | |
import java.net.Socket; | |
import java.nio.ByteBuffer; | |
import java.nio.ByteOrder; | |
import java.util.ArrayList; | |
import java.util.Collection; | |
import java.util.Collections; | |
import java.util.List; | |
import java.util.concurrent.ExecutorService; | |
import java.util.concurrent.Executors; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for (String s : Files.readAllLines(Paths.get(file.getAbsolutePath()), StandardCharsets.UTF_8)) | |
buffer.append(s); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<project> | |
<build> | |
<plugins> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-compiler-plugin</artifactId> | |
<version>2.5.1</version> | |
<configuration> | |
<source>${java-version}</source> | |
<target>${java-version}</target> |