This file contains 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 atomify = require('atomify') | |
, path = require('path') | |
var opts = { | |
entry: path.join(__dirname, '..', 'app', 'index.js') | |
, debug: true | |
} | |
var str = '' | |
var runcount = 0 |
This file contains 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 bind = require('lodash.bind') | |
var Base = require('ribcage-view') | |
window.foo = 'baz' | |
var SubThing = Base.extend({ | |
action: function () { | |
this.options.action() | |
} | |
}) |
This file contains 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 Base = require('ribcage-view') | |
var SubView = Base.extend({ | |
action: function () { | |
this.options.action() | |
} | |
}) | |
var View = Base.extend({ | |
foo: 'bar' |
This file contains 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
$(document).scroll(function() { | |
var top = $(document).scrollTop(); | |
if (top > 300) { | |
alert('1') | |
} | |
else if (top > 600) { | |
alert('2') | |
} |
This file contains 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
Definition of “DigitalLocation”: | |
Instead of tracking your physical location, like GeoLocation does, DigitalLocation tracks your “Location” on the Web. | |
So, in short, DigitalLocation consists of a timestamp, a domain, a path, and any other meta-data that the consumer or | |
provider would like to attach. | |
Example DigitalLocation in a JSON format: | |
{ | |
domain: “http://docs.google.com”, | |
path: “/a/techwraith.com/”, |
This file contains 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 pFilters = []; | |
function togglePotatoes(pType) { | |
if (pFilters.indexOf(pType) > -1) { | |
pFilters.splice(pFilters.indexOf(pType),1); | |
} else { | |
pFilters.push(pType); | |
} | |
console.log(pFilters.join(",")); | |
$(pFilters.join(",")).hide('fast'); |
This file contains 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.js | |
var thing = require('./foo'); | |
thing.foo(); // "Hello World" | |
foo.js | |
exports.foo = function(){console.log("Hello World"); |
This file contains 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 kue = require('kue'); | |
var jobs = kue.createQueue(); | |
var i = 1; | |
var jobInterval = setInterval(function(){ | |
console.log("creating job " + i + ".") | |
jobs.create('test', {title:"This is a test", thing:"another thing.", id: i}); | |
i++; | |
},2000); | |
setTimeout(function(){ | |
clearInterval(jobInterval); |
This file contains 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 name = 'test' | |
var foo = 'foo'; | |
var bar = 'bar'; | |
var func = function(arg1, arg2) { | |
console.log(arg1, arg2, this.name); | |
}; | |
var obj = { | |
name: 'something new' |
OlderNewer