This file contains hidden or 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 hidden or 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 hidden or 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
$ cvs -z3 -d:pserver:[email protected]:/sources/screen co screen | |
$ curl http://old.evanmeagher.net/files/gnu-screen-vertsplit.patch > gnu-screen-vertsplit.patch | |
$ cd screen/src | |
$ patch < ../../gnu-screen-vertsplit.patch | |
$ ./configure --enable-locale --enable-telnet --enable-colors256 --enable-rxct_osc | |
$ make | |
$ sudo make install |
This file contains hidden or 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 hidden or 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 hidden or 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 [email protected] | |
npm info using [email protected] | |
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 [email protected] | |
npm info using [email protected] |
This file contains hidden or 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 hidden or 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'); |
NewerOlder