Skip to content

Instantly share code, notes, and snippets.

View ncb000gt's full-sized avatar
💭
Slapping keyboard...

Nick Campbell ncb000gt

💭
Slapping keyboard...
View GitHub Profile
@ncb000gt
ncb000gt / app.js
Created February 15, 2011 21:38 — forked from mauritslamers/app.js
App.prototype.save = function() {
var that = this,
stylesheets = [],
scripts = [],
fw,i,len,
stylesheet, script, html, savr;
var Saver = function(app, file) {
var that = this;
App.prototype.save = function() {
var that = this,
stylesheets = [],
scripts = [],
fw,i,len,
stylesheet, script, html, savr;
var Saver = function(app, file) {
var that = this;
var http = require('http'),
util = require('util');
var options = {
host: 'api.twitter.com',
port: 80,
path: '/1/statuses/public_timeline.json'
};
var chunks = [],
total = 0;
function serve_cgi(filename, res, get, post, method, vhost, port, pinfo, get, sname, uri, droot) {
var env = {
CONTENT_LENGTH: post.length,
CONTENT_TYPE: 'application/x-www-form-urlencoded',
DOCUMENT_ROOT: droot,
GATEWAY_INTERFACE: 'CGI/1.1',
HTTP_HOST: vhost,
QUERY_STRING: get,
REDIRECT_STATUS: '200',
REQUEST_METHOD: method,