Skip to content

Instantly share code, notes, and snippets.

View ggoodman's full-sized avatar

Geoff Goodman ggoodman

View GitHub Profile
@ggoodman
ggoodman / Entry.md
Created November 11, 2011 17:37 — forked from anonymous/Entry.md
Test of anonymous posting of gist

Title

This is the body, it can be edited!?

@ggoodman
ggoodman / lumbar.coffee
Created November 30, 2011 18:37
Declarative model/collection system in CoffeeScript
###
# Currently based on work by Thomas Parslow
# See: https://gist.github.com/1396231
###
lumbar =
version: "0.0.1"
class lumbar.Model
@field: (name, options) ->
@ggoodman
ggoodman / lumbar.coffee
Created December 1, 2011 22:24
Declarative hierarchical views in 100% Coffee-Script
window.lumbar =
version: "0.0.1"
start: (mountPoint) ->
console.log "lumbar.start", arguments...
lumbar.root.render()
_.mixin obj: (key, value) ->
hash = {}
hash[key] = value
@ggoodman
ggoodman / timelog.coffee
Created December 7, 2011 22:08
Track your time in discrete intervals
class Block
@field "start"
@field "end"
@has_one "event",
model: Event
class Event
class BlockCollection
initialize: ->
@ggoodman
ggoodman / lumbar.view.coffee
Created December 8, 2011 17:57
Declarative client-side view engine in 100% Coffee-Script
###
WARNIG: This was 100% written in notepad without debugging.
###
class lumbar.View
@attachDefaults:
mountPoint: "@"
mountMethod: "html"
type: "one"
@ggoodman
ggoodman / README.md
Created December 9, 2011 04:16
Welcome to Gister!

Welcome to Gister!

To get started playing with Gister, just change paste a gist into the textbox to the right and hit enter.

The rest is magic.

@ggoodman
ggoodman / coffeekup.js
Created December 9, 2011 21:03
Compiled copy of CoffeeKup
var cache, coffee, coffeekup, coffeescript_helpers, elements, merge_elements, skeleton;
var __slice = Array.prototype.slice,
__hasProp = Object.prototype.hasOwnProperty,
__indexOf = Array.prototype.indexOf ||
function (item) {
for (var i = 0, l = this.length; i < l; i++) {
if (__hasProp.call(this, i) && this[i] === item) return i;
}
return -1;
}, __extends = function (child, parent) {
@ggoodman
ggoodman / gister.coffee
Created December 13, 2011 00:06
Lumbar interface brainstorming
lumbar.view "edit.topbar",
template: ->
div ->
h1 "Gister"
h2 $m("gist.description")
lumbar.view "edit.sidebar.filename",
template: ->
class = if @filename == $m("active.filename") then "active" else "inactive"
li class: class ->
@ggoodman
ggoodman / coffeescript.js
Created December 14, 2011 01:52
Tweaked coffeescript to resolve absolute path
/**
* CoffeeScript Compiler v1.1.4-pre
* http://coffeescript.org
*
* Copyright 2011, Jeremy Ashkenas
* Released under the MIT License
*/
(function (a) {
var b = function () {
function a(b) {
@ggoodman
ggoodman / index.html
Created December 14, 2011 15:19
Test gist
<!doctype html>
<html>
<head>
<title>Test page</title>
<link rel="stylesheet" href="style.css" type="text/css" />
</head>
<body>
<h1>Header 1</h1>
<p>Paragraph</p>
</body>