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
Router.static = function(options) { | |
options = options || {}; | |
if (! options.path) | |
throw new Meteor.Error("Router.static: options.path is required"); | |
return { | |
where: 'server', | |
path: options.path, | |
action: function() { |
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
Template.foo.events({ | |
'keyup .bar': _.debounce(function(event) { | |
// ... | |
}, 300) | |
}); |
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
if (Meteor.isClient) { | |
Template.hello.created = function() { | |
this.setDefault('counter', 0); | |
}; | |
Template.hello.helpers({ | |
counter: function() { | |
var template = Template.instance(); | |
return template.get('counter'); | |
} |
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
Blaze.TemplateInstance.prototype.setDefault = function(key, value) { | |
return Session.setDefault(this.view.name + '.' + key, value); | |
}; | |
Blaze.TemplateInstance.prototype.set = function(key, value) { | |
return Session.set(this.view.name + '.' + key, value); | |
}; | |
Blaze.TemplateInstance.prototype.get = function(key) { | |
return Session.get(this.view.name + '.' + key); |
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 timeout; | |
var batch = []; | |
batcher = function(attributes) { | |
batch.push(attributes); | |
if (! timeout) { | |
// send whatever we have in the queue after 5 seconds | |
timeout = setTimeout(function() { | |
console.log('sending a batch of ' + batch.length + '...'); |
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
Template.foo.helpers({ | |
stepsWithIndex: function() { | |
return _.map(this.steps, function(value, index) { | |
return { | |
index: index, | |
value: value | |
}; | |
}); | |
} | |
}); |
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
http://localhost:3000/enroll-account/vHHzHoBaN5Hc65mye |
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
""" | |
░░░█░░░░░░▄██▀▄▄░░░░░▄▄▄░░░█ | |
░▄▀▒▄▄▄▒░█▀▀▀▀▄▄█░░░██▄▄█░░░█ | |
█░▒█▒▄░▀▄▄▄▀░░░░░░░░█░░░▒▒▒▒▒█ | |
█░▒█░█▀▄▄░░░░░█▀░░░░▀▄░░▄▀▀▀▄▒█ | |
░█░▀▄░█▄░█▀▄▄░▀░▀▀░▄▄▀░░░░█░░█ | |
░░█░░░▀▄▀█▄▄░█▀▀▀▄▄▄▄▀▀█▀██░█ | |
░░█░░░░██░░▀█▄▄▄█▄▄█▄████░█ | |
░░░█░░░░▀▀▄░█░░░█░█▀██████░█ | |
░░░░▀▄░░░░░▀▀▄▄▄█▄█▄█▄█▄▀░░█ |
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
if (Meteor.isClient) { | |
StaticPosts = new Mongo.Collection(null); | |
fetchAndInsert('test', StaticPosts, (error, response) => { | |
// ... | |
}); | |
} | |
if (Meteor.isServer) { | |
Meteor.methods({ |
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
Show hidden characters
{ | |
"color_scheme": "Packages/User/SublimeLinter/PlainText (SL).tmTheme", | |
"draw_white_space": "all", | |
"folder_exclude_patterns": | |
[ | |
".svn", | |
".git", | |
".hg", | |
"CVS", | |
".meteor" |