Skip to content

Instantly share code, notes, and snippets.

View dburles's full-sized avatar
🎡

David Burles dburles

🎡
View GitHub Profile
Factory = function() {
var factoryName;
var factories = {};
this.define = function(name, collection, attributes) {
factoryName = name;
factories[name] = {
name: name,
collection: collection,
attributes: attributes,
Session.setDefault('forms', 1);
Template.main.helpers({
forms: function () {
return _.range(1, Session.get('forms') + 1);
}
});
Template.main.events({
'click .add': function(event, template) {
@dburles
dburles / gist:6321059
Last active December 21, 2015 14:39
Meteor route/template ideas #2
// for the sake of clarity
Blogs = new Meteor.Collection('blogs');
// Basic main app routes domain.com/*
// No first parameter name passed here, so assume the main routes
RouteController.add({
layout: 'layout',
map: [
{ name: 'home', root: true }, // could set 'root' to define the / route if we skipped 'path' for other routes
{ name: 'about' }, // we could assume path /about/ from name
@dburles
dburles / evolution.rb
Created March 15, 2013 13:08
a little evolution experiment i made ages ago
# Plot random pixels.
require 'rubygame'
Width = 200
Height = 200
class Array
def rand
self[Kernel.rand(self.length)]
end
end
@dburles
dburles / Counter.py
Created December 22, 2011 01:26 — forked from keyo/Counter.py
Python useless counter class
"""
β–‘β–‘β–‘β–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–„β–ˆβ–ˆβ–€β–„β–„β–‘β–‘β–‘β–‘β–‘β–„β–„β–„β–‘β–‘β€‹β–‘β–ˆ
β–‘β–„β–€β–’β–„β–„β–„β–’β–‘β–ˆβ–€β–€β–€β–€β–„β–„β–ˆβ–‘β–‘β–‘β–ˆβ–ˆβ–„β–„β–ˆβ–‘β€‹β–‘β–‘β–ˆ
β–ˆβ–‘β–’β–ˆβ–’β–„β–‘β–€β–„β–„β–„β–€β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–ˆβ–‘β–‘β–‘β–’β–’β€‹β–’β–’β–’β–ˆ
β–ˆβ–‘β–’β–ˆβ–‘β–ˆβ–€β–„β–„β–‘β–‘β–‘β–‘β–‘β–ˆβ–€β–‘β–‘β–‘β–‘β–€β–„β–‘β–‘β–„β–€β€‹β–€β–€β–„β–’β–ˆ
β–‘β–ˆβ–‘β–€β–„β–‘β–ˆβ–„β–‘β–ˆβ–€β–„β–„β–‘β–€β–‘β–€β–€β–‘β–„β–„β–€β–‘β–‘β–‘β–‘β€‹β–ˆβ–‘β–‘β–ˆ
β–‘β–‘β–ˆβ–‘β–‘β–‘β–€β–„β–€β–ˆβ–„β–„β–‘β–ˆβ–€β–€β–€β–„β–„β–„β–„β–€β–€β–ˆβ–€β–ˆβ€‹β–ˆβ–‘β–ˆ
β–‘β–‘β–ˆβ–‘β–‘β–‘β–‘β–ˆβ–ˆβ–‘β–‘β–€β–ˆβ–„β–„β–„β–ˆβ–„β–„β–ˆβ–„β–ˆβ–ˆβ–ˆβ–ˆβ–‘β€‹β–ˆ
β–‘β–‘β–‘β–ˆβ–‘β–‘β–‘β–‘β–€β–€β–„β–‘β–ˆβ–‘β–‘β–‘β–ˆβ–‘β–ˆβ–€β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ€‹β–‘β–ˆ
β–‘β–‘β–‘β–‘β–€β–„β–‘β–‘β–‘β–‘β–‘β–€β–€β–„β–„β–„β–ˆβ–„β–ˆβ–„β–ˆβ–„β–ˆβ–„β–€β–‘β€‹β–‘β–ˆ