A reference implementation for the students of the FEE 2014 FALL cohort of The Iron Yard Orlando using Angular, Restangular, and the Github API
A Pen by David Rogers on CodePen.
| /** | |
| * Conway's Game of Life: http://en.wikipedia.org/wiki/Conway's_Game_of_Life | |
| * | |
| */ |
| var assert = require('assert'); | |
| function test(actual, expected, success){ | |
| success = success || 'pass!'; | |
| assert(actual === expected) || console.log(success); | |
| } | |
| /** | |
| * Check Writing |
| var assert = require('assert'); | |
| /** | |
| * @param Array actual | |
| * @param Array expected | |
| * @param String message optional | |
| * @return Boolean | |
| */ | |
| assert.deepEqual = function(actual, expected, message){ | |
| /* Then a miracle occurs... */ |
| /** --- TEST CODE --- **/ | |
| var expect = chai.expect; | |
| /** | |
| * Next multiple of 3 or 5 | |
| * n = 0: 3 | |
| * n = 3: 5 | |
| * n = 5: 6 | |
| * n = 6: 9 | |
| * n = 9: 10 |
| var gulp = require('gulp'), | |
| connect = require('gulp-connect'), | |
| args = require('yargs') | |
| .alias('p', 'path') | |
| .demand(['path']) | |
| .alias('w', 'watch') | |
| .argv; | |
| gulp.task('connect', function(){ | |
| connect.server({ |
| { | |
| "scripts": { | |
| "postinstall": "./node_modules/.bin/wiredep -s index.html" | |
| } | |
| } |
| def coalesce(*args): | |
| return next((a for a in args if a is not None), None) | |
| class Game(dict): | |
| _xmin = _xmax = _ymin = _ymax = None | |
| @property | |
| def bounds(self): | |
| """ | |
| >>> Game((0,0)).bounds |
A reference implementation for the students of the FEE 2014 FALL cohort of The Iron Yard Orlando using Angular, Restangular, and the Github API
A Pen by David Rogers on CodePen.
| 'use strict'; | |
| module.exports = function(config) { | |
| config.set({ | |
| basePath : '..', //!\\ Ignored through gulp-karma //!\\ | |
| files : [ ] //!\\ Ignored through gulp-karma //!\\ | |
| autoWatch : false, |
| from trac.core import * | |
| from trac.env import open_environment | |
| from tracrpc.api import IXMLRPCHandler, expose_rpc | |
| from tracrpc.util import to_timestamp | |
| import trac.ticket.model as model | |
| class WPGimmeTicketRPC(Component): | |
| implements(IXMLRPCHandler) | |
| def xmlrpc_namespace(self): |