#!/bin/bash CONTEXT_IDENTIFIER='666333TESTNTBK6633' NOTEBOOK_FPID='666333TESTNTBK6633' # timestamp to invalidate JupyterHub server cache TIMESTAMP=`date +'%s'` # add CodeMirror config mkdir -p ~/.jupyter/nbconfig echo '{"CodeCell":{"cm_config":{"lineNumbers":true,"theme":"oreillybat"}}}' \ > ~/.jupyter/nbconfig/notebook.json # configure custom templates mkdir -p ~/.jupyter/templates echo "c.NotebookApp.extra_template_paths = ['~/.jupyter/templates']" \ > ~/.jupyter/jupyter_notebook_config.py cat << EOF > ~/.jupyter/templates/page.html {% extends "templates/page.html" %} {% block stylesheet %} {# stylesheets and any js that needs to load before everything else #} {{super()}} {% endblock %} {% block script %} {{super()}} {# js that should load after dom is ready #} {% endblock %} EOF BINDER_DIR=`dirname "${0}"` rm "${0}" if [ -f "${BINDER_DIR}/postBuild.original" ] then mv "${BINDER_DIR}/postBuild.original" "${BINDER_DIR}/postBuild" fi # vim: ft=sh