Skip to content

Instantly share code, notes, and snippets.

View kazuph's full-sized avatar

Kazuhiro Homma kazuph

View GitHub Profile
"dein Scripts-----------------------------
if &compatible
set nocompatible " Be iMproved
endif
" Required:
set runtimepath^=/home/pi/.dein/repos/github.com/Shougo/dein.vim
" Required:
call dein#begin(expand('/home/pi/.dein'))
@kazuph
kazuph / api.rb
Created January 28, 2014 13:44
grape-swaggerでgrapeでつくったAPIのドキュメントを自動生成する ref: http://qiita.com/kazuph/items/7a63d1cf22f2c6ab509d
desc "Reserve a virgin in heaven", {
:notes => <<-NOTE
Virgins in heaven
-----------------
> A virgin doesn't come for free
If you want to reserve a virgin in heaven, you have to do
some crazy stuff on earth.
@kazuph
kazuph / winzip.sh
Created January 23, 2014 08:21
macでwindows用に文字コードを変換したパスワード付きのzipを生成する(かも
#!/usr/bin/env bash -eu
DIR=$1
echo "${DIR}を圧縮します。"
cp -rp ${DIR} ${DIR}_org
convmv -f utf8 --nfd -t utf8 --nfc -r --notest ${DIR}/*
convmv -f utf8 -t cp932 -r --notest ${DIR}/*
zip -9 -r ${DIR}.zip ${DIR}
zipcloak ${DIR}
@kazuph
kazuph / config
Last active January 4, 2016 00:09
Vagrantでvagrantのデフォの秘密鍵じゃなくて自分のいつもの秘密鍵を使えるようにするシェルスクリプト ref: http://qiita.com/kazuph/items/0d9d723b36720b9bd6ed
Host vagrant
HostName 127.0.0.1
User vagrant
Port 2222 # ← これは変わる可能性がある
@kazuph
kazuph / memo.md
Last active January 3, 2016 13:49
CROSS2014の自分メモ
@kazuph
kazuph / file0.txt
Created January 9, 2014 05:47
NSMutableStringを使った箇所でが何故かiOS7でだけコケる ref: http://qiita.com/kazuph/items/3324aa635738fcc35c84
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Attempt to mutate immutable object with insertString:atIndex:'
@kazuph
kazuph / config
Created January 7, 2014 10:20
ssh configで踏み台サーバーを使ってる時にワイルドカードで手抜きができた ref: http://qiita.com/kazuph/items/46e7f665f8c09ec29471
Host server-*
User username
ProxyCommand ssh -W %h:%p fumidai
@kazuph
kazuph / file0.txt
Created December 29, 2013 00:59
ターミナルのコマンドを使って今月の平日の日付だけ取得したい ref: http://qiita.com/kazuph/items/a30e52114af177a54983
$ cal | awk -v ORS=' ' 'NR>=3{print $2, $3, $4, $5, $6}'
2 3 4 5 6 9 10 11 12 13 16 17 18 19 20 23 24 25 26 27 30 31
@kazuph
kazuph / readme.md
Created October 29, 2013 14:11
xcodeのコードフォーマッター導入メモ
[color]
# colorの設定(以下のコマンドは自動で色つける)
ui = auto
status = auto
diff = auto
branch = auto
interactive = auto
grep = auto
[core]
# globalな.gitignoreの指定