Skip to content

Instantly share code, notes, and snippets.

Alexandru Vlăduţu alessioalex

Block or report user

Report or block alessioalex

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View 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 Mar 29, 2011
From Pedro Teixeira's http://nodetuts.com/tutorials/12-file-uploads-using-nodejs-and-express.html but with connect-form instead of multipart-js
View app.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 Jun 20, 2011 — forked from crcastle/nodejs.sh
Node.js tartup script for AWS EC2 Linux box
View nodejs.sh
#!/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 Jun 20, 2011 — forked from peterhost/node_debian_init.sh
Daemon init script for node.js based app/server (DEBIAN/UBUNTU)
View node_debian_init.sh
#! /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
View gist:1049895
// Expose modules in ./support for demo purposes
require.paths.unshift(__dirname + '/../../support');
/**
* Module dependencies.
*/
var express = require('../../lib/express')
, form = require('connect-form');
View gist:1049926
// 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 Jul 4, 2011 — forked from shimondoodkin/APPNAME
init.d script for node.js for debian
View APPNAME
#! /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
View gist:1070395
var http = require('http'),
faye = require('faye'),
fs = require('fs'),
path = require('path');
var bayeux = new faye.NodeAdapter({
mount: '/faye',
timeout: 45
});
View gist:1074953
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));
View setting_up_a_new_remote_git_repository.textile

(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:

You can’t perform that action at this time.