Skip to content

Instantly share code, notes, and snippets.

View jiggliemon's full-sized avatar

Chase Wilson jiggliemon

View GitHub Profile
@jiggliemon
jiggliemon / Poll.example.html
Created October 12, 2012 20:54
An example for a proposed `SML like` syntax within the module development portal.
{% assign poll = fetch_module_data('some poll id') %}
/*
poll
id
question
options
results
... more ...
*/
/*global define:false, require:false */
define(['./extend'], function (extend) {
'use strict';
var _spaces = {};
function namespace ( str ) {
var args = Array.prototype.slice.call(arguments,1)
,i = 0
,base = window
<!DOCTYPE html>
<html lang="en">
<script src="js/lib/cajon/cajon.js" async="async"></script>
<script>
(function () {
window.require = {
baseUrl: "js"
,packages: [
,{ name: 'blocks', location: 'lib/blocks/src' }
,{ name: 'yate', location: 'lib/yate/src'}
@jiggliemon
jiggliemon / README.md
Created April 24, 2012 07:57 — forked from GCheung55/README.md
Neuro readme

Neuro is a client-side MVC.

influences:

  • Backbone
  • Shipyard

dependancies:

  • Mootools 1.x
  • Company "an implicitly-mediated component system for MooTools that helps in developing modular, component-based applications" - @keeto
var columnize = function ( count , colClass ) {
colClass = colClass || 'span'+(12/count)
var columns = [],div
// builds the columns
while (count--) {
div = document.createElement('div')
div.setAttribute('class', colClass )
columns.push(div)
}
var Block('foo', {
children: [new Block('bar', {})]
});
Blocks.reference('bar').set('MyValue', true)
console.log(Blocks.reference('bar').get('MyValue')) // true
var anotherThing = {}
@jiggliemon
jiggliemon / header.js
Created March 9, 2012 22:24
Header Module
/**
*
* Header
*
* Bound Elements:
* - logo
*
*/
;(function (dependencies){
@jiggliemon
jiggliemon / index.js
Created February 25, 2012 23:17
blocks.js a module wrapper
define(['block/mixin','template/mixin', 'mediator/mixin'],
function ( BlockMixin, TemplateMixin, EventsMixin, undef ) {
var slice = Array.prototype.slice
,toString = Object.prototype.toString;
function typeOf (obj) {
return toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase()
}