Skip to content

Instantly share code, notes, and snippets.

import Ember from 'ember';
export
default Ember.View.extend({
templateName: 'driver',
didInsertElement: function() {
this._super();
var chart = c3.generate({
bindto: '#chart',
data: {
import Ember from 'ember';
export
default Ember.View.extend({
templateName: 'driver',
didInsertElement: function() {
this._super();
var chart = c3.generate({
data: {
x: 'x',
def test
RestClient.get('http://example.com/resource'){|response, request, result| response }
puts "Variable: #{response}"
end
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
/**
* @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({
/**
* * @jsx React.DOM
* */
/* global FB */
'use strict';
var React = require('react/addons');
var Reflux = require('reflux');
var _ = require('lodash');
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){
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++) {
@bmax
bmax / game.js
Created February 26, 2016 08:43
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)
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();