Skip to content

Instantly share code, notes, and snippets.

View thirdj's full-sized avatar

Choi, Jaehee thirdj

View GitHub Profile
@thirdj
thirdj / extensions.js
Created November 11, 2011 02:41 — forked from firejune/extensions.js
The minimap provides you with a new way to visualize your site.
/** pQuery! LOL **/
Object.extend($, Prototype);
Object.extend($, Object);
/**
* Returns window dimensions and scroll positions
* @author Firejune<to@firejune.com>
* @license MIT
*/
@thirdj
thirdj / gist:3485022
Created August 27, 2012 02:04 — forked from hileon/gist:1311735
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Windows)

General

Ctrl+KB toggle side bar
Ctrl+Shift+P command prompt
Ctrl+` python console
Ctrl+N new file

Editing

@thirdj
thirdj / gist:4618056
Last active December 11, 2015 14:59
1000 comma
// 1000 단위 콤마
function addThousandSeparatorCommas(num) {
return num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
}
@thirdj
thirdj / gist:4630783
Created January 25, 2013 01:29
javascript trim, ltrim, rtrim
String.prototype.trim = function() {
return this.replace(/^\s*-,"").replace(/\s*$/, "");
};
String.prototype.ltrim = function() {
return this.replace(/^\s+/, "");
};
String.prototype.rtrim = function() {
return this.replace(/\s+$/, "");
@thirdj
thirdj / gist:4719507
Created February 6, 2013 01:48
그 달의 마지막 날 구하기
var start = new Date();
start.setMonth(start.getMonth()+1);
start.setTime(start.getTime()-1);
var lastDay = new Date(start.getYear(),start.getMonth(),'');
lastDay = lastDay.getDate();
console.log(lastDay);
@thirdj
thirdj / jQueryVersion.js
Created April 5, 2013 04:43
jquery version find
console.log('$().jquery : ', $().jquery);
console.log('$.fn.jquery : ', $.fn.jquery);
@thirdj
thirdj / hangul.js
Created April 8, 2013 01:33
한글 초성, 중성, 종성 구분하기
/**
초성 중성 종성 분리 하기
유니코드 한글은 0xAC00 으로부터
초성 19개, 중상21개, 종성28개로 이루어지고
이들을 조합한 11,172개의 문자를 갖는다.
한글코드의 값 = ((초성 * 21) + 중성) * 28 + 종성 + 0xAC00
(0xAC00은 'ㄱ'의 코드값)
@thirdj
thirdj / html5_template.html
Created April 9, 2013 03:13
HTML5 Basic Template
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
<title> add title </title>
<link rel="stylesheet" href="/stylesheet/style.css" />
</head>
<body>
@thirdj
thirdj / css_reset.css
Created April 9, 2013 03:24
CSS Reset
@charset "utf-8";
/* *********************************************
* Author: Choi, Jaehee, WebTeam.
********************************************* */
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,
kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td {
margin:0;padding:0;border:0;outline:0;font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;
}
article,aside,figure,footer,header,hgroup,menu,nav,section{display:block;} /* HTML5 */
audio,video{display:inline-block;} /* HTML5 */
@thirdj
thirdj / jsComment.js
Created April 10, 2013 01:18
javascript comment
/**
* 문자열을 반전시킨다.
*
* @param {String} 반전시킬 입력 문자열
* @return {String} 반전된 문자열
*/
var reverse = function (input){
//..
return output;