Skip to content

Instantly share code, notes, and snippets.

@JohnGriffiths
Created January 12, 2014 19:04
Show Gist options
  • Save JohnGriffiths/8388935 to your computer and use it in GitHub Desktop.
Save JohnGriffiths/8388935 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"worksheets": [
{
"cells": [
{
"metadata": {},
"cell_type": "heading",
"source": "My custom.js",
"level": 1
},
{
"metadata": {},
"cell_type": "markdown",
"source": "(nice collection of nice buttons)\n\n12/01/2014\n\n(procrastinating.)"
},
{
"metadata": {
"run_control": {
"breakpoint": false
}
},
"cell_type": "code",
"input": "cd /home/brain/.ipython/profile_default/static/custom/",
"prompt_number": 1,
"outputs": [
{
"output_type": "stream",
"text": "/home/brain/.ipython/profile_default/static/custom\n",
"stream": "stdout"
}
],
"language": "python",
"collapsed": false
},
{
"metadata": {
"run_control": {
"breakpoint": false
}
},
"cell_type": "code",
"input": "%load custom.js",
"prompt_number": 2,
"outputs": [],
"language": "python",
"collapsed": false
},
{
"metadata": {
"run_control": {
"breakpoint": false
}
},
"cell_type": "code",
"input": "// we want strict javascript that fails\n// on ambiguous syntax\n\"using strict\";\n\n// to prevent timeout\nrequirejs.config({\n waitSeconds: 60\n});\n\n// do not use notebook loaded event as it is re-triggerd on\n// revert to checkpoint but this allow extension to be loaded\n// late enough to work.\n\n$([IPython.events]).on('app_initialized.NotebookApp', function(){\n \n require(['custom/helper-functions.js']);\n\n require(['/static/custom/styling/css_selector/main.js']);\n\n require(['custom/spellchecker/main'],function(spellchecker){\n // spellchecker.parameters('just a dummy argument to pass if necessary');\n spellchecker.parameters('dummy');\n console.log('Spellcheck extension loaded correctly');\n });\n\n require(['custom/tweet_me/main'],function(tweet_me){\n // tweet_me.parameters('twitter helper function directory');\n tweet_me.parameters('/home/damian/.ipython/profile_myext/static/custom/tweet_me');\n console.log('Tweet me extension loaded correctly');\n });\n\n require(['custom/nikola_deploy/main'],function(nikola_deploy){\n // nikola_deploy.parameters('posts directory', 'cleaner');\n nikola_deploy.parameters('/media/datos/Desarrollos/damian_blog','True');\n console.log('Nikola deploy extension loaded correctly');\n });\n\n require(['custom/zenmode/main'],function(zenmode){\n // zenmode.parameters(figure);\n zenmode.parameters('images/back12.jpg');\n console.log('Zenmode extension loaded correctly');\n });\n\n require([\"../nbextensions/toc\"], function (toc) {\n console.log('Table of Contents extension loaded')\n toc.load_extension() });\n\n require([\"../nbextensions/gist\"], function (gist_extension) {\n console.log('gist extension loaded')\n gist_extension.load_extension() });\n\n\n require(['custom/testing/swc/main'],function(m){\n m.new_tag_set('JG_thesis_tags', 'cell_tags' ,['text', 'fig_fromfile', 'fig_fromcode', 'reportedresults_code', 'other_code','notes'])\n console.log('JG thesis tags extension loaded correctly') });\n\n require(['/static/custom/publishing/nbconvert_button.js']);\n\n require(['custom/slidemode/main'],function(slidemode){});\n\n require(['/static/custom/hierarchical_collapse.js']);\n\n require(['/static/custom/usability/hide_input.js']);\n\n require(['custom/usability/read-only.js']);\n\n require(['/static/custom/usability/help_panel/help_panel.js'], function(help_panel){});\n \n require(['custom/usability/codefolding/codefolding.js'],function(codefolding){});\n \n require(['custom/usability/init_cell/main'],function(init_cell){});\n\n require(['/static/custom/usability/no_exec_dunder.js']);\n\n require(['/static/custom/usability/breakpoints.js']);\n});\n",
"outputs": [],
"language": "python",
"collapsed": false
}
],
"metadata": {}
}
],
"metadata": {
"name": "",
"css": [
""
]
},
"nbformat": 3
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment