Skip to content

Instantly share code, notes, and snippets.

@sundorf
sundorf / app.js
Created Nov 20, 2012
Pyramid with D3 and Angular
View app.js
angular.module('members',
[ 'd3Charts']).config(
[ '$routeProvider', function($routeProvider) {
$routeProvider.when('/dashboard', {
templateUrl : 'assets/html/members/dashboard.html',
controller : DashboardCtrl
});
} ]);
function DashboardCtrl($scope) {
@sundorf
sundorf / Mongo.scala
Created Mar 14, 2012
Play 2.0 Utility-Trait for Casbah/MongoDB
View Mongo.scala
package models
import scala.Option.option2Iterable
import org.scalastuff.scalabeans.Preamble.descriptorOf
import org.scalastuff.scalabeans.BeanDescriptor
import com.mongodb.casbah.Imports._
import play.Logger
/**
* Utility trait for MongoDB to mix into entity classes.