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
#!py | |
def run(): | |
''' | |
Manage sudo enabled user adds/removes | |
''' | |
users_root = [] | |
if 'users_grp1' in pillar: | |
users_root = users_root + pillar['users_grp1'] |
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
Installing node couchbase driver | |
apt-get install build-essential | |
apt-get install autoconf | |
apt-get install libtool | |
apt-get install libev-dev | |
git clone git://github.com/couchbase/libcouchbase.git |
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 couchbase = require("couchbase"), | |
http = require("http"); | |
var port = 8080; | |
var config = { | |
username : "Administrator", | |
password : "password", | |
hosts : [ "localhost:8091" ], | |
bucket : "mybucket" | |
}; |
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
{% macro g_runit(node_server_name) -%} | |
/etc/sv/g_{{ node_server_name }}: | |
file: | |
- directory | |
- user: myuser | |
- group: myuser | |
- mode: 754 | |
- makedirs: True |
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
<snip> | |
initialize: function() { | |
_.bindAll(this, 'addEvent', 'render'); | |
this.eventFeed = this.options.eventFeed; | |
this.eventFeed.on('add', this.addEvent); | |
}, | |
render: function() { | |
$.get('/views/jsondata', function(data) { |
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
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' |
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
# | |
# 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 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 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 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; | |
} |