Skip to content

Instantly share code, notes, and snippets.

View alessioalex's full-sized avatar

Alexandru Vlăduţu alessioalex

View GitHub Profile
@alessioalex
alessioalex / nodejs
Created March 24, 2011 10:14 — forked from mvrilo/nodejs
# node.js app under nginx
upstream node {
server 127.0.0.1:8001;
}
server {
listen 80;
server_name node;
@alessioalex
alessioalex / app.js
Created March 29, 2011 19:56
From Pedro Teixeira's http://nodetuts.com/tutorials/12-file-uploads-using-nodejs-and-express.html but with connect-form instead of multipart-js
var express = require('express'),
form = require('connect-form'),
fs = require('fs'),
util = require('util');
var app = express.createServer(
form({keepExtensions: true})
);
// switch between development and production like this:
@alessioalex
alessioalex / nodejs.sh
Created June 20, 2011 09:42 — forked from crcastle/nodejs.sh
Node.js tartup script for AWS EC2 Linux box
#!/bin/bash
# nodejs - Startup script for node.js server
# chkconfig: 35 85 15
# description: node is an event-based web server.
# processname: node
# server: /path/to/your/node/file.js
# pidfile: /var/run/nodejs.pid
#
@alessioalex
alessioalex / node_debian_init.sh
Created June 20, 2011 09:42 — 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
// Expose modules in ./support for demo purposes
require.paths.unshift(__dirname + '/../../support');
/**
* Module dependencies.
*/
var express = require('../../lib/express')
, form = require('connect-form');
// Expose modules in ./support for demo purposes
require.paths.unshift(__dirname + '/../../support');
/**
* Module dependencies.
*/
var express = require('../../lib/express')
, form = require('connect-form');
@alessioalex
alessioalex / APPNAME
Created July 4, 2011 06:12 — forked from shimondoodkin/APPNAME
init.d script for node.js for debian
#! /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
var http = require('http'),
faye = require('faye'),
fs = require('fs'),
path = require('path');
var bayeux = new faye.NodeAdapter({
mount: '/faye',
timeout: 45
});
var Controller = require(GO.paths.controller);
GO.aop = require(GO.paths.vendor + '/aop');
GO.time = require(GO.paths.vendor + '/bm');
var Application = function(app) {
app.get('*', function(req, res, next) {
var ctrl = new Controller(req, res, next);
// GO.Socket.emit('data', 'custom2: ' + GO.utils.uid(10));

(a gist based on the old toolmantim article on setting up remote repos)

To collaborate in a distributed development process you’ll need to push code to remotely accessible repositories.

This is somewhat of a follow-up to the previous article setting up a new rails app with git.

For the impatient

Set up the new bare repo on the server: