This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'), | |
stylus = require('gulp-stylus'), | |
nib = require('nib'), | |
$ = require('jquery'); | |
module.exports = { | |
gulp : function(){ | |
var that = this; | |
gulp.task('stylus', function () { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var factorial=function(value){ | |
if(value>1){ | |
return value*factorial(value-1) | |
} | |
return value; | |
} | |
function main(n){ | |
return factorial(n); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | |
} |