- 今後コードレビュー時に「これってリーダブルコードの◯◯だよね?、こう直したほうがいいよね」と引用できレビューの時間の短縮化が実現できる。
- リーダブルコードに登場する特殊ワードをチームのコーディングの共通語とする。デザインパターンのカタログ的な考え。
- リーダブルコードを読んでない人も内容を短時間で把握できる。
- チーム全体のコードを読みやすくメンテナンスしやすくし品質をあげる。
- リーダブルコード教になりチーム以外にも広める。コードの品質が悪い人にはリーダブルコードの読書を進めてみる。ひどいコードのままコーディングしてもらうよりその時間を読書の時間に割り当てることも考える(結果的に時間が還元できるなら)。
- リーダブルコードに書いてあることが全てのプロジェクトに適用てきるわけではないけれでもコーディングルールを考える際の指針にすることはできる。
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
#!/usr/bin/env bash | |
DOCKER=`which docker` | |
usage() | |
{ | |
echo "Usage: $(basename $0) [-l num] IMAGE" | |
exit 0 | |
} |
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
gcloud config set project <project-id-of-project-2> | |
gcloud config list |
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
DROP TABLE products; | |
CREATE TABLE products( | |
id int not null auto_increment, | |
name varchar(255), | |
stocks int, | |
created_at datetime, | |
updated_at datetime, | |
primary key (id) | |
) ENGINE=InnoDB; |
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
<?php | |
phpinfo(); |
A curated list of AWS resources to prepare for the AWS Certifications
A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.
For more about AWS and AWS Certifications you can follow me @leonardofed
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
<?php | |
$users = array(10, 100, 1000, 10000, 100000); | |
$request_number = 24*60*60/5; // polling = 5s | |
foreach ($users as $user) { | |
$requests = $request_number * $user; | |
$computings = ($request_number * 2 * 256 / 1024) * $user; |
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
<?php | |
$raw = file_get_contents('php://input'); | |
file_put_contents('/tmp/log_line_' . date('YYmmdd'), $raw . PHP_EOL, FILE_APPEND); | |
// ログ確認方法 | |
// https://example.com?log=1 | |
$log = filter_input(INPUT_GET, 'log', FILTER_SANITIZE_URL); | |
if ($log) { | |
$handle = popen("tail -f /tmp/log_line_" . date("YYmmdd") . " 2>&1", 'r'); | |
while(!feof($handle)) { |
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
<?php | |
$ch = curl_init(URL); | |
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json')); | |
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET'); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | |
// プロキシを無効に設定 | |
curl_setopt($ch, CURLOPT_PROXY, ""); |
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
#!/usr/bin/env bash | |
# Usage: | |
# ./solc [options] inputfile > outfile | |
# Notes: | |
# - file i/o is limited to the current directory | |
# - this works with the pyethereum solc_wrapper | |
docker run -i --rm --user $(id -u):$(id -g) -v $(pwd):/tmp --workdir /tmp ethereum/solc:0.4.24 $@ |
OlderNewer