node.js, npmバージョンアップ

[vagrant@localhost ~]$ nvm install v10.12.0
Downloading and installing node v10.12.0…
Downloading https://nodejs.org/dist/v10.12.0/node-v10.12.0-linux-x64.tar.xz…
######################################################################## 100.0%
Computing checksum with sha256sum
Checksums matched!
Now using node v10.12.0 (npm v6.4.1)
[vagrant@localhost ~]$ nvm use v10.12.0
Now using node v10.12.0 (npm v6.4.1)

[vagrant@localhost ~]$ node -v
v10.12.0
[vagrant@localhost ~]$ npm -v
6.4.1

Holacracy

The term “holacracy” refers to social technology or organizational governance management to maintain a self-propelled organization by distributing authority and making decisions throughout the organization rather than making decisions through traditional top-down hierarchies. It is defined as the method.

NetFlow

NetFlow is a technology developed by Cisco Systems, Inc for monitoring and analyzing network traffic information. Implemented primarily in Cisco routers and switches, it is now becoming the industry standard in flow measurement and is now supported by many vendors’ network devices. Analyze flow information such as NetFlow to identify operational or security issues, strengthen external or internal network security.

What is flow in network traffic analysis is like a packet group with common attributes flowing on the network. For example, attributes such as source / destination IP address, source / destination port number, protocol number.
If common, the packet is considered as the same flow. In an easy-to-understand example, if a user uploads a file to the server, the processing in that case is regarded as one flow(in terms of packets, it is a block of multiple packets wit common attributes). By analyzing this flow information, it is possible to monitor and analyze traffic on a per-suer or per-application basis.

Google Cloud Platform

Google Cloud Platform is a cloud computing platform operated by google. It operates on the same infrastructure as end-user services such as Google Search and Youtube. We support from simple websites to complex application development.

うん、これは使っていきたい。

Adobe Acrobat Reader DCを入れよう

PDFのmeta情報・プロパティ情報は必要ですよね。
Adobe Acrobat Reader DCをインストールしたいと思います。

うむ。。

これでプロパティを開くと、誰が作っているかがすぐにわかってしまいますね。

空チェックをして型チェック

nullかチェックをして、その後、型チェックを行う

$var = "2019/04/01";

if(empty($var)){
	echo "値を入力してください";
} else{
	if(preg_match("/^[a-zA-Z0-9]+$", $var)){
		echo "英数字で入力してください";
	} else {
		echo "合格";
	}
}

うむ、nullかどうかはオブジェクトにしたいですな。

正規表現 英数記号:\s!-~

英字:[A-Za-z]

$var="My name is Tom";
echo preg_match("/[A-Za-z]/", $var);

数字:[0-9]

$var="My name is Tom, 19years";
echo preg_match("/[0-9]/", $var);

英数字:[A-Za-z0-9]

$var="今年の桜は綺麗ね";
echo preg_match("/[A-Za-z0-9]/", $var);

英数記号:!”\#$%&@'()*+,-./_

$var="hoge@gmail.com";
echo preg_match("/[\#$%&@'()*+,-._]/", $var);
$var="hoge@gmail.com";
echo preg_match("/[\s!-~]/", $var);

あれ!? ”\#$%&@'()*+,-._”と”\s!-~”、一緒だ。
すげーーーーーーーーーーーー

OAuth2.0 の仕組みとrfc

OAuth2.0って何??

OAuthは権限の認可を行うオープンスタンダード
OAuth2.0の4種類のロール
1.resource owner(リソースオーナー) ※エンドユーザーとも
2.resource server(リソースサーバー)
3.client(クライアント)
4.authorization server(認可サーバー)

WebserverA (エンドユーザー)からwebserverB(client)にアクセスすることを許可する
Aの信任を得た認可サーバーからBに対するアクセストークンを発行してもらい、Bにアクセストークンを渡す
Bのパスワードを入力せずに、Bの一部の権限だと実行することが重要