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
{ | |
"_id":"employee_skill_doc", | |
"_rev":"432-bd99f54ac706d4f28bfb3c8114f69e15", | |
"skills": [ | |
{ | |
"skill_name": "Dassault Simulia", | |
"skill_id": "En17", | |
"skill_set_id": "c03", | |
"skill_set": "CAE (Computer Aided Engineering)", | |
"skill_sub_ID": "b02", |
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 test_metrics = function(metrics) { | |
if (metrics.type === "counter") { | |
test_counter(metrics); | |
} else if (metrics.type === "histogram") { | |
test_histogram(metrics); | |
} else { | |
for (var k in metrics) { | |
if (metrics.hasOwnProperty(k)) { | |
test_metrics(metrics[k]); | |
} |
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 test_metrics = function(metrics) { | |
if (metrics.type === "counter") { | |
test_counter(metrics); | |
} else if (metrics.type === "histogram") { | |
test_histogram(metrics); | |
} else { | |
for (var k in metrics) { | |
test_metrics(metrics[k]); | |
} | |
} |
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
#!/bin/sh | |
curl -X DELETE localhost:5984/foo | |
curl -X PUT localhost:5984/foo | |
echo "should be 1-4a7e4ae49c4366eaed8edeaea8f784ad" | |
curl -X PUT localhost:5984/foo/doc -d '{"foo": 1}' | |
echo "natural update should be 2-2ee767305024673cfb3f5af037cd2729" | |
curl -X PUT localhost:5984/foo/doc -d '{"foo": 2, "_rev":"1-4a7e4ae49c4366eaed8edeaea8f784ad"}' |
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 python | |
import json | |
import requests | |
if __name__ == '__main__': | |
s = requests.Session() | |
s.put("http://localhost:5984/db1") | |
docs = [] | |
for i in range(1, 1000): |
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 python | |
import json | |
import requests | |
if __name__ == '__main__': | |
s = requests.Session() | |
s.put("http://localhost:5984/db1") | |
for i in range(1, 1000): | |
s.put("http://localhost:5984/db1/doc-%d" % i, data = '{"foo":"bar"}') |
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
➜ ~ curl localhost:5984/db1/doc1 -XPUT -d {} | |
{"ok":true,"id":"doc1","rev":"1-967a00dff5e02add41819138abb3284d"} | |
➜ ~ curl 'localhost:5984/db1/doc1?rev=1-967a00dff5e02add41819138abb3284d' -X DELETE | |
{"ok":true,"id":"doc1","rev":"2-eec205a9d413992850a6e32678485900"} | |
➜ ~ curl localhost:5984/db1/doc1 -XPUT -d {} | |
{"ok":true,"id":"doc1","rev":"3-bc27b6930ca514527d8954c7c43e6a09"} | |
➜ ~ curl localhost:5984/db1/doc1 |
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
➜ ~ curl localhost:5984/db1 -XPUT | |
{"ok":true} | |
➜ ~ curl localhost:5984/db1/doc1 -XPUT -d{} | |
{"ok":true,"id":"doc1","rev":"1-967a00dff5e02add41819138abb3284d"} | |
➜ ~ curl 'localhost:5984/db1/doc1?rev=1-967a00dff5e02add41819138abb3284d' -XDELETE | |
{"ok":true,"id":"doc1","rev":"2-eec205a9d413992850a6e32678485900"} | |
➜ ~ curl localhost:5984/db1/doc1 -XPUT -d '{"foo":1}' |
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
#!/bin/sh | |
DISTROS="ubuntu:10.04 ubuntu:12.04 ubuntu:12.10 ubuntu:13.04 ubuntu:13.10 ubuntu:14.04 debian:squeeze debian:wheezy debian:jessie" | |
function test() { | |
echo "Testing $1" | |
cat > Dockerfile <<EOF | |
FROM $1 | |
MAINTAINER Robert Newson <[email protected]> | |
ENV DEBIAN_FRONTEND noninteractive |
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 ubuntu:12.04 | |
MAINTAINER Robert Newson <[email protected]> | |
ENV DEBIAN_FRONTEND noninteractive | |
RUN apt-get -qq update | |
RUN apt-get -y install erlang-nox build-essential libmozjs185-dev libicu-dev | |
RUN useradd -m couchdb | |
USER couchdb | |
WORKDIR /home/couchdb |