Skip to content

Instantly share code, notes, and snippets.

@strobemonkey
strobemonkey / fiddle.response.json
Created October 29, 2011 17:47
AmplifyJS Couchbase
{
"_id": "16082da4d4881adbdf6548012b000848",
"_rev": "1-aeed80105d238d26d5ba3685adbd7b6b",
"collection": "things",
"name": "Aardvark"
}
@strobemonkey
strobemonkey / fiddle.response.json
Created October 29, 2011 11:00
AmplifyJS fiddle.response.json
{
"foo" : "bar",
"baz" : "qux"
}
@strobemonkey
strobemonkey / Ext.ux.Sprocket.js
Created September 27, 2011 16:28
Ext.ux.Sprocket
/* Hierarchical PubSub for Extjs * Ext.ux.Sprocket.PubSub
* Version: 2.0
*
* Copyright (c) 2008-2009 - David Davis, All Rights Reserved
* xantus@xant.us
* http://xant.us/
*
* License: BSD
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@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>
@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 / 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 / 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
development: &global_settings
database: textual_development
host: 127.0.0.1
port: 27017
test:
database: textual_test
<<: *global_settings
production:
@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
@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)