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
expressjs 설치 후, 아래 3개 파일만 변경하면 업로드가 가능합니다. | |
views/index.jade | |
================== | |
extends layout | |
block content | |
h1= title |
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
/* | |
colors.js | |
Copyright (c) 2010 | |
Marak Squires | |
Alexis Sellier (cloudhead) | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal |
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
(+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[] | |
]+(!+[]+[])[+[]]+(!+[]+[])[!+[]+!+[]+!+[]]+(!+[]+[])[+!+[]]]+[])[!+[]+ | |
!+[]+!+[]]+(!+[]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[]) | |
[!+[]+!+[]]+(!+[]+[])[+[]]+(!+[]+[])[!+[]+!+[]+!+[]]+(!+[]+[])[+!+[]]] | |
)[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+ | |
[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]]) | |
[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!+[]+[])[+[]]+(!+[]+[])[!+[]+!+[]+! | |
+[]]+(!+[]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!+[]+[][(![ | |
]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!+[]+[])[+ | |
[]]+(!+[]+[])[!+[]+!+[]+!+[]]+(!+[]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[] |
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
extract () { | |
if [ -f $1 ] ; then | |
case $1 in | |
*.tar.bz2) tar xjf $1 ;; | |
*.tar.gz) tar xzf $1 ;; | |
*.bz2) bunzip2 $1 ;; | |
*.rar) unrar e $1 ;; | |
*.gz) gunzip $1 ;; | |
*.tar) tar xf $1 ;; | |
*.tbz2) tar xjf $1 ;; |
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
Ctrl-B 영/문자 단위로 좌측으로 커서를 한칸 이동한다. | |
Ctrl-F 영/문자 단위로 우측으로 커서를 한칸 이동한다. | |
Ctrl-A. 현재 작업라인에 시작문자로 커서를 이동한다. | |
Ctrl-E. 현재 작업라인의 제일 끝으로 커서를 이동한다. | |
Esc B. 한단어 기준으로 좌측으로 커서를 이동한다. :: ESC 키를 누른후 곧바로 B 키를 누르셔야 합니다. |
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 cluster = require('cluster'); | |
if (cluster.isWorker) { | |
console.log('Worker ' + process.pid + ' has started.'); | |
// Send message to master process. | |
process.send({msgFromWorker: 'This is from worker ' + process.pid + '.'}) | |
// Receive messages from the master process. |
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
Node.js 에서 실행되는 외부 솔루션을 사용하는 경우는 자주 발생합니다. 제가 사용하는 방법은 아래와 같습니다. | |
$ cat subprocess.js | |
/** | |
* subprocess module | |
* | |
* @author nanhapark | |
*/ | |
var spawn = require('child_process').spawn; |
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
javascript:(function(){m='http://mail.google.com/mail/?ui=1&view=cm&fs=1&tf=1&[email protected]&su='+encodeURIComponent(document.title)+'&body='+encodeURIComponent(document.location);w=window.open(m,'addwindow','status=no,toolbar=no,width=575,height=545,resizable=yes');setTimeout(function(){w.focus();}, 250);})(); |
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
javascript:(function(){var surl='http://twitter.xguru.net/index.php?s=';var reply=prompt('%EA%B2%80%EC%83%89%EC%96%B4 %EC%9E%85%EB%A0%A5%ED%95%98%EC%84%B8%EC%9A%94!');if(!reply) return; window.open(surl+reply, '_blank', 'width=670,height=700,scrollable=1,resizable=1');})(); |
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/python | |
import sys | |
if (len(sys.argv) > 1): | |
num=int(sys.argv[1]) | |
else: | |
num=int(raw_input("How many nodes are in your cluster? ")) | |
for i in range(0, num): | |
print 'token %d: %d' % (i, (i*(2**127)/num)) |