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.
var todoList = [ | |
{ 'completed': false, 'name': 'thing 1' }, | |
{ 'completed': true, 'name': 'thing 2' }, | |
] | |
function addTaskToList(list, task){ | |
// Add `task` to `list` | |
list.push(task); | |
} | |
(function (window) { | |
'use strict'; | |
// Your starting point. Enjoy the ride! | |
$(document).ready(function(){ | |
$('#new-todo').on('keypress', function (e) { | |
if(e.which == 13) { | |
var newTask = $('#new-todo').val(); | |
console.log(newTask); | |
var newItem = |
$(document).ready(function() { | |
$('#new-todo').on('keypress', function(event) { | |
// If the "Enter" key is pressed... | |
if (event.which == 13) { | |
//append to the <ul> | |
var inputVal = $('#new-todo').val(); | |
// Grab the value of the `#new-todo` <input> element... | |
var newTask = // Use this template... |
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): |
'use strict'; | |
module.exports = function(config) { | |
config.set({ | |
basePath : '..', //!\\ Ignored through gulp-karma //!\\ | |
files : [ ] //!\\ Ignored through gulp-karma //!\\ | |
autoWatch : false, |
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.
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 |
{ | |
"scripts": { | |
"postinstall": "./node_modules/.bin/wiredep -s index.html" | |
} | |
} |
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({ |
/** --- 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 |