The following block renders as ruby even though no language is specified:
def method
puts "a method!"
end
:~$ This text is always clobbered by the YARD parser
{ | |
"*" : [ | |
["exec", "echo 'exec works!'"], | |
["eval", "puts 'eval works!'"] | |
], | |
"iruby" : [ | |
["eval", "puts 'gems work!'"], | |
["gem", "metaid"] | |
], | |
"metaid": [ |
# https://porkrind.org/missives/calling-applescript-from-ruby/ | |
def osascript(script) | |
system 'osascript', *script.split(/\n/).map { |line| ['-e', line] }.flatten | |
end | |
# http://stackoverflow.com/questions/5292204/macosx-get-foremost-window-title | |
osascript <<-END | |
global frontApp, frontAppName, windowTitle | |
set windowTitle to "" |
The following block renders as ruby even though no language is specified:
def method
puts "a method!"
end
:~$ This text is always clobbered by the YARD parser
require 'zlib' | |
require 'yard' | |
require 'tmpdir' | |
require 'stringio' | |
require 'fileutils' | |
require 'archive/tar/minitar' | |
io = StringIO.new File.read('sequel-4.32.0.gem') | |
catch :finished do |
Jupyter.notebook.kernel.execute("puts 'hello world'", { | |
iopub : { | |
output : function(response) { | |
console.log(response); | |
} | |
} | |
}); |
Jupyter.notification_area.get_widget("notebook").set_message("Extension loaded!"); |
''' Add to jupyter_notebook_config.py | |
import sys | |
sys.path.append("/root/.jupyter/extensions/") | |
c.NotebookApp.reraise_server_extension_failures = True | |
c.NotebookApp.server_extensions = ['status'] | |
''' | |
from notebook.utils import url_path_join | |
from notebook.base.handlers import IPythonHandler |
IPython.CodeCell.options_default.cm_config.autoCloseBrackets = false; | |
setTimeout(function() { | |
if (window.terminal != undefined) { | |
window.terminal.term.screenKeys = true; | |
} | |
}, 1000); |
{ | |
"NewNotebookWidget": { | |
"default_kernel": "ruby" | |
} | |
} |
{ | |
"load_extensions": { | |
"integration": true, | |
"toolmetrics": true | |
}, | |
"_": "https://codemirror.net/doc/manual.html", | |
"MarkdownCell": { | |
"cm_config": { | |
} | |
}, |