Skip to content

Instantly share code, notes, and snippets.

@katowulf
katowulf / 0_reuse_code.js
Created May 19, 2014 19:28
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
var authClient = new FirebaseAuthClient(db, function(error, user) {
if (error) {
alert(error);
} else if (user) {
$(body).removeClass("noAuth").addClass("auth");
var Firebase = require("./firebase-node.js");
function Queue(ref) {
this._ref = ref;
}
Queue.prototype.pop = function(cb) {
this._ref.startAt().limit(1).once("child_added", this._pop.bind(this, cb));
}