Skip to content

Instantly share code, notes, and snippets.

View d-shimizu's full-sized avatar

Daisuke Shimizu d-shimizu

View GitHub Profile
@d-shimizu
d-shimizu / file0.txt
Created May 22, 2019 14:33
PythonでCPU1コアの使用率を100%にするワンライナー ref: https://qiita.com/d_shimizu/items/51412f339df2239d6f82
$ python -c 'while True: pass'
@d-shimizu
d-shimizu / slack-notify-exec.log
Last active August 18, 2020 12:56
SlackのIncoming Webhooksを使って外部から通知するためのシェルスクリプトのサンプル ref: https://qiita.com/d-shimizu/items/07eee4bc876ec508e66c
$ ./slack-notify.sh test
use sampledb;
SELECT
table_name
, engine
, table_rows
, avg_row_length
, data_free
, floor((data_length+index_length)/1024/1024) as all_size_MB
, floor((data_length)/1024/1024) as data_size_MB
log_format ltsv "time:$time_local"
"\thost:$remote_addr"
"\turi:$request_uri"
"\tmethod:$request_method"
"\tforwardedfor:$http_x_forwarded_for"
"\treq:$request"
"\tstatus:$status"
"\tsize:$body_bytes_sent"
"\treferer:$http_referer"
"\tua:$http_user_agent"
AWSTemplateFormatVersion: "2010-09-09"
Description: SNS Topic and EventBridge for SpotInstance Intteruption Notify
Parameters:
Env:
Type: String
Default: dev
AllowedValues:
- dev
- stg