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 relative_time = function(timestamp, relative_to) { | |
if (timestamp === null || timestamp === undefined) | |
return ""; | |
var delta, relative_is_future, t; | |
if (!relative_to) | |
relative_to = parseInt(new Date().getTime() / 1000); | |
if ($.type(timestamp) !== "number") |
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
// create pub-sub functionality | |
Backbone.pubSub = _.extend({}, Backbone.Events); | |
// view one needs to trigger an event in view2 | |
View1 = Backbone.View.extend({ | |
triggerView2Event : function() { | |
Backbone.pubSub.trigger('view2event', { 'some' : '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
{ | |
"// my options for SublimeLinter " : "//", | |
"jshint_options" : { | |
"boss": true, | |
"browser": true, | |
"curly": false, | |
"devel": true, | |
"eqeqeq": false, | |
"eqnull": true, |
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 path = require('path') | |
var tako = require('tako') | |
var gist = require('gist') | |
var request = require('request') | |
var qs = require('querystring') | |
var leveldb = require('leveldb') | |
var https = require('https') | |
var htmldir = path.resolve(__dirname, 'attachments') |
NewerOlder