Skip to content

Instantly share code, notes, and snippets.

@GitSumito
GitSumito / file0.txt
Created February 3, 2017 09:48
【珍プレイ集】WORDPRESS高速化したらコケた ref: http://qiita.com/S-T/items/f93c99dd1d047dbf5a11
[{"id":14944,"d ~
@GitSumito
GitSumito / file0.txt
Last active July 11, 2017 16:22
tcshで単純作業をループ ref: http://qiita.com/S-T/items/f4da9385f0638298f3ac
tcsh
loop:
sleep 2
echo "aaa"
echo "bbb"
echo "ccc"
echo "----"
goto loop
@GitSumito
GitSumito / file0.txt
Last active July 11, 2017 16:22
ルーティングで不正アクセスを遮断 ref: http://qiita.com/S-T/items/3be699e999521e38f295
/sbin/route add -net 123.129.19.0 netmask 255.255.255.0 reject
@GitSumito
GitSumito / file0.txt
Created July 11, 2017 16:18
iptablesでサーバから外部(他のサーバ)への接続を遮断する ref: http://qiita.com/S-T/items/be52d5938737b03c45bf
iptables -L
@GitSumito
GitSumito / file0.txt
Created July 12, 2017 10:54
アクセスログから任意のランキングを作る汎用的なワンライナー ref: http://qiita.com/S-T/items/73b2bb095c1b81e9337d
perl -ne 'next unless(/★単純にgrepするキーワード★/);/★集計単位★/;$counts{$1}++;END{for(sort keys %counts){print "$_ $counts{$_}\n"}}' access_log
@GitSumito
GitSumito / file0.txt
Created July 14, 2017 03:27
kibana(ELK)でユーザーやグループ毎に見せる/見せないをコントロールする。 ref: http://qiita.com/S-T/items/5fa1d8d9cd83a7de8dfe
/usr/share/elasticsearch/bin/elasticsearch-plugin install -b com.floragunn:search-guard-5:5.4.2-12
cd /usr/share/elasticsearch/plugins/search-guard-5/tools
sh install_demo_configuration.sh
sh sgadmin_demo.sh
@GitSumito
GitSumito / file0.txt
Created August 9, 2017 10:52
Docker上で動くre:dashのメールの送信設定 ref: http://qiita.com/S-T/items/04e28b6ec056ca99d28b
vi docker-compose.production.yml
REDASH_MAIL_SERVER: "MAIL SERVER IP"
REDASH_MAIL_PORT: 25
REDASH_MAIL_DEFAULT_SENDER: "[email protected]"
@GitSumito
GitSumito / file0.txt
Last active September 13, 2017 00:50
15秒でわかるLet's Encryptのしくみ~無料で複数ドメイン有効な証明書作成~ ref: http://qiita.com/S-T/items/7ede1ccfae6fc7f08393
tsukada.test.jp
sumito.test.jp
coco.test.jp
@GitSumito
GitSumito / [作業前]docker-compose.production.yml
Created December 7, 2017 02:10
docker-compose内の時刻を日本時間に変更する ref: https://qiita.com/S-T/items/af88fc8f79c969dfb5ec
nginx:
image: redash/nginx:latest
ports:
- "443:443"
depends_on:
- server
links:
- server:redash
logging:
driver: "json-file"
@GitSumito
GitSumito / file0.txt
Created December 11, 2017 03:23
LTSVフォーマットから該当の項目のみを抽出 ref: https://qiita.com/S-T/items/2e41accb5279155830ee
time_local:11/Dec/2017:12:09:25 +0900 request:"GET /admin/widget/ HTTP/1.1" http_x_forwarded_for:"-" uid_got:"-" req_body_start:""
time_local:11/Dec/2017:12:09:25 +0900 request:"GET /admin/widget/ HTTP/1.0" http_x_forwarded_for:"192.168.120.120" uid_got:"app_uid=060012AC5A99275A050070A502030303" req_body_start:""
time_local:11/Dec/2017:12:09:26 +0900 request:"GET /admin/event/ HTTP/1.1" http_x_forwarded_for:"-" uid_got:"-" req_body_start:""
time_local:11/Dec/2017:12:09:26 +0900 request:"GET /admin/event/ HTTP/1.0" http_x_forwarded_for:"192.168.120.120" uid_got:"app_uid=060012AC5A99275A050070A502030303" req_body_start:""