This file contains hidden or 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 vows = require('vows'); | |
var assert = require('assert'); | |
assert.greater(5, 4); | |
assert.lesser(4, 5); | |
assert.isDefined(null); | |
assert.isDefined(1); | |
assert.isDefined({}); |
This file contains hidden or 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
LESS_FILE = ./style.less | |
CSS_FILE = ./style.css | |
CSS_COMPRESS_FILE = ./style.min.css | |
LESS = lessc | |
build: | |
${LESS} ${LESS_FILE} | sed -e s/\'__\{/\{/g -e s/\}__\'/\}/g > ${CSS_FILE} | |
${LESS} --compress ${LESS_FILE} | sed -e s/\'__\{/\{/g -e s/\}__\'/\}/g > ${CSS_COMPRESS_FILE} | |
clean: |
This file contains hidden or 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
#!nginx -p . -c cocproxy.nginx.conf | |
error_log /dev/stderr debug; | |
daemon off; | |
events { | |
worker_connections 48; | |
} | |
http { |
This file contains hidden or 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
!!! 5 | |
html | |
head | |
h1 My Site | |
block scripts | |
script(src="/jquery.js") | |
body | |
block header | |
header | |
p some header content |
This file contains hidden or 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 KyotoTycoon = require('kyoto-tycoon').KyotoTycoon; | |
var kt = new KyotoTycoon(); | |
kt.play_script('echo', { key: 'value' }, function (err, data) { | |
if (err) { // error | |
// Somthing todo ... | |
return; | |
} | |
// success |
This file contains hidden or 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
-- global variables | |
kt = __kyototycoon__ | |
db = kt.db | |
function toboolean (v) | |
return (type(v) == 'string' and v == 'true') or (type(v) == 'number' and v ~= 0) or (type(v) == 'boolean' and v) | |
end | |
function usage (outmap) |
This file contains hidden or 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
RetinaMBP:lev kazupon$ ./configure --arch=x64 | |
configure options: {'debug': None, 'without_ssl': None, 'prefix': '/usr/local', 'arch': 'x64', 'skinny': None} | |
creating ./options.gypi | |
Generating build system with GYP... | |
['/Users/kazupon/Projects/opensource/lev/all.gyp', '-I', '/Users/kazupon/Projects/opensource/lev/common.gypi', '-I', '/Users/kazupon/Projects/opensource/lev/options.gypi', '--depth=.', '-f', 'make', '-f', 'xcode', '--generator-output', '/Users/kazupon/Projects/opensource/lev/out', '-Goutput_dir=/Users/kazupon/Projects/opensource/lev/out', '-Dcomponent=static_library', '-Dlibrary=static_library'] | |
Done! | |
Now run `make -C out` to build! |
This file contains hidden or 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
# Machine spec | |
TODO: | |
# lev | |
* version: maglev branch (commit:b03a16d) | |
# luvit | |
* version: 0.5.0 |
This file contains hidden or 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
for (var i = 0; i < 1e6; i++) { | |
b = new Buffer('hello world'); | |
b[0] = 2; | |
} |
This file contains hidden or 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
✔ fs_link: 5/5 within 0.428 ms | |
✔ fs_fsync: 7/7 within 0.233 ms | |
✔ test core now: 2/2 within 0.007 ms | |
✔ test core get_process_title: 1/1 within 0.006 ms | |
[R--] timer 0x100330918 | |
[---] <unknown> 0x4ddb0 | |
Program received signal EXC_BAD_ACCESS, Could not access memory. | |
Reason: 13 at address: 0x0000000000000000 | |
0x000000010004022e in uv__print_handles (loop=0x1003306c0, only_active=0) at uv-common.c:348 |
OlderNewer