Use the Google Closure Service With Node.js
Here's a short Node.js method for compressing javascript
with Google's Closure Compiler Service. Besides being
practical, it's a good example of sending a POST request using Node's
http module.
Here's a short Node.js method for compressing javascript
with Google's Closure Compiler Service. Besides being
practical, it's a good example of sending a POST request using Node's
http module.
Python's json.loads only decodes one JSON object. This example
shows how raw_decode can be used to load multiple JSON values
from the same buffer.
Jquery can be extended with custom pseudo-selectors. Using
pseudo-selectors improves code readability and avoids repetition.
This example shows how to make a pseudo-selector called :named.
Making text unselectable is useful for creating certain javascript UI
widgets. This is a cross-browser method for preventing text selection
using an unselectable="on" element attribute.
I wrote a couple of toy "hello world" web servers to try using Python 3 and learn about non-blocking network programming. They are available here.
The HTML5 specification allows any DOM element to have
custom data attributes. These attributes are prefixed with
data- and may be conveniently accessed through an element's
dataset property. The jquery.dataset plugin provides
similar functionality.
My friend Lang and I have started maintaining orangesoda.net together. We'll be using it to host projects and bits of code we create in a permanent location.