Added gist, pretty much stolen verbatim from
https://github.com/minrk/ipython_extensions/blob/master/nbextensions/gist.js
Added bundle dir support
got rid of js errors
updates to work with ipython master: