Skip to content

Instantly share code, notes, and snippets.

View simistern's full-sized avatar
🍊

Simon Stern simistern

🍊
View GitHub Profile
var requests = {
set: createPostRequest('POST', 'text'),
get: createRequest('GET', 'query')
};
function createPostRequest(type, method, payload) {
twitch.rig.log($("#input").val()); //input
return {
type: type,
url: location.protocol + '//localhost:8081/sayit/' + method,
# Meteor packages used by this project, one per line.
# Check this file (and the other files in this directory) into your repository.
#
# 'meteor add' and 'meteor remove' will edit this file for you,
# but you can also edit it by hand.
meteor-platform
insecure
http
fezvrasta:bootstrap-material-design
Posts = new Mongo.Collection('posts');
Session.setDefault('subreddit', 'all');
Session.setDefault('searching', false);
SUPPORTED_MEDIA_TYPES = ['jpg', 'png', 'gif'];
Tracker.autorun(function() {
console.log('show session ', Session);
if (Session.get('subreddit')) {
.app {
width: 95%;
margin: 0 auto;
}
.comment-link {
font-size: .8em;
}
.image-preview-holder {
<template name="post">
<div class="list-group-item post" data-id="{{id}}">
<div class="row-picture">
{{#if thumbnail}}
<img class="icon shadow-z-1" src="{{thumbnail}}" alt="icon">
{{else}}
<i class="mdi-editor-insert-drive-file icon shadow-z-1"></i>
{{/if}}
<br class="clear" />
</div>
<head>
<title>RedditReader</title>
</head>
<body>
<div class="navbar navbar-inverse">
<div class="navbar-header">
<a class="navbar-brand" href="#">Reddit Reader</a>
</div>
Meteor.publish('subredditSearch', function(subreddit) {
var self = this;
try {
var response = HTTP.get('http://reddit.com/r/' + subreddit + '.json');
_.each(response.data.data.children, function(item) {
var data = item.data;
var len = 200;
.app {
width: 95%;
margin: 0 auto;
}
.delete-meal,
.edit-meal,
.move-meal-left,
.move-meal-right {
font-size: 15px !important;
meteor-platform
mrt:jquery-ui
accounts-ui
accounts-password
Meals = new Mongo.Collection('meals');
if (Meteor.isClient) {
Meteor.subscribe('meals');
Template.body.helpers({
meals: function () {
var meals = Meals.find({});
return meals;
}
});