Permalink
Browse files

git add all the things

  • Loading branch information...
0 parents commit 42db883ef2fae2f1dccd45e532d49870349aadfa @substack committed Jul 27, 2012
@@ -0,0 +1,4 @@
+var http = require('http');
+var ecstatic = require('ecstatic')(__dirname + '/static');
+http.createServer(ecstatic).listen(8085);
+console.log('http://localhost:8085');
@@ -0,0 +1,7 @@
+<html>
+<body>
+<style> pre { font-size: 72px; } </style>
+<pre></pre>
+</body>
+<script src="/bundle.js"></script>
+</html>
@@ -0,0 +1,15 @@
+var falafel = require('falafel');
+var src = '(' + function () {
+ var x = 2 + 3 * 6;
+ var y = Math.pow(x, 2);
+ console.log(x + y);
+} + ')()';
+
+var out = falafel(src, function (node) {
+ if (node.type === 'CallExpression') {
+ node.update('fff(' + node.source() + ')');
+ }
+});
+
+var $ = require('jquery-browserify');
+$('pre').text(out);
@@ -0,0 +1,5 @@
+<html>
+<body>
+<script src="bundle.js"></script>
+</body>
+</html>
@@ -0,0 +1,19 @@
+var widget = require('../widget');
+
+var r = widget('robots');
+r.body('in SPACE!');
+r.appendTo(document.body);
+
+var ri = 1;
+setInterval(function () {
+ r.body(r.body() + '!');
+}, 1000);
+
+var d = widget('dinosaurs');
+d.body('in the ground');
+d.appendTo(document.body);
+
+var di = 1;
+setInterval(function () {
+ d.body(d.body() + '.');
+}, 1000);
@@ -0,0 +1,5 @@
+<html>
+<body>
+<script src="bundle.js"></script>
+</body>
+</html>
@@ -0,0 +1,9 @@
+var widget = require('../widget');
+
+var w = widget('robots');
+w.body('in SPACE!');
+w.appendTo(document.body);
+
+var v = widget('dinosaurs');
+v.body('in the ground!');
+v.appendTo(document.body);
@@ -0,0 +1,15 @@
+.beep {
+ margin: auto;
+ width: 400px;
+}
+
+.title {
+ font-weight: bold;
+}
+
+.body {
+ padding: 20px;
+ background-color: rgb(48,51,55);
+ color: rgb(220,230,240);
+ border-radius: 10px;
+}
@@ -0,0 +1,4 @@
+<div class="beep">
+ <div class="title"></div>
+ <div class="body"></div>
+</div>
@@ -0,0 +1,15 @@
+var yarn = require('./yarn');
+
+module.exports = function (title) {
+ var elem = yarn('beep.html', [ 'beep.css' ]);
+ elem.querySelector('.title').textContent = title;
+
+ return {
+ body : function (x) {
+ var body = elem.querySelector('.body');
+ if (x === undefined) return body.textContent;
+ body.textContent = x;
+ },
+ appendTo : function (e) { e.appendChild(elem) }
+ };
+};
@@ -0,0 +1,3 @@
+module.exports = function (n) {
+ return n * 111;
+};
@@ -0,0 +1,4 @@
+var foo = require('./foo');
+var $ = require('jquery-browserify');
+
+$('pre').text(foo(5));
@@ -0,0 +1,4 @@
+var http = require('http');
+var ecstatic = require('ecstatic')(__dirname + '/static');
+http.createServer(ecstatic).listen(8085);
+console.log('http://localhost:8085');
@@ -0,0 +1,7 @@
+<html>
+<body>
+<style> pre { font-size: 72px; } </style>
+<pre></pre>
+</body>
+<script src="/bundle.js"></script>
+</html>
@@ -0,0 +1,11 @@
+1. get on the wireless (AirBears):
+ username: guest-111068
+ password: odgaNkEDg6
+
+2. install node.js (http://nodejs.org)
+
+3. npm install -g browserify
+
+4. think of something to give a lightning talk about
+
+5. #nerdtracker on irc.freenode.net is rad
@@ -0,0 +1,10 @@
+var shoe = require('shoe');
+var es = require('event-stream');
+var $ = require('jquery-browserify');
+
+var stream = shoe('/invert');
+var s = es.mapSync(function (msg) {
+ $('#result').append(msg);
+ return String(Number(msg)^1);
+});
+s.pipe(stream).pipe(s);
@@ -0,0 +1,20 @@
+var http = require('http');
+var ecstatic = require('ecstatic')(__dirname + '/static');
+var shoe = require('shoe');
+
+var server = http.createServer(ecstatic);
+server.listen(9999);
+console.log('http://localhost:9999');
+
+var sock = shoe(function (stream) {
+ var iv = setInterval(function () {
+ stream.write(Math.floor(Math.random() * 2));
+ }, 250);
+
+ stream.on('end', function () {
+ clearInterval(iv);
+ });
+
+ stream.pipe(process.stdout, { end : false });
+});
+sock.install(server, '/invert');
@@ -0,0 +1,14 @@
+<html>
+<head>
+<style>
+ #result {
+ font-size: 72px;
+ word-break: break-all;
+ }
+</style>
+</head>
+<body>
+<div id="result"></div>
+<script src="/bundle.js"></script>
+</body>
+</html>
Oops, something went wrong.

0 comments on commit 42db883

Please sign in to comment.