I hereby claim:
- I am jhs on github.
- I am jhs (https://keybase.io/jhs) on keybase.
- I have a public key whose fingerprint is 0A96 64D7 83A8 F28A F342 118C 97FC 9E00 74D1 1C16
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
$ ./node_modules/.bin/mocha test/test.js | |
Generating pems for testing secure peers... | |
․․․ | |
0 passing (4s) | |
3 failing | |
1) sanity tests add data to db0 and expect it exists on db1 and db2 after t seconds: | |
Error: timeout of 2000ms exceeded |
$('#msgs_div').bind('DOMSubtreeModified', function () { | |
var bg = '#bedded' | |
$('.message .mention').parent().parent().css('background-color', bg) | |
}) |
$ npm test | |
> cms@1.0.0 test /home/travis/build/PolicyMic/cms | |
> npm run bundle-test && node_modules/.bin/mocha-phantomjs TestRunner.html | |
> cms@1.0.0 bundle-test /home/travis/build/PolicyMic/cms | |
> browserify -t jadeify specs/*.js --fast -o dist/test_bundle.js | |
TypeError: 'undefined' is not an object (evaluating 'Function.prototype.bind.call') |
// This file demonstrates my desire to hook a "legacy" http server into | |
// a Hapi route. | |
var http = require('http') | |
var legacy_server = http.createServer(legacy_handler) | |
legacy_server.listen(8081) | |
function legacy_handler(request, response) { | |
response.end('I am a standard handler\n') | |
} |
NVM is nice. It sets up your $PATH for you, and it allows simple, isolated, stand-alone Node.js installs.
Until NVM officially supports [io.js][iojs], here is how to shoehorn io.js into your NVM system so that you can access it easily. The trick is just to tell nvm
that you've installed "Node" version 1.0.1.
nvm --version
# Output: 0.22.2cd ~/Downloads; tar xzvf iojs-v1.0.1-linux-x64.tar.gz
# (or wherever your download/build is)mkdir -p ~/.nvm/versions/node
mv iojs-v1.0.1-linux-x64/ ~/.nvm/versions/node/v1.0.1
# (or whatever your download/build is)Sample code project: FoodTracker | |
Version: 1.0 | |
IMPORTANT: This Apple software is supplied to you by Apple | |
Inc. ("Apple") in consideration of your agreement to the following | |
terms, and your use, installation, modification or redistribution of | |
this Apple software constitutes acceptance of these terms. If you do | |
not agree with these terms, please do not use, install, modify or | |
redistribute this Apple software. |
jhs@book:~/src/couchdb-nano$ git status | |
On branch master | |
Your branch is up-to-date with 'origin/master'. | |
nothing to commit, working directory clean | |
jhs@book:~/src/couchdb-nano$ echo >> lib/nano.js | |
jhs@book:~/src/couchdb-nano$ git commit -a -m 'Add a blank line' | |
> nano@6.1.5 jshint /Users/jhs/src/couchdb-nano | |
> jshint tests/*/*/*.js lib/*.js |
Currently, we can only grant dual read-write access in the _security | |
object "members" section. A user can either do both (name or role in | |
.members), or do neither (name and role not in .members). This | |
prevents a very common requirement for couch apps: sending private | |
information from less-privileged users to more-privileged users. There | |
is no (reasonable) way to make an "inbox" where anybody may create a | |
doc for me, but only I may read it. An inbox database allows | |
user-to-user, or user-to-admin private messages. (Don't think chat | |
messages. Think asynchronous notifications. With a per-user inbox, | |
think service requests and responses.) |
commit 08b26333c44f9a86a8d9b87f4a1e6d51e9ac624c | |
Author: Jason Smith <jhs@iriscouch.com> | |
Date: Wed May 18 08:08:36 2011 +0700 | |
A configuration option httpd.cors_admin to allow _admin over CORS | |
diff --git a/src/couchdb/couch_httpd.erl b/src/couchdb/couch_httpd.erl | |
index db6809b..3193855 100644 | |
--- a/src/couchdb/couch_httpd.erl | |
+++ b/src/couchdb/couch_httpd.erl |