In [4]:
profile_dir = get_ipython().profile_dir.location
profile_dir


Out[4]:
u'/home/dcouture/.ipython/profile_default'

In [5]:
import os
tgt = os.path.join( profile_dir, 'static', 'custom')
!git clone https://github.com/ipython-contrib/IPython-notebook-extensions.git $tgt


Cloning into '/home/dcouture/.ipython/profile_default/static/custom'...
remote: Reusing existing pack: 787, done.
remote: Total 787 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (787/787), 2.63 MiB | 1.25 MiB/s, done.
Resolving deltas: 100% (350/350), done.
Checking connectivity... done

In [7]:
%cd $tgt
!ls


/home/dcouture/.ipython/profile_default/static/custom
custom.example.js    hierarchical_collapse.js  README.md  styling  usability
helper-functions.js  publishing		       slidemode  testing  wiki-images

In [ ]:
%%writefile custom.js
// we want strict javascript that fails
// on ambiguous syntax
"using strict";

// do not use notebook loaded  event as it is re-triggerd on
// revert to checkpoint but this allow extesnsion to be loaded
// late enough to work.
//

$([IPython.events]).on('app_initialized.NotebookApp', function(){


    /**  Use path to js file relative to /static/ dir without leading slash, or
     *  js extension.
     *  Link directly to file is js extension.
     *
     *  first argument of require is a **list** that can contains several modules if needed.
     **/

    // require(['custom/noscroll']);
    // require(['custom/clean_start'])
    // require(['custom/toggle_all_line_number'])
    // require(['custom/gist_it']);

    /**
     *  Link to entrypoint if extesnsion is a folder.
     *  to be consistent with commonjs module, the entrypoint is main.js
     *  here youcan also trigger a custom function on load that will do extra
     *  action with the module if needed
     **/
     require(['custom/slidemode/main'],function(slidemode){
    //     // do stuff
     })

});