Skip to content

Instantly share code, notes, and snippets.

@jamgold
jamgold / dynamic.html
Created March 18, 2015 17:58
Meteor Template.dynamic
<head>
<title>dynamicui</title>
</head>
<body>
<h1>Welcome to Meteor!</h1>
{{> hello}}
</body>
@jamgold
jamgold / meteor_cleanup.js
Created March 10, 2015 00:43
meteor_cleanup.js
#!/usr/bin/env node
var exit = require('exit');
var path = require('path');
var jf = require('jsonfile')
var util = require('util')
var each = require('dir-each');
var series = require('dir-each/series');
var argv = require('minimist')(process.argv.slice(2));
var files = [];
@jamgold
jamgold / main.js
Created February 17, 2015 16:37
Dynamic route
Meteor.subscribe('posts', function(){
Posts.find({path:{$exists:1}}).forEach(function(post){
Router.route(post.path,{name:post.name,template: 'post'});
})
});
@jamgold
jamgold / ir.html
Created January 4, 2015 18:49
Iron Router hot code push jumbles order of execution
<template name="image">
<img src="{{this.url}}">
</template>
@jamgold
jamgold / stackoverflow.html
Created November 13, 2014 16:35
stackoverflow_26863799
<head>
<title>stackoverflow_26863799</title>
</head>
<body>
<h1>Welcome to Meteor!</h1>
{{> hello}}
</body>
@jamgold
jamgold / gist:6677105
Created September 23, 2013 21:17
PHP SOAP code that works on CLI and doesn't work via web server
<?php
require_once('lib/vboxServiceWrappers.php');
$username = 'test';
$password = 'test';
$location = 'http://IPADDRESSOFSERVER:18083';
print '<pre>';
$client = new soapclient('/var/www/phpvirtualbox-4.2-7/lib/vboxwebService-4.2.wsdl', array(
'features' => (SOAP_USE_XSI_ARRAY_TYPE + SOAP_SINGLE_ELEMENT_ARRAYS),
'cache_wsdl' => WSDL_CACHE_BOTH,
@jamgold
jamgold / method_stub.js
Last active December 18, 2015 17:29
Meteor.call and stub methods
if (Meteor.isClient) {
Template.hello.created = function() {
// this = Template Object
console.log("Template.hello.created");
this.stub_method_result = 'not yet';
};
Template.hello.greeting = function () {
// this = Window Object
var v = Session.get("greeting");
@jamgold
jamgold / template_test.html
Created June 3, 2013 22:04
Trying to figure out Meteor templates and reactivity (autopublish removed)
<head>
<title>template_test</title>
</head>
<body>
{{> hello}}
{{> foo}}
{{> bar}}
{{> history}}
</body>