Skip to content

Instantly share code, notes, and snippets.

💭
🐕

Duncan Smith notduncansmith

💭
🐕
View GitHub Profile
@notduncansmith
notduncansmith / app.coffee
Last active Aug 29, 2015
In-memory graph datastore with friendship and notification support in <100 lines
View app.coffee
# Bring in static test data
data = require './data'
# Spin up graph store
Rel = require('./rel')()
# Set up the friendships
Rel.put [
data.events.aliceBefriendsBob
data.events.carolBefriendsBob
@notduncansmith
notduncansmith / app.coffee
Last active Aug 29, 2015
Dynamic template globals in Summit
View app.coffee
Summit = require 'summit'
app = new Summit()
router = app.router()
router.get '/', (respond, views) ->
respond views.app
router.get '/theme/:theme', (app, req) ->
app.templateGlobals.theme = req.params.theme
View command.js
/* NOTE: Comments need to be in multiline format like this, instead of "// Comment" */
window.location = "web+sublime://~/working/"
You can’t perform that action at this time.