Skip to content

Instantly share code, notes, and snippets.

View stvnwrgs's full-sized avatar
🪁
Building something new

Steven Wirges stvnwrgs

🪁
Building something new
View GitHub Profile
@epadillas
epadillas / client.js
Created July 14, 2013 10:26
Send cookies for the socket.io handshake (sails.js)
// Send cookies for the socket.io handshake (sails.js)
// Based on https://gist.github.com/jfromaniello/4087861
// Socket.io open ticket (started by jfromaniello):
// https://github.com/LearnBoost/socket.io-client/pull/512
var io = require('socket.io-client');
var request = require('request');
var xhr = require('socket.io-client/node_modules/xmlhttprequest');
var xhrOriginal = require('xmlhttprequest');
@eculver
eculver / APPNAME
Created July 5, 2011 17:35 — 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