Skip to content

Instantly share code, notes, and snippets.

View ssh0's full-sized avatar

Shotaro Fujimoto ssh0

View GitHub Profile
@ssh0
ssh0 / radiko.ipynb
Created November 13, 2014 05:26
radiko streaming app (wrriten in python) prototype
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ssh0
ssh0 / file1.txt
Last active August 29, 2015 14:10
Re:人力ソート【Python】 ref: http://qiita.com/ssh0/items/7bdefacd41f2267322ed
➤ python ranking_sort.py -l 3 1 4 8 5 2 6 7
which ones do you like?
[j]: 1, [k]: 3. [=]:eq
>>> j
which ones do you like?
[j]: 4, [k]: 1. [=]:eq
>>> k
@ssh0
ssh0 / todo.md
Last active August 29, 2015 14:12
TODO list
  • ガラス容器 for フルグラ
  • ドライヤー
  • シャンプー
  • タンブラー
@ssh0
ssh0 / file0.css
Last active August 29, 2015 14:13
IPython Notebookで卒論発表したいんじゃ ref: http://qiita.com/ssh0/items/8ae76ca0a0df1569462a
.reveal .slides {
text-align: left;
font-size: 190%; //160%
//width: 100% !important; //960px, 1366px
}
@ssh0
ssh0 / file0.txt
Last active August 29, 2015 14:14
IPython Notebookのスライドを(無理やり)pdf化する方法 ref: http://qiita.com/ssh0/items/c873b7cec7f363eed1d0
#!/bin/bash
folder=$(pwd)
num=$1
xte 'keydown Super_L' 'key 4' 'keyup Super_L'
for t in `seq 1 ${num}`
do
name=$(printf screen_%03d.jpg $t);
sleep 0.5
import -window root -quality 0 ${folder}/${name}
@ssh0
ssh0 / file0.txt
Created February 15, 2015 16:23
boolean and "A" or "B"みたいな書き方できたら賢そう【Python】【でも】 ref: http://qiita.com/ssh0/items/51aacabde077c50c0922
>>> def test(flag=True):
... print 'flag: %s' % (flag and 'on' or 'off')
...
@ssh0
ssh0 / file0.txt
Created March 3, 2015 09:46
スクリーンショットを撮って日付のディレクトリに連番で保存するスクリプト ref: http://qiita.com/ssh0/items/2b4e7a4146cb2da01187
sh ~/bin/screenshot.sh
@ssh0
ssh0 / clipbard_paste.sh
Created April 20, 2015 09:59
複数のLinuxマシン間でクリップボードを共有する【Alt-C】 ref: http://qiita.com/ssh0/items/868b828189a58f95c8ba
xclip -i -selection clipboard $HOME/Dropbox/clipboard
@ssh0
ssh0 / file0.txt
Last active March 8, 2016 09:36
コマンドラインで動かすファイルマネージャrangerの設定 ref: http://qiita.com/ssh0/items/fe85da119c93333ba34e
sudo apt-get install ranger w3m lynx highlight atool mediainfo xpdf caca-utils
ranger --copy-config=all
@ssh0
ssh0 / file0.txt
Created June 2, 2015 06:01
tmuxで最後のwindowの最後のpaneであるときだけ確認メッセージを出して、それ以外はそのままkillする ref: http://qiita.com/ssh0/items/2c0f0aa1f5179efb02c3
# if session has > 1 windows in current, kill-pane without confirmation.
# But confirm before killing pane when it is the last pane in the last window.
bind -n M-x if "tmux display -p \"#{session_windows}\" | grep ^1\$ && tmux display -p \"#{window_panes}\" | grep ^1\$" \
"confirm-before -p \"Kill the only pane in the only window? It will kill this session too. (y/n)\" kill-pane" \
"kill-pane"