Skip to content

Instantly share code, notes, and snippets.

View dsdstudio's full-sized avatar
๐ŸŽน
Focusing

Bohyung kim dsdstudio

๐ŸŽน
Focusing
View GitHub Profile
@dsdstudio
dsdstudio / build.gradle
Created November 19, 2013 08:46
gradle javadoc ํ•œ๊ธ€๊นจ์ง๋ฌธ์ œ ํ•ด๊ฒฐ
javadoc {
options.addStringOption("locale","ko_KR");
options.addStringOption("encoding","UTF-8");
options.addStringOption("charset","UTF-8");
options.addStringOption("docencoding","UTF-8");
}
@dsdstudio
dsdstudio / node-java-tcp-integer-write.js
Created December 30, 2013 03:19
Nodejs buffer -> java network tcp communication nodejs buffer 4byte int write
var buf = new Buffer(4);
var num = 171;
buf.writeInt32BE(num, 0);
console.log(buf); // 00 00 00 ab
buf.writeInt32LE(num, 0);
console.log(buf); // ab 00 00 00
@dsdstudio
dsdstudio / pom.xml
Created December 30, 2013 08:42
maven-shade-plugin no dependency-reduced-pom generated
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
@dsdstudio
dsdstudio / gist:8539151
Created January 21, 2014 12:30
redis client test
// redis-cli.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <stdio.h>
#define REDIS_PORT 6379
#define REDIS_HOST "127.0.0.1"
#define RedisAskingPriceTable "stockrules_recently_ap"
#define RedisMarketPriceTable "stockrules_recently_mp"

Docker ์น˜ํŠธ ์‹œํŠธ

์™œ Docker๋ฅผ ์‚ฌ์šฉํ•ด์•ผํ•˜๋Š”๊ฐ€?

Why Should I Care (For Developers)

"๋‚˜์—๊ฒŒ Docker์˜ ๋งค๋ ฅ์€ ๊ฐ„๋‹จํžˆ ๊ฒฉ๋ฆฌ๋œ ํ™˜๊ฒฝ์„ ๋งŒ๋“ค ์ˆ˜ ์žˆ๋‹ค๋Š” ๊ฒƒ๊ณผ, ๊ทธ๋Ÿฌํ•œ ํ™˜๊ฒฝ์„ ์žฌ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค๋Š” ์ ์ด๋‹ค."๋Ÿฐํƒ€์ž„ ํ™˜๊ฒฝ์„ ํ•œ ๋ฒˆ ๋งŒ๋“ค์–ด ํŒจํ‚ค์ง€๋กœ ๋งŒ๋“ค๋ฉด, ์ด ํŒจํ‚ค์ง€๋ฅผ ๋‹ค๋ฅธ ์–ด๋–ค ๋จธ์‹ ์—์„œ๋„ ๋‹ค์‹œ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค. ๋˜ํ•œ ์—ฌ๊ธฐ์„œ ์‹คํ–‰๋˜๋Š” ๋ชจ๋“  ๊ฒƒ์€ ๋งˆ์น˜ ๊ฐ€์ƒ๋จธ์‹ ๊ณผ ๊ฐ™์ด ํ˜ธ์ŠคํŠธ๋กœ๋ถ€ํ„ฐ ๊ฒฉ๋ฆฌ๋˜์–ด์žˆ๋‹ค. ๋ฌด์—‡๋ณด๋‹ค๋„ ์ด๋Ÿฐ ๋ชจ๋“  ์ผ๋“ค์ด ๋น ๋ฅด๊ณ  ๊ฐ„๋‹จํžˆ ๊ฐ€๋Šฅํ•˜๋‹ค.

TL;DR, ์ง€๊ธˆ ๋ฐ”๋กœ Docker ๊ฐœ๋ฐœ ํ™˜๊ฒฝ ๊ตฌ์ถ•ํ•˜๊ธฐ

var point, pointStartX, pointStartY, deltaX, deltaY;
var scroller = new iScroll('scrollerId', {
vScroll: false,
vScrollbar: false,
hScrollbar: false,
snap: 'li',
momentum: false,
onBeforeScrollStart: function(e) {
point = e.touches[0];
pointStartX = point.pageX;
@dsdstudio
dsdstudio / sha512.java
Last active February 7, 2021 03:00
java sha-512 encryption
/**
* sha512 ๋ฐฉ์‹์œผ๋กœ ์•”ํ˜ธํ™”ํ•œ ์ŠคํŠธ๋ง์„ ๋ฆฌํ„ดํ•œ๋‹ค
*
* @param target
* @return [encrypted string]
*/
public final static String encryptSHA512(String target) {
try {
MessageDigest sh = MessageDigest.getInstance("SHA-512");
sh.update(target.getBytes());
@dsdstudio
dsdstudio / d3-doughnutchart.js
Created March 4, 2014 18:51
D3๋ฅผ ์ด์šฉํ•œ ๋„๋„› ์ฐจํŠธ์™€ ๋ ˆ์ „๋“œ
var data = [{
title: "KOSPI",
jisu: "1,965",
change: 3.22,
percent: "0.22%",
collections: [{
l: "์ƒํ•œ",
v: 5
}, {
l: "์ƒ์Šน",
@dsdstudio
dsdstudio / d3-horizontal-barchart.js
Last active August 29, 2015 13:57
d3 ๋ฐ”์ฐจํŠธ ํ”„๋กœํ† ํƒ€์ดํ•‘
var data = [
{l:"๊ฐœ์ธ", v:55, t:1},
{l:"๊ธฐ๊ด€", v:343, t:2},
{l:"์™ธ์ธ", v:332, t:1}
];
var margin = {top: 20, right: 20, bottom: 30, left: 40};
var w = 500;
var h = 80 - margin.bottom - margin.top;
var barWidth = w / data.length;