Skip to content

Instantly share code, notes, and snippets.

@fantasyni
fantasyni / gist:4441938
Created January 3, 2013 08:54
uvbook demo codes complie makefile in ubuntu 10.10
examples=\
helloworld\
idle-basic\
uvcat\
uvtee\
onchange\
thread-create\
queue-work\
progress\
tcp-echo-server\
var fork = require('child_process').fork;
var spawn = require('child_process').spawn;
for (var i = 0; i < 5; i++) {
fork("watch.js");
// var ls = spawn("node", ["watch.js"]);
// ls.stdout.on('data', function(data) {
// process.stdout.write(data.toString());
// });
@fantasyni
fantasyni / car.js
Last active August 29, 2015 14:11
bearcat car.js example
var Car = function() {
this.$id = "car";
this.$wheel = null;
this.$engine = null;
}
Car.prototype.run = function() {
this.$wheel.run();
this.$engine.run();
console.log('run car...');