Simple producer, nothing wrong here...
var amqp = require('amqp');
var connection = amqp.createConnection({
port: 5672, host: 'localhost'
});| /** | |
| * Module dependencies. | |
| */ | |
| var strftime = require('strftime'); | |
| /** | |
| * Creates the `record` function for `collection`. | |
| * |
| # | |
| # Multistage. | |
| # | |
| set :stages, %w(production staging) | |
| set :default_stage, "production" | |
| require 'capistrano/ext/multistage' | |
| module.exports = function (redis, code) { | |
| var cache = null; | |
| return function (keys, args, done) { | |
| if (!cache) load(code, curry(evalsha, keys, args, done)) | |
| else evalsha(cache, keys, args, done); | |
| }; | |
| function curry(fn) { |
| var isOldIE = (function(){ | |
| var comment = '<!--[if IE]><i><![endif]-->'; | |
| var div = document.createElement('div'); | |
| div.innerHTML = comment; | |
| return !!div.getElementsByTagName('i').length; | |
| })(); |
| type Message struct { | |
| codec uint32 | |
| meta uint8 | |
| body string | |
| } |
| <input type="text" ng-model="search" placeholder="filter..." /> | |
| <div ng-repeat="item in items | filter:search"> | |
| <!-- goodness --> | |
| </div> |
| /** | |
| * Dependencies. | |
| */ | |
| var Domain = require('domain'); | |
| var http = require('http'); | |
| var app = require('..'); | |
| /** |
| $httpProvider.responseInterceptors.push(function($window){ | |
| return function(promise){ | |
| return promise.then(function(){ | |
| // session is valid, carry along... | |
| return promise; | |
| }, function(error){ | |
| if (error.status == 401) { | |
| // invalid session, need to re-login... | |
| $window.location = '/login'; | |
| } |
| (function(){ | |
| var ScopeShare = angular.module('ScopeShare', []); | |
| ScopeShare | |
| .controller('FormController', function($scope){ | |
| $scope.user = {}; | |
| $scope.submit = function(){ | |
| console.log(JSON.stringify($scope.user)); | |
| }; |