Skip to content

Instantly share code, notes, and snippets.

View dch's full-sized avatar
🛋️

Dave Cottlehuber dch

🛋️
View GitHub Profile
@dch
dch / gist:943691
Created April 27, 2011 03:59
submodule update for iOS-Couchbase
dave@akai:~/source/mobile/iOS-Couchbase $ git stash
Saved working directory and index state WIP on workspace: 0bc6e21 moved submodules to points where the build works
HEAD is now at 0bc6e21 moved submodules to points where the build works
dave@akai:~/source/mobile/iOS-Couchbase $ git pull --verbose
From git://github.com/couchbaselabs/iOS-Couchbase
cfc2eb8..04fee19 master -> origin/master
= [up to date] sim -> origin/sim
0bc6e21..f6ae191 workspace -> origin/workspace
Updating 0bc6e21..f6ae191
Fast-forward
CouchDB 1.0.3 - prepare to relax...
Eshell V5.8.2 (abort with ^G)
1> Apache CouchDB 1.0.3 (LogLevel=info) is starting.
1> Apache CouchDB has started. Time to relax.
1> [info] [<0.34.0>] Apache CouchDB has started on http://0.0.0.0:5984/
1> [info] [<0.109.0>] 192.168.1.76 - - 'GET' /_session 200
1> [info] [<0.109.0>] 192.168.1.76 - - 'DELETE' /test_suite_db_a/ 404
1> [info] [<0.109.0>] 192.168.1.76 - - 'PUT' /test_suite_db_a/ 201
1> [info] [<0.109.0>] 192.168.1.76 - - 'DELETE' /test_suite_db_b/ 404
1> [info] [<0.109.0>] 192.168.1.76 - - 'PUT' /test_suite_db_b/ 201
[Sun, 08 May 2011 23:46:53 GMT] [info] [<0.34.0>] Apache CouchDB has started on http://0.0.0.0:5984/
[Sun, 08 May 2011 23:47:25 GMT] [info] [<0.109.0>] 192.168.1.76 - - 'GET' /_session 200
[Sun, 08 May 2011 23:47:26 GMT] [info] [<0.109.0>] 192.168.1.76 - - 'DELETE' /test_suite_db_a/ 404
[Sun, 08 May 2011 23:47:26 GMT] [info] [<0.109.0>] 192.168.1.76 - - 'PUT' /test_suite_db_a/ 201
[Sun, 08 May 2011 23:47:26 GMT] [info] [<0.109.0>] 192.168.1.76 - - 'DELETE' /test_suite_db_b/ 404
[Sun, 08 May 2011 23:47:26 GMT] [info] [<0.109.0>] 192.168.1.76 - - 'PUT' /test_suite_db_b/ 201
[Sun, 08 May 2011 23:47:26 GMT] [info] [<0.109.0>] 192.168.1.76 - - 'GET' /_uuids?count=110 200
[Sun, 08 May 2011 23:47:26 GMT] [info] [<0.109.0>] 192.168.1.76 - - 'POST' /test_suite_db_a/_bulk_docs 201
[Sun, 08 May 2011 23:47:26 GMT] [info] [<0.109.0>] 192.168.1.76 - - 'PUT' /test_suite_db_a/foo1 201
[Sun, 08 May 2011 23:47:26 GMT] [info] [<0.109.0>] 192.168.1.76 - - 'PUT' /test_suite_db_a/del1 201
function onDeviceReady()
{
	// do your thing!
	//	navigator.notification.alert("CouchGap is working");
    window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, onFileSystemSuccess, fail);
}

function onFileSystemSuccess(fileSystem) {
    console.log(fileSystem.name); // temporary / persistent

console.log(fileSystem.root.name); // -Tmp- / Documents

couch@build /relax/apache-couchdb-1.1.0_windows
$ couchdb_config.sh ; couchdb_build.sh
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for gcc... cc.sh
checking whether the C compiler works... yes
@dch
dch / manifests.cmd
Created May 31, 2011 13:49
dirty hack to check windows manifests quickly
echo get http://live.sysinternals.com/strings.exe first
for /r %i in (*.dll *.exe) do @echo %i && strings %i | findstr /i "microsoft.vc"
@dch
dch / compact_data.erl
Created June 24, 2011 01:57
useful examples using hovercraft
-module(compact_data).
-author('bob@cloudant.com').
-export([test_id_btree/1, test_db/4, test_view/1, test_view/4]).
-include("couch_db.hrl").
-define(ADMIN_USER_CTX, {user_ctx, #user_ctx{roles=[<<"_admin">>]}}).
test_id_btree(N) ->
@dch
dch / couchdocs_refresh.md
Created November 22, 2011 14:04
CouchDB Doc Refresh

Hi devs,

Over the last two years we've discussed improving our documentation, website, and wiki. We have discussed several designs ad mortem[1]…[5], and while the wiki has evolved substantially, not much else has changed.

This proposal summarises a consensus direction, and puts forward an approach that should allow us to improve docs in incremental stages with the usual peer review process for the actual patches/changes.

@dch
dch / couchdb-ec2-install.sh
Created November 30, 2011 12:30 — forked from msmith/couchdb-ec2-install.sh
Set up CouchDB on EC2
#!/bin/bash
#
# This script installs and configures couchdb on a fresh Amazon Linux AMI instance.
#
# Must be run with root privileges
# Tested with Amazon Linux AMI release 2011.02.1.1 (ami-8c1fece5)
#
export BUILD_DIR="$PWD"
@dch
dch / gist:1411446
Created November 30, 2011 22:33 — forked from taxilian/gist:1095427
Building libcurl and openssl on windows statically

Building static libcurl and openssl on Windows

These instructions were tested on Windows 7 Professional w/ Visual Studio 2010

Building openssl

  1. Download the latest openssl from the website; at the time of this writing, it is 1.0.0d
  2. Extract it to your drive; I put it in c:\code\openssl-1.0.0d
  3. install ActiveState perl unless you already have a non-cygwin perl installed on windows