Skip to content

Instantly share code, notes, and snippets.

@crongro
crongro / canvas_crisp_lines.markdown
Last active August 29, 2015 13:56
A Pen by younjisu.
@crongro
crongro / A-Pen-by-younjisu.markdown
Last active August 29, 2015 13:56
singleton pattern by codepen
@crongro
crongro / private methods testable module pattern
Created February 19, 2014 09:56
private Method 테스트 가능한 모듈패턴예시.
var nigayo = {};
nigayo.obj = (function() {
function pub (name) {this.name = name;}
pub.prototype.getName = function() {
return this.name + pub._priv();
};
@crongro
crongro / promise pattern
Created February 27, 2014 04:32
Promise pattern
/* json
{
"sum" : "68",
"majors" : [
{
"count" : "12",
"url" : ["../jisu.json","../jisu2.json","../jisu3.json","../jisu4.json"],
"professor" : "younJisu"
},
{
@crongro
crongro / FpuLn.markdown
Created March 24, 2014 07:59
A Pen by younjisu.
@crongro
crongro / public , private
Created March 27, 2014 06:53
모듈단위로 public/private분리하기.
var obj = (function() {
//private : 한 놈들.(closure 특성을 활용한 private 생성)
var _name = "jisu",
_aData = [],
_innerFun = function(id,name) {
console.log(id , name);
};
function Pub(id) {
@crongro
crongro / [CSS] :before ,:after example
Last active August 29, 2015 13:58
A Pen by younjisu.
<a href="http://www.naver.com">네이버</ㅁ>
@crongro
crongro / gist:10708235
Created April 15, 2014 06:48
ASM Module performance test
//http://ejohn.org/blog/asmjs-javascript-compile-target/
function DiagModule(stdlib, foreign, heap) {
//"use asm";
// Variable Declarations
var sqrt = stdlib.Math.sqrt;
// Function Declarations
@crongro
crongro / index.html
Last active August 29, 2015 14:01
Circle Rolling (infinite ~)
<div id="view">
<div id="content">
<div class="original">
<div class="a">a</div>
<div class="b">b</div>
<div class="c">c</div>
</div>
<div class="addon">
@crongro
crongro / 사용자정의 Global variables 확인 방법
Created June 11, 2014 10:55
사용자정의 Global variables 확인 방법
// 초기 코드에서 이걸 계산.
this.__d = [];
for (i in window) {
this.__d.push(i);
}
//나중에 이 메소드를 실행
(function(win){