Skip to content

Instantly share code, notes, and snippets.

View BenziAhamed's full-sized avatar
🏠
Working from home

Benzi BenziAhamed

🏠
Working from home
  • Meta
  • London, UK
View GitHub Profile
@BenziAhamed
BenziAhamed / one.js
Created March 15, 2013 16:25
Couple of test files in here
File 1 for testing GitFred
@BenziAhamed
BenziAhamed / getfact.js
Created March 10, 2013 19:37
MentalFloss.com has a great amazing facts section online. Here is a NodeJS version of it for command line happiness. To use, run as "node getfact.js"
var http = require('http');
var options = {
host: 'mentalfloss.com',
path: '/api/1.0/views/amazing_facts.json?limit=1&display_id=xhr&bypass=1'
}
var request = http.request(options, function (res) {
var data = [];
res.on('data', function (chunk) {
data = JSON.parse(chunk.toString());