Skip to content

Instantly share code, notes, and snippets.

View daralthus's full-sized avatar

Peter Kadlot daralthus

  • Makethink
  • London
View GitHub Profile
@daralthus
daralthus / _.md
Created October 8, 2012 13:35
Tributary inlet
//the most simple http client:
//http://nodejs.org/api.html#http-client-183
//dependencies
var http = require('http') //http module
, sys = require('sys'); //some node core utils
//setup the request (this is something like curl...)
var httpclient = http.createClient( 80, 'finance.yahoo.com' )
, page = "/";
@daralthus
daralthus / app.js
Created October 21, 2010 13:29
live quotes
//the most simple http client:
//http://nodejs.org/api.html#http-client-183
//dependencies
var http = require('http') //http module
, sys = require('sys'); //some node core utils
//setup the request (this is something like curl...)
var httpclient = http.createClient( 80, 'streamerapi.finance.yahoo.com' )
, page = "/streamer/1.0?s=AAPL,USD=X&o=AAPL,DELL,^DJI,^IXIC,^GSPC,^TYX,^RUT&k=a00,a50,b00,b60,c10,g00,h00,j10,l10,p20,t10,v00,z08,z09&j=c10,j10,l10,p20,t10,v00&r=0&marketid=us_market&callback=parent.yfs_u1f&mktmcb=parent.yfs_mktmcb&gencallback=parent.yfs_gencb";