Skip to content

Instantly share code, notes, and snippets.

View possibilities's full-sized avatar

Mike Bannister possibilities

  • AI Life
  • Portland East
View GitHub Profile
var psParts = rawPs.split(/\w+/);
console.error(psParts);
[ ' ', ' ', '' ]
[ ' ', ' ', '' ]
[ ' ', ' ', '' ]
[ '', ' ', '' ]
[ '', ' ', '' ]
[ '', ' ', '' ]
[ '', ' ', '' ]
#foo {
width: 100px;
height: 100px;
border: 1px solid grey;
}
var list;
function getList() {
if (!list)
...compute list
reutrn list
}
Template.post.postList = function () {
return list;
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');});
});
<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}}
@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 )"
new Demo({
hosts: {
production: ['forms.meteor.com']
},
github: {
user: 'possibilities',
repo: 'meteor-forms'
}
});
<body>
{{#routeIs "home"}}
{{> home}}
{{else}}
{{> kitchenSink}}
{{/routeIs}}
</body>
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() {
@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>