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
'use strict'; | |
var amqp = require('amqp'); | |
var connection = amqp.createConnection({ | |
url: process.env.RABBITMQ_EVENT_BUS | |
}); | |
// Randomly generate a routing key. Let's say this is for "posts" |
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
'use strict'; | |
//Testing IronMQ | |
var _ = require('underscore'); | |
var msgBus = require('iron_mq'); | |
var imq = new msgBus.Client({ | |
'token': process.env.IRON_MQ_TOKEN, | |
'project_id': process.env.IRON_MQ_ID | |
}); |
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
'use strict'; | |
var redis = require('redis'), | |
url = require('url'), | |
clientUrlParsed = url.parse(process.env.REDIS_POST_EVENT_BUS), | |
clientPost = redis.createClient(clientUrlParsed.port, clientUrlParsed.hostname, { | |
'auth_pass': clientUrlParsed.auth.split(':')[1] | |
}), |
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
(function(_, Enquire) { | |
'use strict'; | |
window.BackboneEnquireMixin = { | |
enquire: function(breakpoints) { | |
var breakpoint, handler, method, _i, _len, _ref; | |
if (!breakpoints) { | |
breakpoints = this.breakpoints; |
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
{ | |
"afghanistan": { | |
"lat": 33, | |
"lng": 65 | |
}, | |
"albania": { | |
"lat": 41, | |
"lng": 20 | |
}, | |
"algeria": { |
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 noopDirective = function() { | |
return function() {}; | |
}; | |
module.factory('ngBlurDirective', noopDirective); | |
module.directive('ngBlur', ['$parse', | |
function($parse) { | |
return { | |
compile: function($element, attr) { |
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
tar -cz -f modules.tar.gz node_modules/ bower_components/ | |
scp modules.tar.gz [email protected]:/usr/share/www/ci-support | |
rm modules.tar.gz |
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
<script id="<%= dashName %>-fixture" type = "text/template"> | |
@Html.Partial("app/modules/<%= dashName %>/html/<%= dashName %>") | |
</script> |
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
// Semantic Versioning Tool | |
// ======================== | |
// | |
// See: http://semver.org/ | |
// For projects with package.json in the target folder. | |
// | |
// * Author: George Pantazis | |
// | |
// * Usage: | |
// * Major (0.x.x -> 1.0.0) : `node version-update major` |
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 checkActive = function(el) { | |
var self = this, | |
elRect = el.getBoundingClientRect(), | |
winRect = document.documentElement.getBoundingClientRect(), | |
isNearBottom = winRect.bottom - elRect.bottom < 100 && $(document).height() - ($(window).scrollTop() + $(window).height()) < 100; | |
if (elRect.top < 100 && elRect.top > 0 || isNearBottom) { | |
// Element is scrolled into view. | |
} |