Skip to content

Instantly share code, notes, and snippets.

View mattpardee's full-sized avatar

Matt Pardee mattpardee

View GitHub Profile
@mattpardee
mattpardee / mongoc9
Created February 18, 2012 22:10
Mongo and Cloud9
var mongoose = require("mongoose");
var config = require("./config");
// Assemble our connection details from config.js
var loginCredentials = config.username + ':' + config.password;
var dbUrl = config.databaseUrl;
var dbName = config.databaseName;
// Connect to the MongoLab database
mongoose.connect("mongodb://" + loginCredentials + "@" + dbUrl + "/" + dbName);
@mattpardee
mattpardee / gist:920497
Created April 14, 2011 20:45
Run-time creation of page and appending it to tab
//First you create your new page element to later be appended to the tab element
var amlPage = new apf.page({
id : "chatUser" + chatUserID,
caption : chatUserName,
name : "groupchat",
closebtn : "true",
childNodes : [
new apf.toolbar({
height : "6"