Diaglam of calls during view compaction in CouchDB 2.0. Some steps omitted to simplify things.
View: http://bl.ocks.org/eiri/c436914e4115651c78d1eef9de68c70e
Diaglam of calls during view compaction in CouchDB 2.0. Some steps omitted to simplify things.
View: http://bl.ocks.org/eiri/c436914e4115651c78d1eef9de68c70e
Bl.ocks is a nice way for sharing code examples hosted on gitHub gist. All that needed is just to replace “gist.github.com” with “bl.ocks.org” in the URL, e.g. http://bl.ocks.org/eiri/073a9e12f8246927ef997bf6f3ab5561
Sequence is just a simple text file loaded with syncronious ajax call.
.vagrant/ | |
git/ |
$ tree ~/.httpie/ | |
/Users/eiri/.httpie/ | |
├── config.json | |
└── sessions | |
└── localhost_5984 | |
└── default.json |
$ http :5984 | |
{ | |
“couchdb”: “Welcome”, | |
“uuid”: “6c77bce10369b93fa79b8488f1e25444”, | |
“vendor”: { | |
“name”: “Homebrew”, | |
“version”: “1.6.1_6” | |
}, | |
“version”: “1.6.1” | |
} |
-define(IS_OLD_STATE(S), tuple_size(S) /= tuple_size(#state{})). |
// Returns a random Emoji 🌿 | |
extension String{ | |
func randomEmoji()->String{ | |
let range = 0x1F601...0x1F64F | |
let ascii = range.startIndex + Int(arc4random_uniform(UInt32(range.count))) | |
let emoji = String(UnicodeScalar(ascii)) | |
return emoji | |
} | |
} |
-module(demo). | |
-export([print/0]). | |
-record(magic_record, { | |
alpha = 1, | |
beta = b, | |
gamma = [x, y, z], | |
psy, | |
omega = "done" |
-module(mardear). | |
-export([readram/0]). | |
readram() -> | |
{ok, Fd} = file:open([], [ram, write, read]), | |
IoData = io_lib:format("~s", [[$r, $a, $m]]), | |
ok = file:write(Fd, IoData), | |
{ok, Str} = file:pread(Fd, 0, 8192), | |
ok = file:close(Fd), |
#!/bin/bash | |
# From http://tech.serbinn.net/2010/shell-script-to-create-ramdisk-on-mac-os-x/ | |
# | |
ARGS=2 | |
E_BADARGS=99 | |
if [ $# -ne $ARGS ] # correct number of arguments to the script; | |
then |