Skip to content

Instantly share code, notes, and snippets.

@jimeh
jimeh / jquery.myplugin.coffee
Created April 7, 2011 23:44
Example jQuery plugin written in CoffeeScript, and the resulting compiled JavaScript file.
$.fn.extend
myplugin: (options) ->
self = $.fn.myplugin
opts = $.extend {}, self.default_options, options
$(this).each (i, el) ->
self.init el, opts
self.log el if opts.log
$.extend $.fn.myplugin,
default_options:
@eddorre
eddorre / gist:2373578
Created April 13, 2012 04:02
Installing REE with rbenv with iconv and readline
CONFIGURE_OPTS="-c --enable-shared -c --with-iconv-dir=/usr/local/Cellar/libiconv/1.14 -c --with-readline-dir=/usr/local/Cellar/readline/6.2.1/" rbenv install ree-1.8.7-2011.03