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
| module.exports.bootstrap = function (cb) { | |
| redisClient.subscribe('scoredTweets'); | |
| redisClient.on( 'message', function ( channel , message ) { | |
| console.log( REDIS , MESSAGE_RECEIVED, SCORED_TWEETS ) | |
| sails.io.emit( 'scoredTweets' , message ); | |
| }); | |
| cb(); | |
| }; |
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
| define([],function(){ | |
| var subscribed = {}; | |
| /** | |
| * Subscription Object, holds an idientifier and a callback | |
| * @param eventName | |
| * @param callback | |
| * @returns {{eventName: *, callback: *}} | |
| * @constructor | |
| */ | |
| var Subscription = function (eventName, callback) { |
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 Viewport = function($, window) { | |
| var that = this; | |
| var $window = $(window); | |
| $window.resize(function(){ that.windowWasResized(window); }); | |
| $window.scroll(function(){ that.windowWasScrolled(window); }); | |
| that.windowWasResized(window); | |
| }; | |
| $.extend(Viewport.prototype, { | |
| height : 1, | |
| windowWasResized : function(w) { this.height = $(w).height(); }, |
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 animateObject = function (callback, duration) { | |
| var startTime = 0; | |
| var slideFrame = function(animationMiliSeconds) { | |
| startTime = startTime || animationMiliSeconds; | |
| var timeTaken = animationMiliSeconds - startTime; | |
| var completion = timeTaken / duration; | |
| if (animationMiliSeconds <= startTime+duration) { |
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 minwidth ($width) { | |
| @media only screen and (min-width : $width ) { | |
| @content; | |
| } | |
| } | |
| @mixin maxwidth ($width) { | |
| @media only screen and (max-width : $width ) { | |
| @content; | |
| } | |
| } |
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: Matt Jewell - mattjewell.co.uk | |
| Borrows HEAVILY from thulstrup / compass-retina-sprites.scss https://gist.github.com/thulstrup/2140082 | |
| but ditches the media queries and serves retina to all | |
| */ | |
| // SET UP SPRITES | |
| @import "autosprite/*.png"; | |
| $sprite-map: sprite-map("autosprite/*.png"); |
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
| monthContainers.each(function(){ | |
| var posts = $(this).children('.post:visible'); | |
| if (posts.length === 0) { /* hide the date */ } | |
| else { /* show the date */ } | |
| }) |
NewerOlder