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
import { Application } from '@elemnets/application'; | |
let app = new Application(); | |
export default app; |
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
Rooms = new Mongo.Collection('rooms'); | |
Messages = new Mongo.Collection('messages'); | |
if (Meteor.isClient) { | |
Meteor.subscribe('rooms', function () { | |
var room = Rooms.findOne(); | |
Meteor.subscribe('messages', room._id); | |
}); | |
} |
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
/* CSS declarations go here */ | |
body { | |
font-family: Helvetica Neue; | |
font-size: 14px; | |
margin: 0; | |
padding: 0; | |
height: 100vh; | |
width: 100%; | |
} |
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 myFunc = function () { | |
return "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
if (Meteor.isServer) { | |
var Fiber = Npm.require('fibers'); | |
function async (cb) { | |
Meteor.setTimeout(function () { | |
cb(null, 'hello'); | |
}, 3000); | |
} | |
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
if (Meteor.isClient) { | |
_.extend(Handlebars._default_helpers, { | |
'each': function (data, options) { | |
var parentData = this; | |
if (data && data.length > 0) { | |
return _.map(data, function (childContext, idx) { | |
var branch = (childContext._id || (typeof childContext === 'string' ? childContext : null) || | |
Spark.UNIQUE_LABEL); | |
return Spark.labelBranch(branch, 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
map $uri $preferred_proto { | |
default "http"; | |
~^/assets/ "none"; | |
~^/signup "https"; | |
~^/users "https"; | |
~^/users/(.*)$ "https"; | |
~^/login "https"; | |
~^/sessions "https"; | |
~^/api/(.*)$ "https"; | |
~^/password_resets "https"; |
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
module Boom | |
def say | |
"boom" | |
end | |
end |
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
function Constructor(config) { | |
this.config = config; | |
} | |
var myObject = new Constructor({ title: "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
/*! | |
An experiment in getting accurate visible viewport dimensions across devices | |
(c) 2012 Scott Jehl. | |
MIT/GPLv2 Licence | |
*/ | |
function viewportSize(){ | |
var test = document.createElement( "div" ); | |
test.style.cssText = "position: fixed;top: 0;left: 0;bottom: 0;right: 0;"; |