Skip to content

Instantly share code, notes, and snippets.

@sijnc
sijnc / gist:4581957
Last active December 11, 2015 09:48
<!doctype html>
<html ng-app>
<head>
<title ng-controller="Todo">Todos ({{todos.length}})</title>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.3/angular.min.js"></script>
<script src="todo-class.js">
function Todo() {
this.todos = [
{text:'learn angular', done:true},
{text:'build an angular app', done:false}
@sijnc
sijnc / filter
Created November 7, 2012 06:19
Filter
// filter
// +---------------------------+
// | +----------+ |
// +--|-| stream |--+ |
// | +----------+ | |
// | +----------+ | |
// +--|-| stream |--+ |
// | +----------+ | |
// | | |
// | | |
@sijnc
sijnc / Stream API
Created November 7, 2012 01:06
Stream
Stream
+--------------+ -Stream(function(arg1[, arg2[, ...]]))
+--| src | -pipe(dest)
| | -write(arg1[, arg2[, ...]])
| f(x) | -pause()
| | -resume()
| dest |--+ -src
+--------------+
¯\_(ツ)_/¯
@sijnc
sijnc / Stream Templating
Created October 3, 2012 02:29
Stream Templating
+--->res
|
|
req+--->outer template+--->inner template+-->res
|
|
+--->res
@sijnc
sijnc / Stream piping utility
Created September 30, 2012 20:14
Plumber
pipe(stream('water'), [
stream('bathroom'), [
stream('sink'),
stream('toilet')
],
stream('kitchen'), [
stream('sink'),
stream('dishwasher')
],
])