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
module.exports = { | |
// Name of the application (used as default <title>) | |
appName: "Sails Application", | |
// Port this Sails application will live on | |
port: 1337, | |
// The environment the app is deployed in |
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
/* | |
* @description Extracts data attributes from script tag that contains data-main attribute | |
* and returns an object containing all of the data values. | |
* @author Tauren Mills (github.com/tauren) | |
*/ | |
define(function() { | |
// Get all of the script tags | |
var scripts = document.getElementsByTagName('script'); | |
var data = {}; |
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
2012-10-05 02:40:24.209:INFO:oejs.Server:jetty-8.1.5.v20120716 | |
2012-10-05 02:40:27.457:INFO:oejpw.PlusConfiguration:No Transaction manager found - if your webapp requires one, please configure one. | |
2012-10-05 02:41:41.180:WARN:oejx.XmlConfiguration:Config error at <Set name="sessionPath">/</Set> java.lang.NoSuchMethodException: class org.eclipse.jetty.server.session.HashSessionManager.setSessionPath(class java.lang.String) | |
2012-10-05 02:41:41.180:WARN:oejx.XmlConfiguration:Config error at <Get name="sessionManager"><Set name="sessionCookie">MYJETTYSESSION</Set><Set name="sessionPath">/</Set><Set name="secureCookies">true</Set><Set name="httpOnly">true</Set></Get> java.lang.NoSuchMethodException: class org.eclipse.jetty.server.session.HashSessionManager.setSessionPath(class java.lang.String) | |
2012-10-05 02:41:41.180:WARN:oejx.XmlConfiguration:Config error at <Get name="sessionHandler"><Get name="sessionManager"><Set name="sessionCookie">MYJETTYSESSION</Set><Set name="sessionPath">/</Set><Set |
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
<script> | |
// Load browser shims | |
Modernizr.load([ | |
{ | |
test: window.JSON, | |
nope: 'libs/shims/json3.js' | |
}, | |
{ | |
test: Object.getOwnPropertyNames, | |
nope: "libs/shims/es5-shim.js", |
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
// Bind all of an object's methods to a specific context. Useful for ensuring that | |
// all callbacks defined on an object belong to it. | |
var context = function(obj, ctx) { | |
var funcs = Array.prototype.slice.call(arguments, 2); | |
if (funcs.length == 0) funcs = _.functions(obj); | |
_.each(funcs, function(f) { obj[f] = _.bind(obj[f], ctx); }); | |
return obj; | |
}; |
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
var html = $('script#todo').html(); | |
var data = { | |
content: 'Todo item', | |
done: false | |
}; | |
var map = Plates.Map(); | |
map.class('todo-content').to('content'); |
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
renderTemplate: function(model, extras) { | |
var json = { | |
'orders': [ | |
{'id':'o12345','status':'Shipped','ordered':'2011-06-01'}, | |
{'id':'o34567','status':'Pending','ordered':'2011-07-01'}, | |
{'id':'o56789','status':'Shipped','ordered':'2011-08-01'} | |
] | |
}; | |
var tmpl = 'script#ordersTmpl'; | |
var html = Plates.bind($(tmpl).html(), json); |
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
Integer filled = new Integer(value); | |
if (filled != null) { | |
switch (filled) { | |
case 4: // Unassigned games - Games with no assignments filled | |
// Pseudocode: select games where count(assignments with status = ACCEPTED) = 0 and count(positions) > 0 | |
search.addFilterNone("assignments", Filter.equal("statusCode",AssignmentStatus.ACCEPTED.getCode())); | |
search.addFilterGreaterThan("schedule.positions.size", 0); | |
break; | |
case 3: // Partially assigned games - Games with some assignments filled | |
// Pseudocode: select games where count(assignments with status = ACCEPTED) < count(positions) |
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
creampie:github tauren$ npm list -g | |
/usr/local/lib | |
├── [email protected] | |
├─┬ [email protected] | |
│ ├─┬ [email protected] | |
│ │ ├── [email protected] | |
│ │ ├── [email protected] | |
│ │ ├── [email protected] | |
│ │ └── [email protected] |