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 install inotify | |
| npm info it worked if it ends with ok | |
| npm info using [email protected] | |
| npm info using [email protected] | |
| npm info preinstall [email protected] | |
| npm info install [email protected] | |
| /usr/bin | |
| Checking for program g++ or c++ : /usr/bin/g++ | |
| Checking for program cpp : /usr/bin/cpp | |
| Checking for program ar : /usr/bin/ar |
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
| You have a nil object when you didn't expect it! | |
| You might have expected an instance of Array. | |
| The error occurred while evaluating nil.[] | |
| Extracted source (around line #45): | |
| 42: .entry | |
| 43: .calc | |
| 44: %p.label Closed Deals | |
| 45: %p.value #{number_with_delimiter @data.deals_closed_for(period)} | |
| 46: %p.chang=display_percent(@data.deals_closed_percent(period)) |
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 socket; // esta variable es global, se ve desde cualquier parte | |
| var serialport = require("serialport"); | |
| var SerialPort = serialport.SerialPort; // localize object constructor | |
| var sp = new SerialPort("/dev/tty-usbserial1"); | |
| serialPort.on("data", function (data) { | |
| if(socket) { | |
| socket.write(data); | |
| } |
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
| Video.find({ytid:video_id}, function(a) { | |
| if (a) { | |
| // Already exists | |
| ok= false; | |
| error= {error:"Video already exists in Playlist"} | |
| } else { | |
| ok= true; | |
| agent.get('http://gdata.youtube.com/feeds/api/videos/'+video_id+'?v=2&alt=json', function(err, res, body) { | |
| console.log("error:"+res); | |
| if (err) return false; |
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
| [email protected] =aaron =rauchg =tjholowaychuk =tmpvar remote Mongoose MongoDB ORM mongodb mongoose orm data datastore nosql | |
| [email protected] =aaron =rauchg =tjholowaychuk =tmpvar remote Mongoose MongoDB ORM mongodb mongoose orm data datastore nosql | |
| [email protected] =aaron =rauchg =tjholowaychuk =tmpvar remote ORM for MongoDB mongodb mongoose orm data datastore nosql | |
| [email protected] =aaron =rauchg =tjholowaychuk =tmpvar remote ORM for MongoDB mongodb mongoose orm data datastore nosql | |
| [email protected] =aaron =rauchg =tjholowaychuk =tmpvar remote ORM for MongoDB mongodb mongoose orm data datastore nosql | |
| [email protected] =aaron =rauchg =tjholowaychuk =tmpvar remote ORM for MongoDB mongodb mongoose orm data datastore nosql | |
| [email protected] =aaron =rauchg =tjholowaychuk =tmpvar remote Mongoose MongoDB ORM mongodb mongoose orm data datastore nosql | |
| [email protected] =aaron =rauchg =tjholowaychuk =tmpvar |
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 app = module.exports = express.createServer(); | |
| app.set('view engine', 'jade'); | |
| app.configure(function(){ | |
| app.use(express.bodyParser()); | |
| app.use(express.cookieParser()); | |
| app.use(express.session({ secret: "a1b2c3d4e5f60000000000000" })); | |
| }); | |
| app.post('/location', function(req, res){ |
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
| // in models.js | |
| var Host= new Schema({ | |
| loc: Array, | |
| updated_at: Date | |
| }); | |
| mongoose.model('Host', Host); | |
| Host.index({loc:'2d'}) | |
| // in domain.js | |
| Host.findRoom= function(id, callback) { |
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
| // in models.js | |
| var Host= new Schema({ | |
| loc: Array, | |
| updated_at: Date | |
| }); | |
| mongoose.model('Host', Host); | |
| Host.index({loc:'2d'}) | |
| // in domain.js | |
| Host.findRoom= function(id, callback) { |
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
| URIError: URI malformed | |
| at decodeURIComponent (native) | |
| at /usr/local/lib/node/.npm/qs/0.0.7/package/lib/querystring.js:28:18 | |
| at Array.reduce (native) | |
| at Object.parse (/usr/local/lib/node/.npm/qs/0.0.7/package/lib/querystring.js:27:6) | |
| at Object.handle (/usr/local/lib/node/.npm/express/2.3.11/package/lib/http.js:83:22) | |
| at next (/usr/local/lib/node/.npm/connect/1.4.3/package/lib/http.js:204:15) | |
| at HTTPServer.handle (/usr/local/lib/node/.npm/connect/1.4.3/package/lib/http.js:217:3) | |
| at HTTPServer.emit (events.js:67:17) | |
| at HTTPParser.onIncoming (http.js:1109:12) |
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
| Room.merge= function(doc, callback) { | |
| Room.findNeighbors(doc, function(n) { | |
| console.log(n); | |
| callback(); | |
| }); | |
| }; | |
| Room.findNeighbors= function(doc, callback) { | |
| var center= doc.get('center'); | |
| var radius= doc.get('radius'); |