Skip to content

Instantly share code, notes, and snippets.

View garrensmith's full-sized avatar

Garren garrensmith

View GitHub Profile
{
"deps": [
{ "name": "fauxton" },
{ "name": "databases" },
{ "name": "documents" },
{ "name": "auth" }
],
"template": {
"development": {
"src": "assets/index.underscore",
{
"deps": [
{ "name": "fauxton" },
{ "name": "databases" },
{ "name": "documents" },
{ "name": "pouchdb" },
{ "name": "activetasks" },
{ "name": "config" },
{ "name": "stats" },
{ "name": "replication" },

Fauxton components

We use many libraries to build Fauxton. Below are a list of the libraries that we use to make Fauxton. Having a decent understanding of these libraries will make it easier to contribute.

##Backbone.js

The main core library that is used to build Fauxton is Backbone.js. Backbone.js is a powerful and very small MVC library. Backbone.js on its own doesn't give us enough features that we need for Fauxton.

To give us some more features and structure, we combine Backbone.js with backbone.layoutmanager. Backbone.layoutmanager

require 'rubygems'
require 'sinatra'
before do
@username = session[:username]
p session
end
get '/' do
git svn clone -r[FROM REVISION NUMBER] svn:// #create git repository from svn repository
git svn rebase # get latest changes
git status # latest status of repository
git help COMMAND # get help on any command
git checkout -b BRANCH_NAME # create new branch
git branch #list branches
git checkout BRANCH_NAME #switch to branch
git merge BRANCH_NAME # merge changes from BRANCH_NAME into current branch
git add . # add all changes to staging area
git commit -m "MESSAGE" # commit changes in staging area
source 'http://rubygems.org'
gem 'sinatra', '>= 1.0'
gem "mongoid", ">=2.0.0.beta.17"
gem "bson_ext", ">=1.0.4"
require 'mongoid'
class Person
include Mongoid::Document
field :first_name
field :middle_initial
field :last_name
end
require 'rubygems'
require 'sinatra'
require 'mongoid'
configure do
Mongoid.configure do |config|
name = "demo"
host = "localhost"
config.master = Mongo::Connection.new.db(name)
config.slaves = [
@garrensmith
garrensmith / module.js
Created January 31, 2011 14:28
Return object from module with required functions
var bob = module.exports = function(input) {
return { foo: "bar",
baz: "bar",
output: input
};
};
Zombie: GET http://localhost:3000/
Zombie: GET http://localhost:3000/ => 200
Zombie: GET https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js
Zombie: GET http://localhost:3000/javascripts/frontpage.js
Zombie: GET http://localhost:3000/javascripts/frontpage.js => 200
Zombie: Running script from /javascripts/frontpage.js
Error
TypeError: Cannot call method 'toString' of null
at /usr/local/lib/node/.npm/zombie/0.9.1/package/lib/zombie/resources.js:25:15
at Resource.toString (/usr/local/lib/node/.npm/zombie/0.9.1/package/lib/zombie/resources.js:58:172)