This file contains 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
import Ember from 'ember'; | |
export | |
default Ember.View.extend({ | |
templateName: 'driver', | |
didInsertElement: function() { | |
this._super(); | |
var chart = c3.generate({ | |
bindto: '#chart', | |
data: { |
This file contains 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
import Ember from 'ember'; | |
export | |
default Ember.View.extend({ | |
templateName: 'driver', | |
didInsertElement: function() { | |
this._super(); | |
var chart = c3.generate({ | |
data: { | |
x: 'x', |
This file contains 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
def test | |
RestClient.get('http://example.com/resource'){|response, request, result| response } | |
puts "Variable: #{response}" | |
end |
This file contains 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
irb(main):014:0> p.current_bucket | |
NoMethodError: undefined method `to_sym' for nil:NilClass | |
from /Users/bmax/.rubies/ruby-2.1.1/lib/ruby/gems/2.1.0/gems/activerecord-4.1.6/lib/active_record/reflection.rb:100:in `_reflect_on_association' | |
from /Users/bmax/.rubies/ruby-2.1.1/lib/ruby/gems/2.1.0/gems/activerecord-4.1.6/lib/active_record/reflection.rb:537:in `source_reflection' | |
from /Users/bmax/.rubies/ruby-2.1.1/lib/ruby/gems/2.1.0/gems/activerecord-4.1.6/lib/active_record/reflection.rb:697:in `check_validity!' | |
from /Users/bmax/.rubies/ruby-2.1.1/lib/ruby/gems/2.1.0/gems/activerecord-4.1.6/lib/active_record/associations/association.rb:25:in `initialize' | |
from /Users/bmax/.rubies/ruby-2.1.1/lib/ruby/gems/2.1.0/gems/activerecord-4.1.6/lib/active_record/associations/has_many_through_association.rb:9:in `initialize' | |
from /Users/bmax/.rubies/ruby-2.1.1/lib/ruby/gems/2.1.0/gems/activerecord-4.1.6/lib/active_record/associations.rb:155:in `new' | |
from /Users/bmax/.rubies/ruby-2.1.1/lib/ruby/gems/2.1.0/gems/activereco |
This file contains 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
/** | |
* @jsx React.DOM | |
*/ | |
'use strict'; | |
var React = require('react/addons'); | |
var Link = React.createFactory(require('react-router').Link); | |
var _ = require('lodash'); | |
var Hero = React.createClass({ |
This file contains 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
/** | |
* * @jsx React.DOM | |
* */ | |
/* global FB */ | |
'use strict'; | |
var React = require('react/addons'); | |
var Reflux = require('reflux'); | |
var _ = require('lodash'); |
This file contains 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
cityHapps.directive('dateTimePicker', function($parse) { | |
return { | |
// Restrict it to be an attribute in this case | |
restrict: 'A', | |
// responsible for registering DOM listeners as well as updating the DOM | |
link: function(scope, element, attrs) { | |
$(element).datetimepicker({ | |
onClose: function(ct,$i) { | |
ngModel = $parse($i.attr('ng-model')); | |
scope.$apply(function(scope){ |
This file contains 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 levels = function(game){}; | |
var levelInfo = [ | |
{moves:5, time:null}, | |
{moves:10, time:null} | |
]; | |
levels.prototype = { | |
preload: function() {}, | |
createLevels: function(numOfLevels) { | |
var me = this; | |
for (var i = 1; i<=numOfLevels; i++) { |
This file contains 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
addTile: function(x, y){ | |
var me = this; | |
//Choose a random tile to add | |
var tileToAdd = me.tileTypes[me.random.integerInRange(0, me.tileTypes.length - 1)]; | |
//Add the tile at the correct x position, but add it to the top of the game (so we can slide it in) | |
This file contains 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
create: function() { | |
// create modal for settings | |
var me = this; | |
var centerX = this.game.world.centerX; | |
var centerY = this.game.world.centerY; | |
var bg = this.game.add.sprite(0, 0, 'background'); | |
var logo = this.game.add.sprite(10, 10, 'logo'); | |
var quiz_data = this.grabRandomQuiz(); |