This file contains hidden or 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
#!/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 )" |
This file contains hidden or 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
<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}} |
This file contains hidden or 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
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');}); | |
}); |
This file contains hidden or 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 list; | |
function getList() { | |
if (!list) | |
...compute list | |
reutrn list | |
} | |
Template.post.postList = function () { | |
return list; |
This file contains hidden or 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
#foo { | |
width: 100px; | |
height: 100px; | |
border: 1px solid grey; | |
} |
This file contains hidden or 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 psParts = rawPs.split(/\w+/); | |
console.error(psParts); | |
[ ' ', ' ', '' ] | |
[ ' ', ' ', '' ] | |
[ ' ', ' ', '' ] | |
[ '', ' ', '' ] | |
[ '', ' ', '' ] | |
[ '', ' ', '' ] | |
[ '', ' ', '' ] |
This file contains hidden or 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 userCount = 0; | |
Meteor.publish(null, function() { | |
userCount++; | |
this.onStop(function() { | |
userCount--; | |
}); | |
}); | |
Meteor.methods({ |
This file contains hidden or 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 widgetsLoading}} | |
<p>loading widgets...</p> | |
{{else}} | |
{{#ifAny widgets}} | |
{{#each widgets}} | |
<p>Name: {{name}}</p> | |
{{/each}} | |
{{/ifAny}} | |
{{/if}} |
This file contains hidden or 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
12:34 tmeasday: possibilities, homunq: autosubscribe does a little bit more than that. Maybe you don't care but it e.g. captures subscriptions and stops them etc. You might want to take a look at https://github.com/tmeasday/meteor-deps-extensions | |
12:35 possibilities: tmeasday: but seems to work well without doing any of that, is there overhead | |
12:35 tmeasday: well, homunq isn't here anymore, but hey.. | |
12:35 tmeasday: possibilities: hard to say i guess | |
12:36 possibilities: tmeasday: so you have your own lighter weight solution eh? | |
12:36 tmeasday: yeah, a couple of things i reckon they should add to the deps module.. i've thought of a few more actually but haven't gotten around to implementing them | |
12:36 tmeasday: I got tired of writing the same code all the time | |
12:37 possibilities: good work. i've been overloading autosubscribe to do all this. ends up with a lot of bookkeeping code. |
This file contains hidden or 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
# Setup dir and repo | |
mkdir underscore-string | |
cd underscore-string | |
git init | |
# Make some files we'll need | |
touch README.md package.js smart.json | |
# Add the submodule and checkout the desired branch | |
git submodule add git://github.com/epeli/underscore.string.git lib/underscore.string |