Skip to content

Instantly share code, notes, and snippets.

@infinito84
infinito84 / downloadImage.js
Created July 26, 2016 06:35
Easy download of images from facebook, through a facebookid
var request = require('request');
var fs = require('fs')
var data = {
facebookid : '1627151517597811'
}
request('https://graph.facebook.com/'+ data.facebookid +'/picture?type=large')
.pipe(fs.createWriteStream('facebook_'+ data.facebookid +'.jpg'))
.on('close', function(){
var gulp = require('gulp'),
stylus = require('gulp-stylus'),
nib = require('nib'),
$ = require('jquery');
module.exports = {
gulp : function(){
var that = this;
gulp.task('stylus', function () {
var factorial=function(value){
if(value>1){
return value*factorial(value-1)
}
return value;
}
function main(n){
return factorial(n);
}
var fibonacci=function(ant,sig,i,max){
if(i<max){
return fibonacci(sig,ant+sig,++i,max);
}
return ant;
}
function main(n){
return fibonacci(1,1,0,n);
}