Skip to content

Instantly share code, notes, and snippets.

AWSTemplateFormatVersion: "2010-09-09"
Description: SNS Topic and EventBridge for SpotInstance Intteruption Notify
Parameters:
Env:
Type: String
Default: dev
AllowedValues:
- dev
- stg
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"
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
@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
@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 / cndjp10_memo.md
Last active March 26, 2019 00:55
個人的なメモ書き // 一晩でKubernetesを覚えて帰ろう。ワンナイトBootCamp! -- cndjp#10
  • title: 一晩でKubernetesを覚えて帰ろう。ワンナイトBootCamp! cndjp#10 https://cnd.connpass.com/event/123046/
  • date: 2019-03-25
  • place: Oracle Corp.
  • tags: cndjp
  • categories: study, meetup

個人的なメモ書きで内容を保証するものではありません

### Localization
d-i debian-installer/locale string en_US
d-i console-keymaps-at/keymap select jp
d-i console-setup/ask_detect boolean false
# Keyboard selection.
d-i keyboard-configuration/layoutcode string jp
d-i keyboard-configuration/modelcode jp106
### Network configuration
@d-shimizu
d-shimizu / Twitter_KeywordSearch_ruby23.rb
Last active September 21, 2018 02:58
Ruby2.3&Twitter Ruby GemでTwitterキーワード検索を試す ref: http://qiita.com/d_shimizu/items/297069e78a60c600b34b
#!/bin/env ruby
#encoding:UTF-8
require "twitter"
# アプリケーションキー(consumer key/secret)の読み込み
# OAuth アクセストークンの読み込み
@client = Twitter::REST::Client.new do | cnf |
cnf.consumer_key = "****************************************"
cnf.consumer_secret = "****************************************"
cnf.access_token = "****************************************"
@d-shimizu
d-shimizu / rails4_module_auto_load.rb
Last active September 21, 2018 02:57
Rails4におけるController,Modleのモジュールのロード ref: http://qiita.com/d_shimizu/items/7e57e7eb62e0d96f9b0b
module Hoge
def hoge_module_method
処理内容
end
end
@d-shimizu
d-shimizu / application.rb
Last active September 21, 2018 02:57
Railsでのモジュールのオートロード ref: http://qiita.com/d_shimizu/items/4affe530d541db56e937
module TestApp
class Application < Rails::Application
### モジュール自動ロードPathの指定を追記
config.autoload_paths += %W(#{config.root}/lib)
end
end