Skip to content

Instantly share code, notes, and snippets.

@yakipote
yakipote / pre-commit
Created Apr 21, 2017
Golnag pre-commit lint, vet , test
View pre-commit
# 変更のあったgoファイルを取得
# なければ終了
gofiles=$(git diff --cached --name-only --diff-filter=ACM | grep '\.go$'|grep -v mock)
[ -z "$gofiles" ] && exit 0
# 各種コメントを実行して、終了コードを取得
echo $gofiles|xargs -n 1 golint -set_exit_status
lint=$?
echo $gofiles|xargs -n 1 go vet
View gist:ff3ce3f0a3d14c4987f342573bb7b743
<svg viewBox="左上のx座標 左上のy座標 右下のx座標 右下のy座標"></svg>
View gist:127a36b442bb5386ec50889e9a42f520
docker run --name digits -p "5000:5000" -v ./images/:/mnt/volumes/images kaixhin/digits
View file1.txt
| Left align | Right align | Center align |
|:-----------|------------:|:------------:|
| This | This | This |
| column | column | column |
| will | will | will |
| be | be | be |
| left | right | center |
| aligned | aligned | aligned |
@yakipote
yakipote / amazon.rb
Created Mar 25, 2015
アマゾンの本の情報を取得するやつ
View amazon.rb
# encoding: utf-8
require 'rubygems'
require 'amazon/ecs'
def amazon(isbn)
# 初期設定
Amazon::Ecs.configure do |options|
options[:associate_tag] = "pumissyu-22"# アソシエイトID(なんとか-22ってやつ)
options[:AWS_access_key_id] = "AKIAJUDAHJBFXMBJO3WQ"
options[:AWS_secret_key] = "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"