http://dustinphoto.couchone.com/test/_design/hacks/_view/all_keys?group_level=1
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 python | |
# | |
# tap -> flume | |
# | |
# requires: python thrift bindings + compiled flume thrift binding. | |
# | |
import sys | |
import time | |
import struct |
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
import multiprocessing | |
import sys | |
from multiprocessing import JoinableQueue | |
from multiprocessing import Pipe | |
from multiprocessing import Queue | |
from multiprocessing import Process | |
from pylibmc import Client | |
from time import sleep |
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
//Changes filter: "conflicts": "function(doc, req) { if(doc._conflicts) { return true; } else { return false; }}" | |
var dbase = 'focus'; | |
var ddoc = 'app'; | |
var sys = require('sys'), | |
couchdb = require('node-couchdb/lib/couchdb'), | |
client = couchdb.createClient(5984, 'crate.im'), | |
db = client.db(dbase), | |
changes = db.changesStream({filter: ddoc + '/conflicts'}); |
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
#!/bin/sh | |
PATH=$PATH:/usr/local/bin | |
export PATH | |
T=$HOME/Sites/doxygen/ep-engine | |
H=/Users/dustin/prog/ep-engine | |
git fetch | |
branches=`git branch | cut -c3- | egrep -v "z|gh-pages"` |
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 python | |
import os | |
import sys | |
import time | |
import glob | |
import string | |
import random | |
import subprocess |
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
=========== | |
Examples: | |
=========== | |
CouchbaseClient couchbase_client = new CouchbaseClient(Arrays.asList(URI.create("http://localhost:8091/pools")), "default", ""); | |
// Get views from a design document | |
List<View> views = couchbase_client.getViews("design_doc_name"); | |
// Get a single view from the server |
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
<?php | |
$cb = new Couchbase; | |
$cb->addServer("localhost", 11211); // BC compat | |
$view = $cb->getView("ddocname", "viewname"); // returns Couchbase_View | |
$result = $view->getResult(); // returns Couchbase_ViewResult | |
foreach($result->rows AS $row) { | |
echo $row->value; | |
} |
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
import java.net.InetSocketAddress; | |
import java.util.concurrent.Executors; | |
import org.jboss.netty.bootstrap.ClientBootstrap; | |
import org.jboss.netty.buffer.ChannelBuffer; | |
import org.jboss.netty.buffer.ChannelBuffers; | |
import org.jboss.netty.channel.ChannelHandlerContext; | |
import org.jboss.netty.channel.ChannelPipeline; | |
import org.jboss.netty.channel.ChannelPipelineFactory; | |
import org.jboss.netty.channel.Channels; |
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
# GistID: 1924422 | |
# Author:: Couchbase <[email protected]> | |
# Copyright:: 2011, 2012 Couchbase, Inc. | |
# License:: Apache License, Version 2.0 | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 |
OlderNewer