Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Kazuhiro Homma kazuph

🏠
Working from home
View GitHub Profile
@kazuph
kazuph / api.rb
Created Jan 28, 2014
grape-swaggerでgrapeでつくったAPIのドキュメントを自動生成する ref: http://qiita.com/kazuph/items/7a63d1cf22f2c6ab509d
View api.rb
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 Jan 23, 2014
macでwindows用に文字コードを変換したパスワード付きのzipを生成する(かも
View winzip.sh
#!/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 Jan 4, 2016
Vagrantでvagrantのデフォの秘密鍵じゃなくて自分のいつもの秘密鍵を使えるようにするシェルスクリプト ref: http://qiita.com/kazuph/items/0d9d723b36720b9bd6ed
View config
Host vagrant
HostName 127.0.0.1
User vagrant
Port 2222 # ← これは変わる可能性がある
@kazuph
kazuph / memo.md
Last active Jan 3, 2016
CROSS2014の自分メモ
View memo.md
@kazuph
kazuph / file0.txt
Created Jan 9, 2014
NSMutableStringを使った箇所でが何故かiOS7でだけコケる ref: http://qiita.com/kazuph/items/3324aa635738fcc35c84
View file0.txt
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Attempt to mutate immutable object with insertString:atIndex:'
@kazuph
kazuph / config
Created Jan 7, 2014
ssh configで踏み台サーバーを使ってる時にワイルドカードで手抜きができた ref: http://qiita.com/kazuph/items/46e7f665f8c09ec29471
View config
Host server-*
User username
ProxyCommand ssh -W %h:%p fumidai
@kazuph
kazuph / file0.txt
Created Dec 29, 2013
ターミナルのコマンドを使って今月の平日の日付だけ取得したい ref: http://qiita.com/kazuph/items/a30e52114af177a54983
View file0.txt
$ 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
View .gitconfig
[color]
# colorの設定(以下のコマンドは自動で色つける)
ui = auto
status = auto
diff = auto
branch = auto
interactive = auto
grep = auto
[core]
# globalな.gitignoreの指定
@kazuph
kazuph / yapc2013.pl
Last active Dec 23, 2015
YAPC::Asia 2013の感想ブログで特定のワードに対して言及があったかどうかだけ検出するスクリプト
View yapc2013.pl
#!/usr/bin/env perl
use common::sense;
use Furl;
use Web::Query;
use HTML::TagParser;
use Data::Dump qw/dump/;
use Term::ANSIColor qw(:constants);
die "Usage: perl yapc2013.pl [keyword]" unless $ARGV[0];
You can’t perform that action at this time.