This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package models; | |
import java.util.*; | |
import javax.persistence.*; | |
import com.avaje.ebean.Expr; | |
import com.avaje.ebean.Query; | |
import org.codehaus.jackson.annotate.JsonIgnore; | |
import org.codehaus.jackson.annotate.JsonProperty; | |
import play.data.validation.Constraints; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Upstart file to make play app start when server starts | |
description "PlayFramework 2" | |
author "Leon Radley <[email protected]>" | |
version "1.0" | |
env USER=myuser | |
env GROUP=mygroup | |
env HOME=/home/myuser/app |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo add-apt-repository ppa:webupd8team/java | |
sudo apt-get update | |
sudo apt-get install oracle-jdk7-installer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('app').factory('pubsub', function() { | |
var o = $({}); | |
$.subscribe = function() { | |
o.on.apply(o, arguments); | |
}; | |
$.unsubscribe = function() { | |
o.off.apply(o, arguments); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package service | |
import play.api._ | |
import securesocial.core._ | |
import securesocial.core.providers.Token | |
import securesocial.core.UserId | |
import models._ | |
class SlickUserService(application: Application) extends UserServicePlugin(application) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.directive('copyValue', function($parse) { | |
return function(scope, element, attrs) { | |
if (attrs.ngModel) { | |
if (element[0].type === "radio") { | |
if (element[0].checked === true) { | |
$parse(attrs.ngModel).assign(scope, element.val()); | |
} | |
} else { | |
$parse(attrs.ngModel).assign(scope, element.val()); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*global module:false*/ | |
module.exports = function (grunt) { | |
'use strict'; | |
grunt.loadNpmTasks('grunt-hub'); | |
grunt.initConfig({ | |
hub: { | |
all: { | |
files: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
AngularJS v1.1.5-77ff108 | |
(c) 2010-2012 Google, Inc. http://angularjs.org | |
License: MIT | |
*/ | |
(function(M,X,s){'use strict';function jc(){var b=M.angular;M.angular=kc;return b}function o(b,a,c){var d;if(b)if(H(b))for(d in b)d!="prototype"&&d!="length"&&d!="name"&&b.hasOwnProperty(d)&&a.call(c,b[d],d);else if(b.forEach&&b.forEach!==o)b.forEach(a,c);else if(!b||typeof b.length!=="number"?0:typeof b.hasOwnProperty!="function"&&typeof b.constructor!="function"||b instanceof O||ea&&b instanceof ea||Da.call(b)!=="[object Object]"||typeof b.callee==="function")for(d=0;d<b.length;d++)a.call(c,b[d], | |
d);else for(d in b)b.hasOwnProperty(d)&&a.call(c,b[d],d);return b}function pb(b){var a=[],c;for(c in b)b.hasOwnProperty(c)&&a.push(c);return a.sort()}function lc(b,a,c){for(var d=pb(b),e=0;e<d.length;e++)a.call(c,b[d[e]],d[e]);return d}function qb(b){return function(a,c){b(c,a)}}function Ea(){for(var b=$.length,a;b;){b--;a=$[b].charCodeAt(0);if(a==57)return $[b]="A",$.join("");if(a==90)$[b]="0";else return $[b]=String.fro |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package models | |
import scala.concurrent.{Future, ExecutionContext} | |
import reactivemongo.core.commands.{GetLastError, LastError} | |
import play.modules.reactivemongo.json.collection.JSONGenericHandlers | |
import reactivemongo.api.collections.GenericCollection | |
import play.api.libs.json.Json.JsValueWrapper | |
// Reactive Mongo imports | |
import reactivemongo.api._ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package controllers | |
import play.api.mvc._ | |
import play.api.libs.json._ | |
import reactivemongo.bson._ | |
import models._ | |
import extensions._ | |
import extensions.JsonTransforms._ |