This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" ■とりあえずな簡易版 | |
set expandtab | |
set tabstop=4 | |
set shiftwidth=4 | |
set nowrap | |
set number | |
set showmatch | |
set wildmenu | |
set incsearch | |
set ignorecase |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### CentOSへのインストール手順 | |
参考図書ではファイアウォールとSELinuxの無効化を行っているが不要かも | |
$ systemctl disable firewalld | |
$ vi /etc/sysconfig/selinux | |
SELINUX=disabled | |
ホストOSの確認 | |
$ cat /etc/redhat-release | |
CentOS Linux release 7.6.1810 (Core) | |
※CentOSが7.5.1804より古い場合はアップデートする。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ユーザ情報取得 | |
> SELECT user, host, password FROM mysql.user; | |
ユーザの権限確認 | |
> SHOW GRANTS for 'root'@'%'; | |
ユーザ作成 hostは%(任意の文字列)で作成される。指定する場合は'ユーザ名'@'ホスト名'で指定する。 | |
> CREATE USER master IDENTIFIED BY 'master'; | |
> CREATE USER 'master'@'localhost' IDENTIFIED BY 'master'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce | |
// https://qiita.com/rana_kualu/items/59832607ae407c467baa | |
// | |
const array1 = [{"a":1, "b":2, "d":4},{"a":1, "b":2, "c":4}]; | |
const reducer = (accumulator, currentValue) => JSON.stringify(accumulator) + '\n' + JSON.stringify(currentValue); | |
re = array1.reduce(reducer) | |
console.log(re); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### ブランチ | |
ブランチの作成と同時にチェックアウト(ブランチ切り替え) | |
$ git checkout -b bugFix | |
作成するだけの場合 | |
$ git branch issue1 | |
現在のブランチ確認(*がついているブランチが現在のブランチ、-aをつけると追跡中のリモート含め表示) | |
$ git branch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Windows | |
管理者でコマンドプロンプト | |
1.Win + R | |
2.ファイルを指定して実行を起動 | |
3.cmdを入力して | |
4.Ctrl + Shift + Enter | |
5.管理者でコマンドプロンプトが起動 | |
サクラエディタ | |
日付入力 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://www.python.jp/install/centos/index.html | |
https://docs.python.jp/3/library/venv.html | |
CentOSにpython3.6インストール手順 | |
$ sudo yum -y install https://centos7.iuscommunity.org/ius-release.rpm | |
$ yum -y install python36u python36u-devel python36u-pip | |
仮想環境作成・有効化・ライブラリインストール・無効化 | |
$ python3 -m venv ./myenv | |
$ source myenv/bin/activate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://docs.aws.amazon.com/ja_jp/ses/latest/DeveloperGuide/send-using-sdk-python.html | |
# https://dev.classmethod.jp/cloud/aws/lambda-to-ses/ | |
# ロールアタッチポリシー:AmazonSESFullAccess | |
import boto3 | |
from botocore.exceptions import ClientError | |
import json | |
SRC_MAIL = "[email protected]" | |
DST_MAIL = "[email protected]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 事前にAWSコンソールでAWSSNSのトピック、サブスクリプションを作成しておく | |
# ロールアタッチポリシー:AmazonSNSFullAccess | |
import boto3 | |
def lambda_handler(event, context): | |
sns_client = boto3.client('sns') | |
# トピックARNを指定する | |
topicarn = 'arn:aws:sns:ap-northeast-1:xxxxxxxxxxxx:test-send-email' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"git.autofetch": true, | |
"terminal.integrated.shell.windows": "C:\\msys64\\msys2_shell.cmd", | |
"terminal.integrated.shellArgs.windows": [ | |
"-mingw64", | |
"-defterm", | |
"-no-start", | |
"-here", | |
"-full-path" | |
], |
NewerOlder