Skip to content

Instantly share code, notes, and snippets.

View possibilities's full-sized avatar

Mike Bannister possibilities

View GitHub Profile
<body>
{{#routeIs "home"}}
{{> home}}
{{else}}
{{> kitchenSink}}
{{/routeIs}}
</body>
new Demo({
hosts: {
production: ['forms.meteor.com']
},
github: {
user: 'possibilities',
repo: 'meteor-forms'
}
});
@possibilities
possibilities / install.js
Created June 9, 2012 18:45
A dependency installer for possibilities/meteor-client-sessions
#!/bin/bash
#
# Until Meteor with something better,
# This script installs the required dependencies into meteor
# Written by @orefalo (Olivier Refalo)
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done
CLIENT_SESSIONS="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
<head>
<title>Shuffle</title>
<link href='http://fonts.googleapis.com/css?family=PT+Serif' rel='stylesheet' type='text/css'>
</head>
<body>
<div class="wrapper">
<div class="main">
{{#if front}}
Mycollection = new Meteor.Collection("mycollection");
Meteor.startup(function () {
Mycollection.insert({name: test1});
Mycollection.insert({name: test2});
var my_collection = Mycollection.find({}, {sort: {name: 1}});
console.log(my_collection.count());
my_collection.forEach(function debug() {console.log('test');});
});
var list;
function getList() {
if (!list)
...compute list
reutrn list
}
Template.post.postList = function () {
return list;
#foo {
width: 100px;
height: 100px;
border: 1px solid grey;
}
var psParts = rawPs.split(/\w+/);
console.error(psParts);
[ ' ', ' ', '' ]
[ ' ', ' ', '' ]
[ ' ', ' ', '' ]
[ '', ' ', '' ]
[ '', ' ', '' ]
[ '', ' ', '' ]
[ '', ' ', '' ]
var userCount = 0;
Meteor.publish(null, function() {
userCount++;
this.onStop(function() {
userCount--;
});
});
Meteor.methods({
{{#if widgetsLoading}}
<p>loading widgets...</p>
{{else}}
{{#ifAny widgets}}
{{#each widgets}}
<p>Name: {{name}}</p>
{{/each}}
{{/ifAny}}
{{/if}}