View gist:31e4c5e4d37fb477b15c
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 |
View cred-proc-meat.js
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'); |
View app-final.js
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', |
View npm-cache-clean-bug.txt
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 |
View app-session-final.js
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', |
View app-configure-block.js
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. | |
}); |
View file-browser-with-dropbox-node-0.2.0.js
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()) |
View dropbox-node-0.2.0-example.js
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) | |
}) | |
}) |
View rename-file-and-buffer.el
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
;; Originally from stevey, adapted to support moving to a new directory. | |
;; http://stackoverflow.com/questions/384284/can-i-rename-an-open-file-in-emacs | |
(defun rename-file-and-buffer (new-name) | |
"Renames both current buffer and file it's visiting to NEW-NAME." | |
(interactive | |
(progn | |
(if (not (buffer-file-name)) | |
(error "Buffer '%s' is not visiting a file!" (buffer-name))) | |
(list (read-file-name (format "Rename %s to: " (file-name-nondirectory | |
(buffer-file-name))))))) |
View gist:1143421
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
yes 123482736951872309587349057348056239146823756892376589237469236759034285709238470192384723975634895763894567981234902042387509324875093246709126374093476509137649023187409213865092386549034137849127340983729084172309487129037490182374901823740981273094817239041234740213 | lolcat |
OlderNewer