Permalink
Browse files

example navigator

  • Loading branch information...
substack committed Sep 26, 2012
1 parent b73fa63 commit c74690c888e4b1ef663f26b6ccc43b8b85bd5d06
View
@@ -0,0 +1,10 @@
+harnessing streams
+
+ hh
+ hh
+ hh
+ hh
+ hhhhh aaaaa
+ hh hh aaaa
+ hh hh aa aa
+ hh hh aaaaa
View
@@ -0,0 +1,35 @@
+#!/bin/bash
+basedir=$(node <<EOF
+ var path = require('path');
+ var d = path.resolve(process.cwd(), path.dirname('$_'));
+ console.log(d);
+EOF
+)
+
+slide_number=0
+i=0
+for slide in $(cat order.txt); do
+ slides[$i]=$slide
+ i=$((i+1))
+done
+slide_count=$(wc -l order.txt | sed 's/ .*//')
+
+function next {
+ if test $slide_number -gt $slide_count; then
+ cat end.txt
+ else
+ slide_number=$((slide_number+1))
+ fi
+ navigate
+}
+
+function prev {
+ if test $slide_number -gt 0; then
+ slide_number=$((slide_number-1))
+ fi
+ navigate
+}
+
+function navigate {
+ cd $basedir/${slides[$slide_number]}
+}
View
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
View
@@ -17,6 +17,8 @@ http://cm.bell-labs.com/who/dmr/mdmpipe.html
* fs.createReadStream()
+![readable](images/readable.png)
+
`example/readable`
# writable
@@ -25,6 +27,8 @@ http://cm.bell-labs.com/who/dmr/mdmpipe.html
* concat-stream
* delta-stream
+![writable](images/writable.png)
+
`example/writable`
# through streams
@@ -36,6 +40,8 @@ filters, buffering
* zlib.createGzip()
* through
+![through](images/through.png)
+
`example/through`
## buffering
@@ -93,15 +99,15 @@ When you see `a.pipe(b).pipe(a)` you've probably got a duplex stream.
![gossip protocol](images/gossip_protocol.png)
+(use case: web server peering)
+
`example/scuttlebutt`
# event streams
* emit-stream
-![emit-stream 0](images/emit_stream_0.png)
-
-![emit-stream 1](images/emit_stream_1.png)
+![emit-stream](images/emit_stream.gif)
`example/emit-stream`
@@ -121,6 +127,8 @@ When you see `a.pipe(b).pipe(a)` you've probably got a duplex stream.
* sorta
* graph-stream
+![shoe](images/shoe.png)
+
`example/shoe`
# freestyle stream livecoding demo
@@ -132,10 +140,14 @@ let's build a streaming webapp that:
FROM SCRATCH. OK GO.
+
+
`example/freestyle`
1. npm install all the things
2. write the code
3. the third step is you're done
+
+![eof](images/process_exit.png)

0 comments on commit c74690c

Please sign in to comment.