Skip to content

Instantly share code, notes, and snippets.

View adrai's full-sized avatar

Adriano Raiano adrai

View GitHub Profile
@adrai
adrai / blob_meta_infos_while_streaming.js
Last active August 29, 2015 14:07
blob meta infos while streaming
var url = require('url');
var http = require('http');
//var imgUrl = 'http://upload.wikimedia.org/wikipedia/commons/9/95/Big_Pine_landscape.jpg';
var imgUrl = 'http://downloads.xenproject.org/Branding/Images/Mascot/Xen%20Big%20Panda%204242x3129.png';
//var imgUrl = 'http://stackoverflow.com/questions/19934406/verify-mime-type-of-uploaded-files-in-node-js';
var options = url.parse(imgUrl);
http.get(options, function (response) {
@adrai
adrai / blob_storage_spike.js
Last active August 29, 2015 14:06
atmos (s3) + local (fs)
'use strict';
var aws = require('aws-sdk'),
s3blobs = require('s3-blob-store'),
fsblobs = require('fs-blob-store'),
fs = require('fs'),
path = require('path');
var workLocally = false;
@adrai
adrai / example.js
Created September 17, 2014 14:08
oboe + restify
var restify = require('restify'),
oboe = require('oboe');
var client = restify.createClient({
url: 'http://localhost:3000',
version: '*'
});
client.get('/data', function (err, req) {
if (err) {