Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am stephenvisser on github.
  • I am svper (https://keybase.io/svper) on keybase.
  • I have a public key ASA0yZqKQlBvO5KpD2rFQPOmu4Ze6-l0fzzeYyJMijhJSQo

To claim this, I am signing this object:

start(first).then(second).then(effect(third)).run()
start(first).then(second).run()
let first = present(First.self)
let second = present(Second.self)
class First: UIView, PresentableType {
...
}
class Second: UIView, PresentableType {
...
}
protocol PresentableType {
associatedtype Input
associatedtype Output
mutating func setUp(input: Input)
var sideEffects: Output { get }
}
@stephenvisser
stephenvisser / content.coffee
Created May 26, 2012 17:49
Controller-scoped routes using Spine.js
require('spine/lib/manager')
class Main extends Spine.Stack
routes:
'adventure': 'adv'
'home': 'home'
'information': 'info'
controllers:
info: Information
home: Home
@stephenvisser
stephenvisser / eco.vim
Created May 24, 2012 15:27
A Vim script for indenting *.eco files
" Eco templates will use html indenting
" Taken from https://github.com/juvenn/mustache.vim/blob/master/indent/mustache.vim
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
finish
endif
" Use HTML formatting rules.
runtime! indent/html.vim
@stephenvisser
stephenvisser / index.html
Created May 24, 2012 04:10
Default page for Spine.js
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8>
<title>App</title>
<link rel="stylesheet" href="/application.css" type="text/css" charset="utf-8">
<script src="/application.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
var jQuery = require("jqueryify");
var exports = this;
@stephenvisser
stephenvisser / app.js
Created May 16, 2012 15:45
Using Twitter Bootstrap NavBars with Backbone.js
//This is the Backbone controller that manages the content of the app
var Content = Backbone.View.extend({
initialize:function(options){
Backbone.history.on('route',function(source, path){
this.render(path);
}, this);
},
//This object defines the content for each of the routes in the application
content:{
"":_.template(document.getElementById("root").innerHTML),