Skip to content

Instantly share code, notes, and snippets.

View ppeeou's full-sized avatar
🎯
Focusing

hyunwoo jo ppeeou

🎯
Focusing
View GitHub Profile
@ppeeou
ppeeou / spring utf-8 설정
Created February 19, 2017 13:32
spring utf-8 설정
<!--web.xml-->
<filter>
<filter-name>encodingFilter</filter-name>
<filter-class>
org.springframework.web.filter.CharacterEncodingFilter
</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
@ppeeou
ppeeou / spring jdbc 설정
Created February 21, 2017 13:33
spring jdbc 설정
<!-- tomcat context.xml 소스 수정 후 사용하세요 -->
<Resource auth="Container"
description="Global Address Database"
driverClassName="com.mysql.jdbc.Driver"
maxActive="8"
maxIdle="10"
maxWait="10"
name="jdbc/mysql"
password=""
type="javax.sql.DataSource"
@ppeeou
ppeeou / window crypto
Created March 25, 2017 01:40
javascript Promise
function convertStringToArrayBufferView(str){
var bytes = new Uint8Array(str.length);
for(var iii = 0 ; iii<str.lenght;iii++){
bytes[iii] = str.charCodeAt(iii);
}
@ppeeou
ppeeou / grid.css
Created April 4, 2017 01:22
grid.css
/* SECTIONS ============================================================================= */
.section {
clear: both;
padding: 0px;
margin: 0px;
}
/* GROUPING ============================================================================= */
@ppeeou
ppeeou / js Handler event
Created April 7, 2017 07:43
js Handler event
<!DOCTYPE>
<html>
<head>
</head>
<body>
<div id="div1">div1</div>
<div id="div2">div2</div>
<div id="div3">div3</div>
<div id="div4">div4</div>
<div id="div5">div5</div>
@ppeeou
ppeeou / Nodejs 파일읽고 정규식사용
Last active April 11, 2017 06:06
Nodejs File Read 정규식표현 적용
var fs = require('fs');
var es = require('event-stream');
var url = './data/smartIndoorAPI/';
var REGEX = /branchEventList/g;
fs.readdir(url, function (err, files) {
if (err) throw err;
files.forEach(function (file) {
var cnt = 0;
@ppeeou
ppeeou / pipeline
Last active April 14, 2017 23:46
pipeline 사용법
_.pipeline = function () {
var funs = arguments;
return function (seed) {
return _.reduce(funs, function (l, r) { return r(l); }
, seed);
}
};
@ppeeou
ppeeou / functional
Last active August 11, 2017 14:09
functional
var _ = {};
var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1;
function getLength(array) {
return array == null ? void 0 : array.length;
}
function isArrayLike(array) {
var length = getLength(array);
@ppeeou
ppeeou / python map,filter,each
Created July 5, 2017 00:34
python map,filter,each
def _each(list, iter):
for i in range(len(list)):
iter(list[i], i)
def _map(list, iter):
new_list = []
_each(list, lambda v, i: new_list.append(iter(v)))
return new_list
@ppeeou
ppeeou / python decorator ex
Created July 11, 2017 00:25
python decorator ex
# Decorators
def my_logger(orig_func):
import logging
logging.basicConfig(filename='{}.log'.format(orig_func.__name__),level=logging.INFO)
def wrapper(*args,**kwargs):
logging.info(
'Ran with args : {} , and kargs : {}'.format(args,kwargs)
)