Skip to content

Instantly share code, notes, and snippets.

View techwraith's full-sized avatar

Daniel Erickson techwraith

View GitHub Profile
var atomify = require('atomify')
, path = require('path')
var opts = {
entry: path.join(__dirname, '..', 'app', 'index.js')
, debug: true
}
var str = ''
var runcount = 0
var bind = require('lodash.bind')
var Base = require('ribcage-view')
window.foo = 'baz'
var SubThing = Base.extend({
action: function () {
this.options.action()
}
})
var Base = require('ribcage-view')
var SubView = Base.extend({
action: function () {
this.options.action()
}
})
var View = Base.extend({
foo: 'bar'
{{#selectTag toDos step.toDoId selectOpts}}
{{/selectTag}}
$(document).scroll(function() {
var top = $(document).scrollTop();
if (top > 300) {
alert('1')
}
else if (top > 600) {
alert('2')
}
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/”,
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');
app.js
var thing = require('./foo');
thing.foo(); // "Hello World"
foo.js
exports.foo = function(){console.log("Hello World");
@techwraith
techwraith / test.js
Created July 7, 2011 20:15
Testing Kue
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);
@techwraith
techwraith / scopage.js
Created July 27, 2011 07:20
What scope is name, foo, and bar in?
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'