Skip to content

Instantly share code, notes, and snippets.

View tobie's full-sized avatar

Tobie Langel tobie

View GitHub Profile
--- Rakefile (saved version)
+++ (current document)
@@ -76,7 +76,7 @@
:source_files => [temp_path],
:destination => DOC_DIR,
:index_page => 'README.markdown',
- :syntax_highlighter => :pygments,
+ :syntax_highlighter => :none,
:markdown_parser => :bluecloth
})
tobie$ dig pdoc.org
; <<>> DiG 9.4.3-P3 <<>> pdoc.org
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 62635
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;pdoc.org. IN A
require.def({
'increment': {
'requires': ['math'],
'factory': function() {
var exports = arguments[0].exports,
require = arguments[0].require,
module = arguments[0].module;
var add = require('math').add;
exports.increment = function(val) {
return add(val, 1);
/**
* Prototype.Selector
*
* A namespace that acts as a wrapper around
* the choosen selector engine (Sizzle by default).
*
**/
Prototype.Selector = {
/**
Prototype._original_property = window.Sizzle;
//= require "sizzle"
(function(engine) {
function extend(elements) {
for (var i = 0, length = elements.length; i < length; i++) {
Element.extend(elements[i]);
}
return elements;
}
document.on('click', 'div.row .more', function(event, element) {
element.next('span').setStyle({ background: 'yellow' });
event.stop();
});
var sys = require('sys');
["foo", "bar"].forEach(sys.puts, sys);
// forEach has an optional second argument which specifies
// the context (this object). Avoids creating an unnecessary
// extra closure and avoids an extra function call per iteration.
(function() {
var ua = 'Mozilla/5.0 (iPhone; U; CPU iPhone OS 3';
if (navigator.userAgent.indexOf(ua) === 0) {
document.write('<sc' + 'ript src="/js/ios3_bug.js"></sc' + 'ript>');
}
})();
// iPhone OS 3 requires an external script tag to be synchronously
// loaded in the HEAD od the HTML document if there's a reference
function createTaskCounter(callback) {
if (typeof callback !== 'function') {
return callback;
}
var self = {}, i = 0, notified = false;
function increment() {
i++;
}
var spawnChildProcess = require('child_process').spawn;
function UserAgent(name, cmd) {
this.name = name;
this.cmd = cmd;
}
(function(p) {
function visit(url, callback) {
var cp;