Skip to content

Instantly share code, notes, and snippets.

@strobemonkey
strobemonkey / Build CouchDB from source
Created November 20, 2009 10:53
Build CouchDB from source
svn co http://svn.apache.org/repos/asf/couchdb/trunk couchdb
#svn checkout http://svn.apache.org/repos/asf/couchdb/branches/0.10.x
cd couchdb
sudo ./bootstrap
./configure
make && sudo make install
@strobemonkey
strobemonkey / Start CouchDB
Created November 20, 2009 10:54
Start CouchDB
# start couchdb as a daemon
sudo /usr/local/etc/init.d/couchdb start
# or start couchdb in shell
sudo -u couchdb couchdb
@strobemonkey
strobemonkey / Set up a CouchDB admin account
Created November 20, 2009 10:54
Set up a CouchDB admin account
#http://wiki.apache.org/couchdb/Setting_up_an_Admin_account
#On Ubuntu you should find local.ini located here:
/usr/local/etc/couchdb/local.ini
#Make sure ownership is changed to couchdb:
sudo chown couchdb:couchdb /usr/local/etc/couchdb/local.ini
@strobemonkey
strobemonkey / Build Erlang from source
Created November 20, 2009 10:56
Build Erlang from source
#Find which version of Erlang you want: http://erlang.org/download.html
sudo apt-get build-dep erlang
sudo apt-get install java-gcj-compat java-gcj-compat-dev
wget http://erlang.org/download/otp_src_R13A.tar.gz
tar zxvf otp_src_R13A.tar.gz
cd otp_src_R13A
./configure
make && sudo make install
erl
#Eshell V5.6.5 (abort with ^G)
@strobemonkey
strobemonkey / Gem install do_mysql on a Mac
Created November 20, 2009 10:57
Gem install do_mysql on a Mac
#‘Twere installing Astrotrain, needed to update do_msql gem but receiving this error:
#Error installing do_mysql
#it needs some configuration option:
sudo gem install do_mysql --version='0.9.11' -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
development: &global_settings
database: textual_development
host: 127.0.0.1
port: 27017
test:
database: textual_test
<<: *global_settings
production:
@strobemonkey
strobemonkey / gist:819117
Created February 9, 2011 19:40
Watch coffee script and start nodemon
# Note that *.coffee must be added to nodemon-ignore file
(coffee --compile --watch .&); nodemon app.js
@strobemonkey
strobemonkey / css3-buttons.styl
Created March 8, 2011 15:49
CSS3 buttons in Stylus
// based on http://css3-buttons.heroku.com/
border-radius()
-webkit-border-radius arguments
-moz-border-radius arguments
border-radius arguments
box-shadow()
-webkit-box-shadow arguments
-moz-box-shadow arguments
@strobemonkey
strobemonkey / guid.js
Created March 23, 2011 21:51
gimme a guid
var guid = function(){
return 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'.replace(/[x]/g, function(c) {
var r = Math.random()*16|0, v = c == 'x' ? r : (r&0x3|0x8);
return v.toString(16);
}).toUpperCase();
};
console.log(guid());
@strobemonkey
strobemonkey / chat_room.opa
Created July 26, 2011 06:51
Opa Hello World examples
type message = {author: string
; text: string}
room = Network.cloud("room"): Network.network(message)
user_update(x: message) =
line = <div class="line">
<div class="user">{x.author}:</div>
<div class="message">{x.text}</div>
</div>