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.authenticateUserByHash = function(name, hash, fn) { | |
| winston.info('[authenticateUserByHash] Starting hash auth for ' + name + ' with hash ' + hash); | |
| var rKey = 'user:' + name; | |
| rc.get(rKey, function(err, data){ | |
| if(err) return fn(new Error('[authenticateUserByHash] GET failed for key: ' + rKey + ' for value: ' + name)); | |
| if (!data) { | |
| fn(new Error('[authenticateUserByHash] user: ' + name + ' not found in store.')); | |
| } |
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
| function purgatory() { | |
| var inPurgatory = true; | |
| return { | |
| tryToGetOut: function (message, client, cb) { | |
| auth.authenticateUserByHash(message.user, message.hash, function(err, data) { | |
| if (err) { | |
| winston.info('[purgatory] Bad auth. Client still in purgatory'); | |
| inPurgatory = true; | |
| } | |
| else { |
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 NodeChatView = Backbone.View.extend({ | |
| initialize: function (options) { | |
| var main, that; | |
| _.bindAll(this, 'addUser', 'removeUser', 'addChat', 'removeChat', 'triggerAutoComplete', 'suggestAutoComplete', 'sendMessage'); | |
| this.model.users.bind('add', this.addUser); | |
| this.model.users.bind('remove', this.removeUser); | |
| this.model.chats.bind('add', this.addChat); | |
| this.model.chats.bind('remove', this.removeChat); | |
| this.newMessages = 0; |
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
| srcdir = '.' | |
| blddir = 'build' | |
| VERSION = '0.0.1' | |
| def set_options(opt): | |
| opt.tool_options('compiler_cxx') | |
| def configure(conf): | |
| conf.check_tool('compiler_cxx') | |
| conf.check_tool('node_addon') |
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
| <snipped> | |
| var watchFolderTree = function (fPath, fn) { | |
| if (typeof fn !== 'function') { | |
| throw { | |
| name: 'TypeError', | |
| message: 'fn must be a function' | |
| }; | |
| } | |
| //Do lots of things to watch the folder tree |
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
| socket.on('connection', function(client){ | |
| // helper function that goes inside your socket connection | |
| client.connectSession = function(fn) { | |
| if (!client.request || !client.request.headers || !client.request.headers.cookie) { | |
| disconnectAndRedirectClient(client,function() { | |
| console.log('Null request/header/cookie!'); | |
| }); | |
| return; | |
| } |
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
| 'file remove in watched dir': { | |
| topic: function () { | |
| var lPath = tPath + '/t2'; | |
| try { | |
| fs.mkdirSync(lPath, '0755'); | |
| } | |
| catch (Exception) {} | |
| return lPath; | |
| }, | |
| 'calling stalker.watch': { |
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
| include_recipe "mercurial" | |
| include_recipe "hg" | |
| execute "build aggdraw" do | |
| command "python setup.py clean build install" | |
| cwd "/home/django/source/aggdraw" | |
| action :nothing | |
| end | |
| hg "/home/django/source/aggdraw" do |
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
| # | |
| # Cookbook Name:: aggdraw::install | |
| # Recipe:: default | |
| # | |
| # Copyright 2011, SGL | |
| # | |
| # All rights reserved - Do Not Redistribute | |
| # | |
| # Download and install aggdraw from our local repository |
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
| merb : chef-server (api) : worker (port 4000) ~ Started request handling: Mon Dec 19 15:34:58 +0000 2011 | |
| merb : chef-server (api) : worker (port 4000) ~ Params: {"action"=>"show", "id"=>"node", "q"=>"chef_environment:internal_test", "start"=>"0", "rows"=>"1000", "controller"=>"search", "sort"=>"X_CHEF_id_CHEF_X asc"} | |
| merb : chef-server (api) : worker (port 4000) ~ Connection refused - connect(2) - (Errno::ECONNREFUSED) | |
| /usr/lib/ruby/1.8/net/http.rb:560:in `initialize' | |
| /usr/lib/ruby/1.8/net/http.rb:560:in `open' | |
| /usr/lib/ruby/1.8/net/http.rb:560:in `connect' | |
| /usr/lib/ruby/1.8/timeout.rb:53:in `timeout' | |
| /usr/lib/ruby/1.8/timeout.rb:101:in `timeout' | |
| /usr/lib/ruby/1.8/net/http.rb:560:in `connect' | |
| /usr/lib/ruby/1.8/net/http.rb:553:in `do_start' |
OlderNewer