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
server: | |
port: 1337 | |
db: | |
sqlite: | |
filename: ':memory:' |
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
http.js:851 | |
throw new TypeError('first argument must be a string or Buffer'); | |
^ | |
TypeError: first argument must be a string or Buffer | |
at ServerResponse.OutgoingMessage.write (http.js:851:11) | |
at write (/Users/jerry/work/http-db/node_modules/levelup/node_modules/readable-stream/lib/_stream_readable.js:605:24) | |
at flow (/Users/jerry/work/http-db/node_modules/levelup/node_modules/readable-stream/lib/_stream_readable.js:614:7) | |
at ReadStream.pipeOnReadable (/Users/jerry/work/http-db/node_modules/levelup/node_modules/readable-stream/lib/_stream_readable.js:646:5) | |
at ReadStream.emit (events.js:92:17) | |
at emitReadable_ (/Users/jerry/work/http-db/node_modules/levelup/node_modules/readable-stream/lib/_stream_readable.js:430:10) |
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
0 info it worked if it ends with ok | |
1 verbose cli [ 'node', '/usr/local/bin/npm', 'install' ] | |
2 info using npm@2.6.0 | |
3 info using node@v1.4.1 | |
4 verbose node symlink /usr/local/bin/node | |
5 verbose install where, deps [ '/Users/jerry/work/koop', | |
5 verbose install [ 'async', | |
5 verbose install 'aws-sdk', | |
5 verbose install 'body-parser', | |
5 verbose install 'config', |
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/env node | |
var wkt = require('terraformer-wkt-parser'), | |
arcgis = require('terraformer-arcgis-parser'), | |
fs = require('fs'); | |
var argv = require('optimist') | |
.usage('Usage: $0 --in-format [format] --out-format [format] infile [outfile]') | |
.demand(['in-format','out-format']) | |
.check(function (argv) { |
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
{ | |
"type": "Polygon", | |
"coordinates": [ [ [ -122, 45 ], [ -123, 45 ], [ -123, 46 ], [ -122, 46 ], [ -122, 45 ] ] ] | |
} |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
env_with_src : function() { | |
var | |
html = "<html><body><p>hello world!</p></body></html>", | |
src = "window.attachedHere = 123"; | |
jsdom.env({ | |
html : html, | |
src : src, | |
done : function(errors, window) { | |
assertNull("error should not be null", errors); |
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
table { | |
width: 600px; | |
} | |
table thead tr th { | |
text-align: center; | |
font-weight: bold; | |
} | |
table tbody tr:nth-child(odd) { | |
background-color: #fff; | |
} |
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::Buffer *slowBuffer = node::Buffer::New(len); | |
memcpy(node::Buffer::Data(slowBuffer), get, len); | |
v8::Local<v8::Object> globalObj = v8::Context::GetCurrent()->Global(); | |
v8::Local<v8::Function> bufferConstructor = v8::Local<v8::Function>::Cast(globalObj->Get(v8::String::New("Buffer"))); | |
v8::Handle<v8::Value> constructorArgs[3] = { slowBuffer->handle_, v8::Integer::New(len), v8::Integer::New(0) }; | |
v8::Local<v8::Object> actualBuffer = bufferConstructor->NewInstance(3, constructorArgs); | |
return scope.Close(actualBuffer); |
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 url = require('url'); | |
var http = require('http'); | |
http.createServer(function (req, res) { | |
res.writeHead(200, {'Content-Type': 'text/plain'}); | |
var parsed = url.parse(req.url, true); | |
var pathname = parsed.pathname; | |
res.end('Hello World, you asked for: ' + pathname + '\n'); | |
}).listen(1337, "127.0.0.1"); |