Skip to content

Instantly share code, notes, and snippets.

anonymous
anonymous / config.json
Created December 13, 2012 20:08
{
"key": "/home/me/foo_key",
"user": "foo",
"targets": {
"all": [
"example.org#Default user, key auth, port 22",
"root@example.net:2233#Root user, key auth, port 2233",
"root:toor@example.com#Root user, password auth, port 22"
],
"production": [
@cjpartridgeb
cjpartridgeb / gist:3688880
Created September 10, 2012 04:28
Simple curry example
// assuming http.get fires back err, result
function curryGet = function(url) {
return function(callback) {
http.get(url, callback);
}
}
async.parallel([
@simianhacker
simianhacker / gist:3308895
Created August 9, 2012 23:11
Upstart template for Node.js
description "Node server for #{application} (#{node_env})"
start on (net-device-up
and local-filesystems
and runlevel [2345])
stop on runlevel [016]
script
exec sudo -u nobody sh -c "NODE_ENV=#{node_env} #{path_to_node} #{script_name}"
end script
@mscdex
mscdex / node_debian_init.sh
Created August 6, 2011 09:33 — forked from peterhost/node_debian_init.sh
Daemon init script for node.js based app/server (DEBIAN/UBUNTU)
#! /bin/sh
# ------------------------------------------------------------------------------
# SOME INFOS : fairly standard (debian) init script.
# Note that node doesn't create a PID file (hence --make-pidfile)
# has to be run in the background (hence --background)
# and NOT as root (hence --chuid)
#
# MORE INFOS : INIT SCRIPT http://www.debian.org/doc/debian-policy/ch-opersys.html#s-sysvinit
# INIT-INFO RULES http://wiki.debian.org/LSBInitScripts
# INSTALL/REMOVE http://www.debian-administration.org/articles/28