This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
| using System; | |
| using System.Collections.Generic; | |
| using System.Diagnostics; | |
| using System.IO; | |
| using System.Net; | |
| namespace EventStoreService | |
| { | |
| public class EventStoreService | |
| { |
| define(function(require) { | |
| var system = require('../system'); | |
| var animationTypes = [ | |
| 'bounce', | |
| 'bounceIn', | |
| 'bounceInDown', | |
| 'bounceInLeft', | |
| 'bounceInRight', | |
| 'bounceInUp', |
| public class GetEventStoreEventDispatcher | |
| { | |
| private const int RECONNECT_TIMEOUT_MILLISEC = 5000; | |
| private const int THREAD_KILL_TIMEOUT_MILLISEC = 5000; | |
| private const int READ_PAGE_SIZE = 500; | |
| private const int LIVE_QUEUE_SIZE_LIMIT = 10000; | |
| private readonly IEventBus _eventBus; | |
| private readonly EventStoreConnection _store; |
The stream is a powerful tool, not just for IO, -- but, in the best Unix tradition -- for composition of modules. I've been connecting streams into quite long chains.
Some streams I have written do not alter the data in the stream, but affect it is some way, such as buffering when the stream is paused. pause-stream
Also, I've been writing high level abstractions that communicate via streams, and do some interesting high level stuff, Such as by replicating data, snob and crdt, or multiplexing mux-demux. Another good example is dnode.
These abstractions expose a stream on their interface, and so can be used over any io channel which supports pipe.
| // http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
| // http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | |
| // requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel | |
| // MIT license | |
| (function() { | |
| var lastTime = 0; | |
| var vendors = ['ms', 'moz', 'webkit', 'o']; |
| <!DOCTYPE html> | |
| <head> | |
| <title>Stay Standalone</title> | |
| <meta name="apple-mobile-web-app-capable" content="yes"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> | |
| <script src="stay_standalone.js" type="text/javascript"></script> | |
| </head> | |
| <body> | |
| <ul> | |
| <li><a href="http://google.com/">Remote Link (Google)</a></li> |
| rsync -avz /path/to/local/sync/folder -e "ssh -i /path/to/ssh/key" ubuntu@ec2instance:/path/to/remote/sync/folder |
Standard practices say no non-root process gets to talk to the Internet on a port less than 1024. How, then, could I get Node talking on port 80 on EC2? (I wanted it to go as fast as possible and use the smallest possible share of my teeny tiny little micro-instance's resources, so proxying through nginx or Apache seemed suboptimal.)
Alter the port the script talks to from 8000 to 80:
}).listen(80);