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
# Video: http://rubyhoedown2008.confreaks.com/08-chris-wanstrath-keynote.html | |
Hi everyone, I'm Chris Wanstrath. | |
When Jeremy asked me to come talk, I said yes. Hell yes. Immediately. But | |
then I took a few moments and thought, Wait, why? Why me? What am I supposed | |
to say that's interesting? Something about Ruby, perhaps. Maybe the | |
future of it. The future of something, at least. That sounds | |
keynote-y. | |
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
/* Use this to cause a function to fire no more than once every 'ms' milliseconds. | |
For example, an expensive mousemove handler: | |
$('body').mouseover(ratelimit(function(ev) { | |
// ... | |
}, 250)); | |
*/ | |
function ratelimit(fn, ms) { | |
var last = (new Date()).getTime(); |
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
C++ source: | |
void call_by_reference(int& x) | |
{ | |
x = 20; | |
} | |
void call_by_pointer(int* x) | |
{ | |
*x = 20; |
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
/* | |
* object.watch polyfill | |
* | |
* 2012-04-03 | |
* | |
* By Eli Grey, http://eligrey.com | |
* Public Domain. | |
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. | |
*/ |
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
From e22317131b97d0faa5510b528ef515ccbbbd3e8e Mon Sep 17 00:00:00 2001 | |
From: Jacob Rothstein <[email protected]> | |
Date: Tue, 13 Jul 2010 13:24:34 -0700 | |
Subject: [PATCH] fix showdown to work in chrome (don't use RegExp.leftContext and RegExp.rightContext globals) | |
--- | |
scripts/showdown.js | 10 ++++------ | |
1 files changed, 4 insertions(+), 6 deletions(-) | |
diff --git a/scripts/showdown.js b/scripts/showdown.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
// cache from global scope | |
var _parseInt = this.parseInt; | |
_speedTest( | |
[ | |
function(n) | |
{ | |
var r, g, b, s = '#aabbcc'; | |
var i = n; while(i--) | |
{ |
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
// HOWTO: load LABjs itself dynamically! | |
// inline this code in your page to load LABjs itself dynamically, if you're so inclined. | |
(function (global, oDOC, handler) { | |
var head = oDOC.head || oDOC.getElementsByTagName("head"); | |
function LABjsLoaded() { | |
// do cool stuff with $LAB here | |
} |
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
/** | |
* Console object for BESEN | |
* @author Dmitry A. Soshnikov <[email protected]> | |
*/ | |
(function initConsole(global) { | |
// helpers | |
var getClass = Object.prototype.toString; | |
var timeMap = {}; |
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 express = require('express'), | |
app = express.createServer(); | |
app.enable('jsonp callback'); | |
app.get('/jsonp', function(req, res) { | |
res.send({ foo: 'bar' }); | |
}); |
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
process do |files| | |
execute("osascript -e 'tell application \"WebKit\" | |
do JavaScript \"window.location.reload()\" in first document | |
end tell'") | |
end |
OlderNewer