Skip to content

Instantly share code, notes, and snippets.

View possibilities's full-sized avatar

Mike Bannister possibilities

View GitHub Profile
@possibilities
possibilities / index.html
Created April 28, 2015 06:05
JS Bin hello react // source http://jsbin.com/keneqa
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="hello react">
<meta charset="utf-8">
<title>JS Bin</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.13.2/react-with-addons.js"></script>
</head>
<body>
<div class="app"></div>
@possibilities
possibilities / index.html
Created April 28, 2015 06:05
JS Bin hello react // source http://jsbin.com/keneqa
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="hello react">
<meta charset="utf-8">
<title>JS Bin</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.13.2/react-with-addons.js"></script>
</head>
<body>
<div class="app"></div>
if (Meteor.is_client) {
Template.beastie.resultOfSabatage = function () {
return Session.get('resultOfSabatage');
};
var handleResults = function(err, result) {
if (err) {
Session.set('resultOfSabatage', 'Failure! (' + err.error + ')');
} else {
Session.set('resultOfSabatage', 'Success!');
<template name='store'>
{{#each items}}
{{> item}}
{{/each}}
</template>
<template name='item'>
{{name}} {{qty store}}
</template>
// Blue theme
<template name="blueTheme">
{{> blueWidget}}
{{> anotherBlueWidget}}
</template>
<template name="blueWidget">
<span class="blue"></span>
</template>
$('#page').empty().append($(Meteor.ui.render(function() {
Meteor.defer(function() {
// Stuff you wanna do when this thing gets redrawn
});
return page();
})));
@possibilities
possibilities / RoomList.html
Created June 2, 2012 20:53 — forked from Mas-Tool/RoomList.html
MasTool help please.
<template name="RoomListTemplate">
<div id="roomList">
<ul>
{{#each rooms}}
<li>{{name}}</li>
{{/each}}
</ul>
</div>
</template>
<head>
<title>render-test</title>
</head>
<body>
</body>
<template name="roomList">
<div id="roomList">
<ul>
@possibilities
possibilities / RoomList.html
Created June 2, 2012 22:00 — forked from Mas-Tool/RoomList.html
MasTool help please.
<template name="RoomListTemplate">
<div id="roomList">
<ul>
{{#each rooms}}
<li>{{name}}</li>
{{/each}}
</ul>
</div>
</template>
if (Meteor.is_client) {
Chatrooms = new Meteor.Collection('chatRooms');
Meteor.subscribe('chatRooms');
var rooms = Chatrooms.find();
Meteor.startup(function() {
var roomResults = Meteor.ui.render(function() {