例文を組み込んだAlfred Workflowを作りました: Alfred Git Commit Message Example
以下転載:
以下転載:
%title 梅ラボ花見 | |
%script{:src => "http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"} | |
%script{:src => "http://platform.twitter.com/anywhere.js?id=r6SEKr3NYesSmDL8bGeiLw&v=1"} | |
%link{:href => "http://ssig33.com/common.css", :type => "text/css", :rel => "stylesheet"} | |
#all | |
%button#css 破滅する | |
%h1 花見します | |
%h2 誰が来るの? | |
%ul | |
%li parapera |
""" | |
Add mypy type-checking cell magic to jupyter/ipython. | |
Save this script to your ipython profile's startup directory. | |
IPython's directories can be found via `ipython locate [profile]` to find the current ipython directory and ipython profile directory, respectively. | |
For example, this file could exist on a path like this on mac: | |
/Users/yourusername/.ipython/profile_default/startup/typecheck.py |
" tmux will only forward escape sequences to the terminal if surrounded by a DCS sequence | |
" http://sourceforge.net/mailarchive/forum.php?thread_name=AANLkTinkbdoZ8eNR1X2UobLTeww1jFrvfJxTMfKSq-L%2B%40mail.gmail.com&forum_name=tmux-users | |
if exists('$TMUX') | |
let &t_SI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=1\x7\<Esc>\\" | |
let &t_EI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=0\x7\<Esc>\\" | |
else | |
let &t_SI = "\<Esc>]50;CursorShape=1\x7" | |
let &t_EI = "\<Esc>]50;CursorShape=0\x7" | |
endif |
import os | |
from subprocess import check_call | |
def post_save(model, os_path, contents_manager): | |
"""post-save hook for converting notebooks to .py and .html files.""" | |
if model['type'] != 'notebook': | |
return # only do this for notebooks | |
d, fname = os.path.split(os_path) | |
check_call(['jupyter', 'nbconvert', '--to', 'script', fname], cwd=d) | |
check_call(['jupyter', 'nbconvert', '--to', 'html', fname], cwd=d) |