I don't use my AppleTV and I've had a 500GB external HD sitting around that isn't really getting use either. I thought I'd make use of both of these things and see if I could turn my AppleTV into a NAS device that would also allow for BitTorrent downloading and act as a transcoding DLNA MediaServer that I could access from my Xbox 360 and/or PS3.
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 info it worked if it ends with ok | |
npm verb cli [ 'bundle', 'vendor', '--loglevel', 'verbose' ] | |
npm info version 0.1.27-9 | |
npm verb config file /Users/mbleigh/.npmrc | |
npm verb config file /usr/local/Cellar/node/0.2.0/etc/npmrc | |
npm info bundle [ 'vendor' ] | |
npm verb caching package.json | |
npm verb packTar . /Users/mbleigh/.node_libraries/.npm/.cache/flockfeed/v0.0.1alpha/package.tgz | |
npm verb success gzip "--stdout" | |
npm verb success tar "cv" "--exclude" ".git" "-X" "/Users/mbleigh/.node_libraries/.npm/npm/0.1.27-9/package/lib/utils/default.npmignore" "flockfeed" |
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
require.paths.unshift './vendor' | |
Twitter = require './twitter' | |
# ... | |
app.get '/sign_in', (req, res)-> | |
Twitter.consumer.getOAuthRequestToken (error, token, secret, url, params)-> | |
# save it to the session |
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
// Change the _open function in mongoose's connection.js to this | |
// and you'll be able to connect to MongoHQ URLS! | |
_open: function(options){ | |
var self = this; | |
this.db = new mongo.Db(this.name, new mongo.Server(this.uri.hostname, this.uri.port, options)); | |
if (this.uri.auth) { | |
var auth = this.uri.auth.split(':'); | |
this.db.open(function(err) { |
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.error (err,req,res,next)-> | |
if process.env.RACK_ENV == 'production' | |
hoptoad.key = 'hoptoadkey' | |
hoptoad.notify(err) | |
res.render 'error.ejs', 500 |
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
events:12 | |
throw arguments[1]; | |
^ | |
Error: Parse Error | |
at Client.ondata (http:882:22) | |
at IOWatcher.callback (net:494:29) | |
at node.js:764:9 |
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
# Thanks to http://github.com/collectiveidea/open_id_authentication for | |
# 99% of this code, I just collapsed it into one file and made small | |
# changes to work with newer versions of MongoMapper. | |
require 'openid/store/interface' | |
module OpenID | |
module Store | |
class Mongo < OpenID::Store::Interface | |
class Association |
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
# Data culled from Wikipedia. Could be cleaner, but this is nice and simple. | |
major_cities = [["New York", "New York"], ["Los Angeles", "California"], ["Chicago", "Illinois"], ["Houston", "Texas"], ["Philadelphia", "Pennsylvania"], ["Phoenix", "Arizona"], ["San Antonio", "Texas"], ["San Diego", "California"], ["Dallas", "Texas"], ["San Jose", "California"], ["Jacksonville", "Florida"], ["Indianapolis", "Indiana"], ["San Francisco", "California"], ["Austin", "Texas"], ["Columbus", "Ohio"], ["Fort Worth", "Texas"], ["Charlotte", "North Carolina"], ["Detroit", "Michigan"], ["El Paso", "Texas"], ["Memphis", "Tennessee"], ["Baltimore", "Maryland"], ["Boston", "Massachusetts"], ["Seattle", "Washington"], ["Washington", "District of Columbia"], ["Nashville", "Tennessee"], ["Denver", "Colorado"], ["Louisville", "Kentucky"], ["Milwaukee", "Wisconsin"], ["Portland", "Oregon"], ["Las Vegas", "Nevada"], ["Oklahoma City", "Oklahoma"], ["Albuquerque", "New Mexico"], ["Tucson", "Arizona"], ["Fresno", "California"], ["Sacrame |
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
GameRouter = new Backbone.Router.extend | |
routes: | |
"start": "start" | |
"draw": "draw" | |
start: -> | |
this.navigate('/draw') | |
draw: -> | |
$('#sketchpad .front > div').hide() | |
$('#draw').show() |