Skip to content

Instantly share code, notes, and snippets.

@devandy devandy/gist:3487738
Created Aug 27, 2012

What would you like to do?
production code
exports.Archive = class Archive
constructor: (@set = 'm12') ->
@items = []
load: (cb) ->
http.get {host: '', path: "/query?q=e%3A#{@set}&v=list&s=cname"}, (res) =>
rawDataset = ''
res.on 'data', (chunk) =>
rawDataset += chunk.toString()
res.on 'end', =>
top: (amount) ->
_.first(@items, amount)
readAll: ->
parse: (rawDataset) ->
@console.log 'parsing'
@items = $('tr.even,tr.odd', $(rawDataset)).map (index, tr) =>
id = $('td', $(tr)).first().text()
id: id
imageUrl: "{@set}/#{id}.jpg"

This comment has been minimized.

Copy link
Owner Author

commented Aug 27, 2012

info: Creating snapshot 0.0.1-14
info: Updating app pol
info: Activating snapshot 0.0.1-14 for pol
info: Starting app pol
error: Error running command deploy
error: Nodejitsu Error (500): Internal Server Error
error: There was an error while attempting to start your application.
error: Error spawning drone
error: Script prematurely exited
error: This type of error is usually a user error.
error: Error output from your application:
error: TypeError: Cannot read property 'prototype' of undefined
error: at create
error: at
error: at Object.
error: at Module._compile (module.js:449:26)
error: at Object.Module._extensions..js (module.js:467:10)
error: at Module.load (module.js:356:32)
error: at Function.Module._load (module.js:312:12)
error: at Module.require (module.js:362:17)
error: at require (module.js:378:17)
error: at Object.
info: Nodejitsu not ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.