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 db = { | |
| set: function(key, obj) { | |
| localStorage.setItem(key, JSON.stringify(obj)); | |
| }, | |
| get: function(key) { | |
| var tmp = localStorage.getItem(key); | |
| return (tmp === undefined) ? null : JSON.parse(tmp); | |
| }, |
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
| module('localStorage',{ | |
| setup: function() { | |
| localStorage.clear(); | |
| }, | |
| teardown: function() { | |
| localStorage.clear(); | |
| } | |
| }); | |
| test('localStorage exists and has methods',function(){ |
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
| log = function(a,b){ | |
| // if(console.log){(a)? console.log(a) : console.log(a);console.log(b);} | |
| }; | |
| var je = { | |
| baseURI: '/_je/', | |
| POST: function(docType, data, callback, error) { | |
| var jsonparam = { _doc: JSON.stringify(data) }; | |
| $.ajax({ | |
| type: 'post', |
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
| log = function(a,b){ | |
| if(console.log){(!b)? console.log(a) : console.log(a);console.log(b);} | |
| }; | |
| module('je', { | |
| testdata: null, | |
| docType: null, | |
| docId: null, | |
| /** |
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
| /*** | |
| * @function make the parallel request filters and finish with the last filter. | |
| * | |
| * @example | |
| * | |
| * misc.parallel( | |
| * func1, func2, func3, func4 | |
| * ); | |
| * | |
| * func1 ---+ |
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
| From 67b1009502510dbbcdfbfe1621565e81d7422be7 Mon Sep 17 00:00:00 2001 | |
| From: Jxck <[email protected]> | |
| Date: Sat, 12 Mar 2011 23:14:34 +0900 | |
| Subject: [PATCH] remove pids dir | |
| --- | |
| bin/express | 1 - | |
| 1 files changed, 0 insertions(+), 1 deletions(-) | |
| diff --git a/bin/express b/bin/express |
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
| From 87a1eb5c64fb14cc3d548b67337ae4ba37635233 Mon Sep 17 00:00:00 2001 | |
| From: Jxck <[email protected]> | |
| Date: Sun, 17 Apr 2011 05:05:07 +0900 | |
| Subject: [PATCH] mod curl progress-bar option | |
| --- | |
| nvm.sh | 2 +- | |
| 1 files changed, 1 insertions(+), 1 deletions(-) | |
| diff --git a/nvm.sh b/nvm.sh |
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 mongoose = require('../lib/mongoose') | |
| , Schema = mongoose.Schema; | |
| var db = mongoose.connect('mongodb://localhost:27017/mydb'); | |
| var User = new Schema({ | |
| name : String | |
| , age : Number | |
| }); |
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
| #!/usr/bin/env node | |
| var stdin = process.openStdin(); | |
| var stdout = process.stdout; | |
| var input = ''; | |
| stdin.setEncoding('utf8'); | |
| stdin.on('data', function(data) { | |
| if (data) { | |
| input += data; |
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
| #!/usr/bin/env ruby | |
| ARGF.each do |line| | |
| line.chomp! | |
| words = line.split(' ') | |
| printf("%s,1\n", words[8]) | |
| end |
OlderNewer