Skip to content

Instantly share code, notes, and snippets.

View janl's full-sized avatar
🛋️
Drop ICE

Jan Lehnardt janl

🛋️
Drop ICE
View GitHub Profile
@janl
janl / gist:552288
Created August 26, 2010 21:24 — forked from mikeal/gist:552181

Using CouchDB with node.js

First, get yourself a CouchDB! You can get a free hosted CouchDB in seconds or download a binary from the Couchio downloads page.

Next, install npm because all awesome node packages are in npm :)

Node has better support for HTTP than any language I've ever worked with and coincidentally CouchDB's interface is solely accessible via HTTP. First, let's just talk to CouchDB using an HTTP library and later we'll look at some higher level abstractions.

Talking to CouchDB using request

@janl
janl / ci.log
Created September 18, 2015 14:20
Started by upstream project "2.0-release-candidate" build number 25
originally caused by:
Started by user Jan Lehnardt
Building remotely on Ubuntu-14.04-LTS in workspace /home/jan/.jenkins/workspace/2.0-release-candidate/label/Ubuntu-14.04-LTS
Fetching changes from the remote Git repository
Fetching upstream changes from git://10.0.0.2/couchdb.git
Checking out Revision 52924ce461c54c6b8406abde017aa0c426d7811c (origin/master)
[Ubuntu-14.04-LTS] $ /bin/sh -xe /tmp/hudson3285222030750369684.sh
+ PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
+ cd /home/jan/.jenkins/workspace/2.0-release-candidate/label/Ubuntu-14.04-LTS
$query = $this->cb->queries("name");
Couchbase_QueryOptions $options = array(
"limit" => false,
"skip" => 0,
"descending" => false,
"stale" => false,
"group" => false,
"group_level" => 0,
"reduce" => true,
@janl
janl / gist:1064673
Created July 5, 2011 11:26
CouchDB Meetup Berlin July
Hey,
we are going to meet at http://co-up.de on Wednesday July 13th, 19:00.
We don't have a special talk yet, let me (@janl) know if you'd like to present anything.
In lieu of a talk, I'd suggest we'll have an open discussion round. I'm happy to answer any questions you might have around CouchDB or Couchbase.
Also, drinks afterwards!
<?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;
}
--- lib/gvc/Makefile.am.orig 2011-06-26 03:07:07.000000000 -0700
+++ lib/gvc/Makefile.am 2011-06-26 03:07:27.000000000 -0700
@@ -55,7 +55,6 @@ libgvc_C_la_DEPENDENCIES += $(top_build
endif
if ENABLE_LTDL
-libgvc_C_la_LIBADD += $(LIBLTDL) $(LIBLTDL_LDFLAGS)
+libgvc_C_la_LIBADD += @LIBLTDL@ $(LIBLTDL_LDFLAGS)
-libgvc_C_la_DEPENDENCIES += $(LIBLTDL)
endif
# no args
brew install erlang
# no env var
> echo $HOMEBREW_BUILD_FROM_SOURCE
# Lion
> uname -a
Darwin rose.local 11.0.1 Darwin Kernel Version 11.0.1: Thu Jul 28 02:01:39 PDT 2011; root:xnu-1699.23.4~1/RELEASE_X86_64 x86_64
> git diff
diff --git a/Library/Formula/erlang.rb b/Library/Formula/erlang.rb
index 10656a4..5267b16 100644
--- a/Library/Formula/erlang.rb
+++ b/Library/Formula/erlang.rb
@@ -27,6 +27,9 @@ class Erlang < Formula
md5 '047f246c4ecb5fadaffb7e049795d80e'
version 'R14B03'
+ bottle 'https://github.com/downloads/janl/homebrew/erlang-R14B03-bottle.tar.gz'
> cat Library/Formula/erlang.rb
require 'formula'
class ErlangManuals < Formula
url 'http://erlang.org/download/otp_doc_man_R14B03.tar.gz'
md5 '357f54b174bb29d41fee97c063a47e8f'
end
class ErlangHtmls < Formula
url 'http://erlang.org/download/otp_doc_html_R14B03.tar.gz'
@janl
janl / gist:1296700
Created October 18, 2011 20:58
CouchDBZombo.com
"Everything is possible with CouchDB."
"If you give a database to every user, you get scaling for free."
"Run your Couch on port 80."
"Relaaaaaaaaaax."