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
dropbox.getAccessToken(email, password, function (err) { | |
if (err) return console.error('Error: ' + err) | |
dropbox.getAccountInfo(function (err, data) { | |
if (err) return console.error('Error: ' + err) | |
console.log(data.display_name + ', ' + data.email) | |
}) | |
}) |
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 sys = require('sys') | |
, DropboxClient = require('dropbox').DropboxClient | |
, express = require('express') | |
, app = express.createServer() | |
, consumer_key = '85m56oj9a6ekr1k' | |
, consumer_secret = 'kirag26pr0pbf3z' | |
app.configure(function () { | |
app.use(express.logger()) | |
app.use(express.bodyDecoder()) |
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
app.configure(function() { | |
app.use(express.logger()); | |
app.use(express.bodyDecoder()); | |
app.use(express.cookieDecoder()); // Cookie-decoding. | |
app.use(express.session()); // Session-handling. | |
}); |
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 sys = require('sys'), | |
http = require('http'), | |
OAuth = require('oauth').OAuth, | |
DropboxClient = require('dropbox').DropboxClient, | |
express = require('express'), | |
app = express.createServer(); | |
// Initialize OAuth object. | |
var API_URI = 'http://api.dropbox.com/', | |
API_VERSION = '0', |
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
$ npm cache ls | |
npm info it worked if it ends with ok | |
npm info using npm@0.2.8-1 | |
npm info using node@v0.2.4 | |
npm info cache nothing found | |
npm ok | |
$ npm cache add dropbox 0.1.0 | |
npm info it worked if it ends with ok | |
npm info using npm@0.2.8-1 | |
npm info using node@v0.2.4 |
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 sys = require('sys'), | |
http = require('http'), | |
OAuth = require('oauth').OAuth, | |
DropboxClient = require('dropbox').DropboxClient, | |
express = require('express'), | |
app = express.createServer(); | |
// Initialize OAuth object. | |
var API_URI = 'http://api.dropbox.com/', | |
API_VERSION = '0', |
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
access_token = token_res['token'], | |
access_token_secret = token_res['secret'], | |
dropbox = new DropboxClient(oauth, | |
access_token, | |
access_token_secret); | |
res.redirect('/file_browser'); |
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
#! /bin/sh | |
# | |
# A little script to generate new Scala+Maven projects. | |
set -e | |
if test $# -lt 1; then | |
echo "usage: $0 <project name>" | |
exit 1 | |
fi |
NewerOlder