Skip to content

Instantly share code, notes, and snippets.

{
"fields": [ "name", "keywords", "description", "author", "version",
"stars" ],
"query": {
"function_score": {
"query": {
"multi_match": {
"query": "underscore",
"fields": [ "name^4", "keywords", "description", "readme" ]
}
assert.js:92
throw new assert.AssertionError({
^
AssertionError: path must be a string
at Module.require (module.js:362:3)
at require (module.js:380:17)
at internals.Pack._createCache (/Users/rockbot/npm-inc/newww/node_modules/hapi/lib/pack.js:87:36)
at new module.exports.internals.Pack (/Users/rockbot/npm-inc/newww/node_modules/hapi/lib/pack.js:53:18)
at new module.exports.internals.Server (/Users/rockbot/npm-inc/newww/node_modules/hapi/lib/server.js:129:21)
at Object.<anonymous> (/Users/rockbot/npm-inc/newww/server.js:6:14)
@rockbot
rockbot / gist:9b7cfb14d4f2463e998b
Last active August 29, 2015 14:16
JSConf Community Research

Hi JS Meetup Organizers!

The JSConf team is doing a bit of research about JavaScript-focused meetup groups around the country.

We're curious to know what meetups look like in cities around the US - if you've got a moment, we'd love it if you could fill out a small survey!

Of greatest interest to us is what kind of talks have been given at your meetup in 2014. We want to know what talks were given and who gave those talks. I realize this might be a bit of a hassle to put together, so at a minimum, if you have a link we can look into it directly :)

As a bonus, we're raffling off a JSConf ticket, which will go to one lucky organizer (but you'll only be entered if you fill out a form ;-)). To be part of the raffle, please let us know about your meetup group by March 15, 2015. (If you win the free ticket and already purchased a ticket, JSConf will refund you! Or you can transfer it to a friend!)

@rockbot
rockbot / nodejitsu_port_error
Created March 13, 2012 18:24
Error from deploying app to Nodejitsu for the first time
error: Error running command deploy
error: Nodejitsu Error (500): Internal Server Error
error:
error: There was an error while attempting to start your application.
error: Error spawning drone
error: Script prematurely exited
error:
error: This type of error is usually a user error.
error: Error output from your application:
error:
@rockbot
rockbot / gist:2030567
Created March 13, 2012 18:38
Nodejitsu Error (500)/App name/subdomain combination is not available
info: Welcome to Nodejitsu
info: It worked if it ends with Nodejitsu ok
info: Executing command deploy
info: Analyzing your application dependencies in app.js
warn: No application exists for CrowdNotes
info: Checking app availability CrowdNotes
error: The subdomain you have requested is already in use.
help:
help: The subdomain is where your application will reside.
help: Your application will then become accessible at: http://yourdomain.nodejitsu.com
var mod = require('module-name')
var moduleName = function () {
... // your module goes here
};
module.exports = moduleName;
@rockbot
rockbot / gist:3750961
Created September 19, 2012 17:30
random number between 0 and X
var MAX_DESIRED = 10;
var randIndex = Math.floor(Math.random() * (MAX_DESIRED + 1));
// yields an integer between 0 and 10
@rockbot
rockbot / add-even-class.js
Created September 28, 2012 14:59 — forked from iamdustan/add-even-class.js
the power of dom utilities and selector engines
// the power of dom utilities and selector engines
// $('table.projects tr:even').addClass('even-row');
var slice = Array.prototype.slice,
toArray = function (obj) {
return Array.prototype.slice.call(obj, 0)
}
var tables = toArray(document.querySelectorAll('table.projects'))
@rockbot
rockbot / draft2.md
Created November 13, 2012 18:18
JSConf CFP

AI.js: Robots with Brains!

Once upon a time, there was a roboticist. She spent eight years working with robots of various shapes, sizes, and intelligence levels - her specialty was in planning and navigation algorithms (useful for driverless cars, rescue robots, etc.). Eager for some fresh air away from the lab, she switched gears and started developing a better Internet with JavaScript and Node.js.

In her time away, however, her little robot friends have also learned JavaScript! The likes of Johnny-Five and NodeCopter have breathed new life into those traditionally Python/C++-controlled machines, and our favorite roboticist's little vacation has come to a close.

Whereas 2012 was the start of moving, reactive robots programmed in JavaScript, 2013 will be the year of the smarter, autonomous robot! Task driven and data oriented, they will be the most intelligent JS robots you've ever seen - and they'll be the founders of the robot.js of tomorrow.

In this talk, we will discuss and review examples of