Skip to content

Instantly share code, notes, and snippets.

View dch's full-sized avatar
🛋️

Dave Cottlehuber dch

🛋️
View GitHub Profile
# fix for http://github.com/couchapp/couchapp/issues/#issue/55
options = dict(py2exe={ 'dll_excludes': [ "kernelbase.dll", "powrprof.dll" ] },
@dch
dch / getting_the_bits_for_building_erlang_and_couchdb
Created August 16, 2010 17:56
Getting the bits for building erlang and CouchDB on Windows
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\couchdb>d:
D:\>dir
Volume in drive D is Relax_with_CouchDB
Volume Serial Number is 92D6-4E48
Directory of D:\
@dch
dch / build_mozilla-javascript-HEAD_from_source_on_windows
Created August 16, 2010 18:34
build mozilla javascript - HEAD from source on windows
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\couchdb>pushd \mozilla-build
D:\mozilla-build>dir
Volume in drive D is Relax_with_CouchDB
Volume Serial Number is 92D6-4E48
Directory of D:\mozilla-build
@dch
dch / building_seamonkey_2.0.6_for_javascript_engine.cmd
Created August 16, 2010 18:51
build mozilla javascript for windows using seamonkey 2.0.6 release
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\couchdb>pushd mozilla-build
D:\mozilla-build>start-msvc9.bat
"Mozilla tools directory: D:\mozilla-build\"
Windows SDK directory: C:\Program Files\Microsoft SDKs\Windows\v7.0\
Windows SDK version: 7.0
Setting environment for using Microsoft Visual Studio 2008 x86 tools.
@dch
dch / couchdb_with_erlang_R13B04_build_on_windows
Created August 17, 2010 05:53
building couchdb with erlang R13B04 on windows
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\couchdb>d:\install\bin\relax_13B04.cmd
Setting environment for using Microsoft Visual Studio 2008 x86 tools.
current path:
/src/otp_src_R13B04/release/win32/erts-5.7.5/bin
/src/otp_src_R13B04/erts/etc/win32/cygwin_tools/vc
/src/otp_src_R13B04/erts/etc/win32/cygwin_tools
/cygdrive/c/PROGRA~2/MICROS~1.0/Common7/IDE
/cygdrive/c/PROGRA~2/MICROS~1.0/VC/BIN
@dch
dch / couchdb_view_attachment_names
Created January 30, 2011 10:34
CouchDB map that provides doc id and attachment names for easy URL conversion
// view map for generating URLs to stubbed attachments
function(doc) {
if (doc._attachments) {
for (var i in doc._attachments) {
emit(doc._id, doc._id + "/" + i);
}
}
}
// example document
@dch
dch / CouchDB::Client
Created February 7, 2011 08:01
read, push, pull via CouchDB::Client
#!/usr/local/bin/perl
$|=1;
use CouchDB::Client;
#only do this if you need admin logon
#my $c = CouchDB::Client->new(uri => 'http://admin:password@muse.couchone.com:5984/');
my $c = CouchDB::Client->new(uri => 'http://muse.couchone.com:5984/');
$c->testConnection or die "The server cannot be reached";
dave@akai:~ $ brew uninstall icu4c
Uninstalling /usr/local/Cellar/icu4c/4.4.1...
dave@akai:~ $ brew install -vd icu4c
Warning: Xcode is not installed! Builds may fail!
==> Downloading http://download.icu-project.org/files/icu4c/4.4.1/icu4c-4_4_1-src.tgz
File already downloaded and cached to /Users/dave/Library/Caches/Homebrew
/usr/bin/tar xf /Users/dave/Library/Caches/Homebrew/icu4c-4.4.1.tgz
==> Downloading patches
==> Patching
/usr/bin/patch -f -p1 -i 001-homebrew.diff
dave@continuity:/Users/dave $ stop_couch
dave@continuity:/Users/dave $ cd /
dave@continuity:/Users/dave $ sudo -u couchdb -s
continuity% cd /usr/local/bin
continuity% couchdb -i
Erlang R14B01 (erts-5.8.2) [source] [64-bit] [smp:2:2] [rq:2] [async-threads:4] [hipe] [kernel-poll:true]
Eshell V5.8.2 (abort with ^G)
1> Apache CouchDB 1.0.2 (LogLevel=debug) is starting.
Configuration Settings ["/usr/local/etc/couchdb/default.ini",
@dch
dch / USAGE.md
Created April 18, 2011 23:05 — forked from agaoglu/USAGE.md

CRUD requires jquery.deepjson.js to work so it should be included

<script type="text/javascript" src="js/jquery.deepjson.js"></script>

Then you can assign whatever's in crud.json to a variable or you can put crud.json into your evently directory and let couchapp push it to your application.

Simplest way to use it is