Skip to content

Instantly share code, notes, and snippets.

Shotaro Fujimoto ssh0

  • teamLab Inc.
  • Tokyo, Japan
Block or report user

Report or block ssh0

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
ssh0 / .zshrc
Last active Jun 29, 2016
[tmux] 端末起動時に自動で新規セッションを作成 or 既存セッションにアタッチ ref:
View .zshrc
if [[ ! -n $TMUX && $- == *l* ]]; then
# get the IDs
ID="`tmux list-sessions`"
if [[ -z "$ID" ]]; then
tmux new-session
create_new_session="Create New Session"
ID="`echo $ID | $PERCOL | cut -d: -f1`"
if [[ "$ID" = "${create_new_session}" ]]; then
ssh0 / file0.txt
Created Nov 29, 2015
[tmux] ペイン移動,削除の際にウィンドウ名をリネームする ref:
View file0.txt
# if session has > 1 windows in current, kill-pane without confirmation.
# But confirm before killing pane when it is the last pane in the window.
bind-key -n M-c if "tmux display -p \"#{window_panes}\" | grep ^1\$" \
"confirm-before -p \"Kill the only pane in the window? It will kill this window too. (y/n)\" kill-pane" \
"kill-pane \; run 'tmux rename-window \"#{pane_current_command}\"'"
# move between panes with Alt+j/k
bind-key -n M-j select-pane -t :.+ \; run 'tmux rename-window "#{pane_current_command}"'
bind-key -n M-k select-pane -t :.- \; run 'tmux rename-window "#{pane_current_command}"'
ssh0 / .latexmkrc_dvipng
Last active Nov 6, 2015
プレゼンで使う数式画像を作成する[vim + vim-quickrun + latexmk + dvipng] ref:
View .latexmkrc_dvipng
$latex = 'platex -interaction=nonstopmode -kanji=utf-8 %O %S';
$pdf_mode = 0;
ssh0 / binds.lua
Last active Sep 19, 2015
Webkitベースの軽量ブラウザluakitを使ってみた(vimperatorユーザーにオススメ!) ref:
View binds.lua
ex_follow_bindings = {
-- Yank element uri or description into primary selection
key({}, "y", [[Hint all links (as defined by the `follow.selectors.uri`
selector) and set the primary selection to the matched elements URI.]],
function (w)
w:set_mode("follow", {
prompt = "yank", selector = "uri", evaluator = "uri",
func = function (uri)
assert(type(uri) == "string")
uri = string.gsub(uri, " ", "%%20")
ssh0 / _ranger.zsh
Last active Aug 29, 2015
completion function for ranger CLI file manager (ver 1.7.1)
View _ranger.zsh
# ranger completion {{{
_ranger() {
typeset -A opt_args
_arguments -s -S \
{-d,--debug}'[Activate the debug mode: Whenever an error occurs, ranger will exit and print a full traceback.]'\
{-c,--clean}'[Activate the clean mode: ranger will not access or create any configuration files nor will it leave any traces on your system.]'\
{-r,--confdir=}'[Change the configuration directory of ranger from ~/.config/ranger to "dir".]:dir:_path_files -/'\
'--copy-config=[Create copies of the default configuration files in your local configuration directory. Existing ones will not be overwritten.]:FILE:(all commands commands_full rc rifle scope)'\
ssh0 / .vimrc
Last active Aug 29, 2015
bibcleanでbibファイルを整形【Vim】 ref:
View .vimrc
augroup filetype
" bib file
autocmd BufRead,BufNewFile *.bib set filetype=bib
autocmd Filetype bib let &formatprg="bibclean"
augroup END
ssh0 /
Created Jul 1, 2015
TeXをもっと便利に使う!(自動コンパイル・部分コンパイル・分割ファイルから親ファイルのコンパイル)【Vim + vim-quickrun + latexmk】 ref:
$latex = 'platex -interaction=nonstopmode -kanji=utf-8 %O %S';
$dvipdf = 'dvipdfmx %O -o %D %S';
$bibtex = 'pbibtex';
$pdf_mode = 3; # use dvipdf
$pdf_update_method = 2;
$pdf_previewer = "start mupdf %O %S";
# Prevent latexmk from removing PDF after typeset.
# $pvc_view_file_via_temporary = 0;
ssh0 / file0.txt
Last active Aug 29, 2015
vimperatorのプラグイン管理を考えてみた ref:
View file0.txt
" set the root dir for loading plugins(you can set multiple directories)
let g:plugin_loader_roots = "~/.path/to/vimperator/plugins,~/path/to/another/plugins"
" specify the plugin you use (you can omit '.js')
let g:plugin_loader_plugins = "plugin1,plugin2"
ssh0 / recordmydesktop.zsh_completion
Last active Aug 29, 2015
View recordmydesktop.zsh_completion
# recordmydesktop completion {{{
_recordmydesktop() {
local curcontext="$curcontext" diropts prev numopts
typeset -A opt_args
ssh0 / file0.txt
Last active Aug 29, 2015
過去に設定して設定ファイルから消したキーバインドをちゃんと消す方法【tmux】 ref:
View file0.txt
<Prefix> + r => reload config file
bind-key r source-file ~/.tmux.conf \; display "Reloaded!"
You can’t perform that action at this time.