View config.rb
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): |
View timeout.js
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://nathanleclaire.com/blog/2013/11/16/the-javascript-question-i-bombed-in-an-interview-with-a-y-combinator-startup/ | |
var processOnTime = function ( next, delay ) { | |
var d = delay; | |
if ( ! next ) { | |
throw new ReferenceError(); | |
} | |
if ( ! d || isNaN ( d ) ) { | |
d = 200; |
View typeChecking.js
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)) { |
View random.js
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 ); | |
}; |
View inheritance.js
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 ); |
View hexToRGB.coffee
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 |
View hexToRGBA.coffee
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 |
View inheritance.coffee
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 |
View Gulpfile.js
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 = { |
View bumper.sh
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 |
OlderNewer