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
# Inherits parent events and allow overriding. | |
@events = _.extend {}, CardView::events, @events | |
# Call parent initialize method | |
SpellsCreateView.__super__.initialize.apply @,arguments |
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 gulp = require('gulp'), | |
del = require('del'), | |
plugins = require('gulp-load-plugins')(), | |
bower = require('main-bower-files'), | |
source = require('vinyl-source-stream'), | |
buffer = require('vinyl-buffer'), | |
browserify = require('browserify'), | |
browserSync = require('browser-sync'); | |
var conf = { |
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
#!/bin/bash | |
# Borrowed from a github gist somewhere on the Internet, can't find the source :( | |
# works with a file called VERSION in the current directory, | |
# the contents of which should be a semantic version number | |
# such as "1.2.3" | |
# this script will display the current version, automatically | |
# suggest a "minor" version update, and ask for input to use |
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
#!/usr/bin/env node |
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
# Require any additional compass plugins here. | |
# Set this to the root of your project when deployed: | |
http_path = "/" | |
css_dir = "stylesheets" | |
sass_dir = "sass" | |
images_dir = "images" | |
javascripts_dir = "javascripts" | |
# You can select your preferred output style here (can be overridden via the command line): |
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
// Props to : http://techblog.badoo.com/blog/2013/11/01/type-checking-in-javascript/ | |
var type = function (o) { | |
// handle null in old IE | |
if (o === null) { | |
return 'null'; | |
} | |
// handle DOM elements | |
if (o && (o.nodeType === 1 || o.nodeType === 9)) { |
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 getRandomID = function ( range ) { | |
var r = range; | |
if ( isNaN ( r ) ) { | |
r = 10000; | |
} | |
return Math.floor ( Math.random() * r ); | |
}; |
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 Parent = function ( settings ) { | |
this.name = settings.name; | |
}; | |
Parent.prototype.greet = function () { | |
console.log ( 'Hello ' + this.name ); | |
}; | |
var Child = function ( settings ) { | |
Parent.call ( this, settings ); |
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
color = '#' + ( @model.get 'stroke_color' ) | |
.map ( color ) -> | |
xColor = color.toString 16 | |
if xColor.length is 1 then "0" + xColor else xColor | |
.reduce ( prev, cur, i ) -> | |
if i < 3 then prev + cur else prev |
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
color = '#' + ( @model.get 'stroke_color' ) | |
.map ( color ) -> | |
xColor = color.toString 16 | |
if xColor.length is 1 then "0" + xColor else xColor |
OlderNewer