This file contains hidden or 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
| $(document) | |
| .on('ajax:loading', function() {alert("loading!"); console.log(['loading',arguments])}) | |
| .on('ajax:success', function(data, status, xhr) {alert("success!"); console.log(['success',arguments])}) | |
| .on('ajax:failure', function(xhr, status, error) {alert("failure!"); console.log(['failure',arguments])}) | |
| .on('ajax:complete', function() {alert("complete!"); console.log(['complete',arguments])}); |
This file contains hidden or 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
| @mixin lighter_link($color, $change:20%){ | |
| color: $color; | |
| &:hover{ | |
| color: lighten($color, $change); | |
| } | |
| } | |
| @mixin darker_link($color, $change:20%){ | |
| color: $color; | |
| &:hover{ | |
| color: darken($color, $change); |
This file contains hidden or 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 Chart = function(){ | |
| var self = this; | |
| self.setData = function(data){ | |
| self.data = google.visualization.arrayToDataTable(data); | |
| }; | |
| self.bar = function(){ | |
| self.activeChart = new google.visualization.BarChart(self.el); | |
| self.activeChart.draw(self.data, self.options); | |
| }; | |
| self.column = function(){ |
This file contains hidden or 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 verySimplePreloader = function(images){ | |
| /* | |
| Simply loads images into cache. Accepts a single URL, or an array of URLs | |
| */ | |
| if(!images instanceof Array) | |
| images = [images]; | |
| for (var i = 0; i < images.length; i++){ | |
| new Image().src = images[i]; | |
| } |
This file contains hidden or 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
| exports.trimSouthEast = function(files){ | |
| /* | |
| * Trims the bottom and right edges | |
| */ | |
| files.forEach(function(file, i){ | |
| var origFile = __dirname + file; | |
| var tempFile1 = os.tmpDir() + 'image1_' +i+'.png'; | |
| var tempFile2 = os.tmpDir() + 'image2_' +i+'.png'; | |
| exec("convert "+file+" -gravity North -background white -splice 0x1 -background black -splice 0x1 -trim +repage -chop 0x1 "+tempFile1,function(){ |
This file contains hidden or 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
| Backbone.View.prototype.assign = function(set, preventEmpty) { | |
| /* | |
| accepts an object of selectors:arrays of views | |
| maps each of the views to the selector | |
| */ | |
| var self = this; | |
| //store all subviews | |
| self.assignments = _.extend(self.assignments||{},set); |
This file contains hidden or 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
| source 'https://rubygems.org' | |
| ruby '2.1.0' | |
| gem 'rails', '4.0.3' | |
| gem 'pg' | |
| gem 'mysql2' | |
| gem 'foreman' | |
| gem 'puma' | |
| gem 'rails_config' |
This file contains hidden or 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
| /* Hounslow styleguide */ | |
| /* Bootstrap defaults */ | |
| /*! normalize.css v2.1.3 | MIT License | git.io/normalize */ | |
| article, | |
| aside, | |
| details, | |
| figcaption, | |
| figure, | |
| footer, | |
| header, |
This file contains hidden or 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
| .element { | |
| position: relative; | |
| top: 50%; | |
| transform: translateY(-50%); | |
| } | |
| SASS: | |
| @mixin vertical-align { | |
| position: relative; |
This file contains hidden or 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
| /* | |
| * Author: john.farrow@aerian.com | |
| */ | |
| define([], function() { | |
| var init = function(cfg) { | |
| require.config({ | |
| baseUrl: cfg.baseUrl | |
| }); | |
| require(['./scrubbable'], function(Scrubbable) { | |
| var app = new Scrubbable(); |