Skip to content

Instantly share code, notes, and snippets.

FancyZoomImageBehavior = Behavior.create({
initialize: function() {
var src = this.element.readAttribute('href');
var div = $div($img({src: src}));
document.body.insert({after: div});
this.element.writeAttribute('href', '#' + div.identify());
new FancyZoom(this.element);
}
});
# Completion
require 'irb/completion'
# Benchmarking utility method
def time(times = 1)
require 'benchmark'
ret = nil
Benchmark.bm { |x| x.report { times.times { ret = yield } } }
ret
end
@jlong
jlong / .bash_profile
Created January 16, 2009 15:23
My bash profile
# Environment Variables
export PS1="\u@\h:\w$ "
export PATH=$HOME/bin:/opt/local/bin:/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/usr/local/git/bin:$PATH
export MANPATH=$MANPATH:/opt/local/share/man:/usr/local/git/man
export INFOPATH=$INFOPATH:/opt/local/share/info
export EDITOR=vi
export CVS_RSH=ssh
export DEPLOY_TO=staging
# Aliases