This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* tracer.js - A tracer utility in 2kb | |
* | |
* @author Angus Croll | |
* http://javascriptweblog.wordpress.com/2010/06/01/a-tracer-utility-in-2kb/ | |
*/ | |
String.prototype.times = function(count) { | |
return count < 1 ? '' : new Array(count + 1).join(this); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* | |
* Copyright (C) 2010 - Arief M Utama <me@arief-mulya.com> | |
* All Rights Reserved. | |
* | |
* Feeds Reader - Multiple feeds reading | |
* | |
* Version: 0.9 | |
* Requirement: PHP >= 5.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var events = require('events'), | |
util = require('util'); | |
var MockReadWriteStream = helpers.MockReadWriteStream = function () { | |
// | |
// No need to do anything here, it's just a mock. | |
// | |
}; | |
util.inherits(MockReadWriteStream, events.EventEmitter); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var events = require('events'), | |
util = require('util'); | |
var MockReadWriteStream = helpers.MockReadWriteStream = function () { | |
// | |
// No need to do anything here, it's just a mock. | |
// | |
}; | |
util.inherits(MockReadWriteStream, events.EventEmitter); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* The API controller | |
Exports 3 methods: | |
* post - Creates a new thread | |
* list - Returns a list of threads | |
* show - Displays a thread and its posts | |
*/ | |
var Thread = require('../models/thread.js'); | |
var Post = require('../models/post.js'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
WorkCrew - a WebWorker work queue library | |
Usage: | |
// Create an 8 worker pool using worker.js. | |
var crew = new WorkCrew('worker.js', 8); | |
// Do something whenever a job is completed. | |
// The result object structure is |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var util = require("util"), | |
Stream = require("stream").Stream; | |
module.exports = MockStream; | |
/** | |
* A constructor that inherits from Stream and emits data from the given | |
* `source`. If it's a Stream it will be piped through to this stream. | |
* Otherwise, it should be a string or a Buffer which will be emitted by this | |
* stream as soon as possible. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config.json | |
reading-image.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
The following is a concise outline of the test environment that I've set up to test the outcome described in | |
Issue #13 on the PathJS master branch. This setup is running on a Rails server. | |
https://github.com/mtrpcic/pathjs/issues/13 | |
*/ | |
// Step 1 - Server, Routes, and Data | |
// I set up a Rails 3.1.0 server with a 'Widget' model, and the following test route: |
OlderNewer