##swagger editor https://qiita.com/k_keisuke/items/574cbabe38a4ab6b94d4
##概要 https://techblog.zozo.com/entry/swagger_yaml
##仕様 https://swagger.io/docs/specification/describing-responses/
##サンプル
linux 同一セグメント 複数ipの来たインターフェイスのIPから戻り設定 | |
https://engineering.silk.co/post/31923247961/multiple-ip-addresses-on-amazon-ec2 | |
https://qiita.com/fururun02/items/69d1ddac298b4ce48269 | |
``` | |
# tempraly | |
bash -c "echo '2 eth0_rt' >> /etc/iproute2/rt_tables" | |
ip rule add from 172.31.0.22 table eth0_rt | |
ip route add default via 172.31.0.1 dev eth0 table eth0_rt |
root = true | |
[*] | |
indent_style = space | |
indent_size = 4 | |
end_of_line = lf | |
charset = utf-8 | |
trim_trailing_whitespace = true | |
insert_final_newline = true |
http://www.geocities.jp/yasasikukaitou/rsyslog-filter.html |
curl -XGET 'localhost:9200/_aliases?pretty'
##closed indices
curl -XGET 'http://localhost:9200/_cluster/state/blocks?pretty'
typeも解る curl -XGET 'localhost:9200/xxx_index_201705/_mapping?pretty'
重複排除 | |
/usr/bin/pgrep -f /usr/bin/emacs || echo "not duplicate emacs process" | |
http://qiita.com/rsooo/items/ef1d036bcc7282a66d7d | |
SCRIPT_DIR=$(cd $(dirname $(readlink -f $0 || echo $0));pwd -P) | |
cd $SCRIPT_DIR | |
#shell補完 |
TARGET_VPC_ID=vpc-XXXXXXXX
echo '>tmp_replace_name' >tmp_create_command.txt
aws ec2 describe-security-groups | jq -r '.SecurityGroups[]|{key1:.GroupName, key2:.IpPermissions[]}|[.key1,.key2.ToPort,.key2.IpRanges[].CidrIp,.key2.UserIdGroupPairs[].GroupId] |@tsv' >tmp_list
aws ec2 describe-security-groups --query 'SecurityGroups[*].{Name:GroupName,ID:GroupId}' | jq -r '.[] | [.Name,.ID]|@tsv' >tmp_replace_id
for group_name in cat tmp_replace_id | cut -f 1 | sort | uniq | grep -v '^default$'
; do echo "aws ec2 create-security-group --group-name $group_name --description $group_name --vpc-id=$TARGET_VPC_ID | echo -e "$group_name\t"`jq -r ".GroupId"` >>tmp_replace_name" ; done >>tmp_create_command.txt
- hosts: localhost | |
user: root | |
vars: | |
mecab_dir: /opt/mecab | |
src_dir: /usr/local/src | |
ipadic_workspace: "{{src_dir}}/mecab-ipadic-neologd" | |
############## | |
# mecab installation process | |
############# | |
tasks: |
postgres initdb | |
localeはcにしないとソート順が崩れる?<==システムのライブラリ依存になるらしいcでも問題無さそう | |
「特定のテーブルでのみロケールを有効にしたソートを行いたい場合は、カラムに COLLATE を指定する方が良いでしょう。」がよさそう。 | |
(デフォルトでja_JP.UTF-8になるのであえて変える必要はないかもしれない) | |
http://sios-oss.blogspot.jp/2013/07/blog-post.html | |
http://soudai1025.blogspot.jp/2015/08/mysqlpostgresql.html | |
エンコーディングはuft8でよい | |
現在のセッションの最後のsequence値を保証して取得 | |
SELECT currval('hoge_no_seq'); |
http://tech.quartetcom.co.jp/2015/01/19/composer-practices/ | |
バージョンナンバーは、メジャー.マイナー.パッチとし、バージョンを上げるには、 | |
1. APIの変更に互換性のない場合はメジャーバージョンを、 | |
2. 後方互換性があり機能性を追加した場合はマイナーバージョンを、 | |
3. 後方互換性を伴うバグ修正をした場合はパッチバージョンを上げます。 | |
プレリリースやビルドナンバーなどのラベルに関しては、メジャー.マイナー.パッチの形式を拡張する形で利用することができます。 | |
http://qiita.com/mokemokechicken/items/d3a3944bfa999c2582b7 |