Skip to content

Instantly share code, notes, and snippets.

#Run this in an IPython notebook, then restart the notebook server
#For now, URL_TO: https://gist.github.com/psychemedia/ab7bbc3aa731269bd3b4/raw/
!curl -L URL_TO/answer_button.js > $(ipython locate profile)/static/custom/answer_button.js
!curl -L URL_TO/activityCodeCell.js > $(ipython locate profile)/static/custom/activityCodeCell.js
!curl -L URL_TO/custom.css > $(ipython locate profile)/static/custom/custom.css
#In $(ipython locate profile)/static/custom/custom.js
## $([IPython.events]).on('app_initialized.NotebookApp', function(){ require(['custom/answer_buttons'])});
#!sed -i '$a $([IPython.events]).on("app_initialized.NotebookApp", function(){ require(["custom/answer_button","custom/activityCodeCell"])});' $(ipython locate profile)/static/custom/custom.js