Some exercises from the Falsy Values workshops.
The good parts:
- HTTP server and client in same script
- Express cookies example
- Express routing example
- Express error handling
- Express middlewares example
- Simple HTTP proxy
| sudo apt-get update && sudo apt-get upgrade -y; | |
| sudo apt-get build-dep -y libqt4-gui libqt4-network libqt4-webkit; | |
| sudo apt-get install -y openssl build-essential xorg git git-core libssl-dev libxrender-dev t1-xfree86-nonfree xfonts-scalable ttf-ubuntu-font-family ttf-mscorefonts-installer poppler-utils libqt4-dev qt4-dev-tools; | |
| cd ~; | |
| git clone git://gitorious.org/~antialize/qt/antializes-qt.git wkhtmltopdf-qt; | |
| git clone git://github.com/antialize/wkhtmltopdf.git wkhtmltopdf; | |
| cd wkhtmltopdf; | |
| qmake-qt4; | |
| cd ../wkhtmltopdf-qt; | |
| git checkout 4.8.4; |
| var visitors = 50; | |
| var sockets = []; | |
| (function($) { | |
| $('body').append('<h1>Our Sockets: <span class="ourSockets">0</span></h1>'); | |
| socket.on('countChanged', autoVisit); | |
| function autoVisit(data) { |
| // Here is a proposal for minimalist JavaScript classes, humbly offered. | |
| // There are (at least) two different directions in which classes can be steered. | |
| // If we go for a wholly new semantics and implementation, then fancier classical | |
| // inheritance can be supported with parallel prototype chains for true inheritance | |
| // of properties at both the class and instance level. | |
| // If however, we keep current JavaScript prototype semantics, and add a form that | |
| // can desugar to ES3, things must necessarily stay simpler. This is the direction | |
| // I'm assuming here. |
Some exercises from the Falsy Values workshops.
The good parts:
| <div id="video-1-container" class="video"> | |
| <video id="video-1" src="video/html5.mp4" width="480" height="204" controls> | |
| <!-- HTML5 video, for compatible browsers --> | |
| </video> | |
| </div> | |
| <script type="text/javascript"> | |
| Ojay.onDOMReady(function() { | |
| // The video and the container need separate IDs to work around IE6's | |
| // unwillingness to locate video elements. |
| var httpProxy = require('http-proxy'); | |
| // | |
| // Addresses to use in the round robin proxy | |
| // | |
| var addresses = [ | |
| { | |
| host: 'ws1.0.0.0', | |
| port: 80 | |
| }, |
| <div id="video-1-container" class="video"> | |
| <video id="video-1" src="video/html5.mp4" width="480" height="204" controls> | |
| <!-- HTML5 video, for compatible browsers --> | |
| </video> | |
| </div> | |
| <script type="text/javascript"> | |
| Ojay.onDOMReady(function() { | |
| // The video and the container need separate IDs to work around IE6's | |
| // unwillingness to locate video elements. |