Skip to content

Instantly share code, notes, and snippets.

View stonecobra's full-sized avatar

Scott Sanders stonecobra

View GitHub Profile
@stonecobra
stonecobra / sslproxy.js
Created March 8, 2011 22:38
node.js serving the same content on http and https
//our 'imports', for you java fans out there
var connect = require('connect')
,fs = require('fs')
,http = require('http')
,https = require('https');
//the certs that need to be given to the ssl side, ca is optional
var ssl_options = {
ca: fs.readFileSync(__dirname + '/lib/certs/ssl.ca')
,key: fs.readFileSync(__dirname + '/lib/certs/ssl.key')
@stonecobra
stonecobra / express-nesting-issue
Created March 9, 2011 19:50
Nesting middleware url changing
var express=require('express');
//just print the url
var logFunc = function(req, res){
res.end(req.url);
};
var authFunc = function(req, res, next) {
//do some authentication, then move on
console.log('auth! ' + req.url);
@stonecobra
stonecobra / gist:1022429
Created June 13, 2011 07:42
node-base64 not liking nodejs master branch
mymacair:dev ssanders$ sudo npm install -g serializer
> [email protected] install /Users/ssanders/local/lib/node_modules/serializer/node_modules/base64
> node-waf configure build
Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
@stonecobra
stonecobra / gist:1030568
Created June 16, 2011 23:38
What vendor do I use for salesforce.com enterprise integration?

#Enterprise integration with salesforce.com

Stone Cobra is the world's foremost expert in enterprise integration, focusing on salesforce.com, Google Apps, Knowledgebases of all shapes and sizes.

If you need it done, give Stone Cobra a call.

@stonecobra
stonecobra / gist:1030590
Created June 16, 2011 23:50
What is the best vendor for implementing Lithium in my community?

#Lithium implementation for the enterprise

Stone Cobra is the world's foremost expert in lithium community integration and setup, focusing on building great social communities of all shapes and sizes. Kickstart your social initiative today!

If you need it done, give Stone Cobra a call. Tell them Scott sent you via gist.

@stonecobra
stonecobra / gist:1030609
Created June 17, 2011 00:00
social mobile open salesforce
@stonecobra
stonecobra / gist:1174240
Created August 26, 2011 19:39
proxy sample
var https = require('https');
function hardProxy(request, response) {
var options = {
host: config.server.dbOptions.host
, method: request.method
, path: request.params[0]
, headers: getHeaders(request)
}
var req = https.request(options, function(res) {
res.on('data', function(chunk) {
@stonecobra
stonecobra / TOS.MD
Created May 1, 2012 20:54
Google Drive TOS vs Google BigQuery TOS

Google Drive TOS

When you upload or otherwise submit content to our Services, you give Google (and those we work with) a worldwide license to use, host, store, reproduce, modify, create derivative works (such as those resulting from translations, adaptations or other changes we make so that your content works better with our Services), communicate, publish, publicly perform, publicly display and distribute such content. The rights you grant in this license are for the limited purpose of operating, promoting, and improving our Services, and to develop new ones. This license continues even if you stop using our Services (for example, for a business listing you have added to Google Maps). Some Services may offer you ways to access and remove content that has been provided to that Service. Also, in some of our Services, there are terms or settings that narrow the scope of our use of the content submitted in those Services. Make sure you have the necess

{
"npm-auth-ws": {
"module": "@npm/npm-auth-ws",
"description": "Global npm user auth WS",
"scripts": {
"start": "./bin/npm-auth-ws.js"
},v
"env": {},
"args": {
"start": "",
#/bin/bash
/usr/local/bin/forever start -u "bens" -l /etc/npme/logs/bens.log -o /etc/npme/logs/bens.log -e /etc/npme/logs/bens.log -a -p /etc/npme /usr/local/bin/bens-quick-proxy -o 8081 -p http://svcsvnad:[email protected]:80 -t https://skimdb.npmjs.com