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
$ docker ps | |
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES | |
095c263fb06d mysql:5.7 "docker-entrypoint..." 25 hours ago Up 25 hours 0.0.0.0:3306->3306/tcp sample-mysql | |
$ docker exec -it 095c263fb06d bash | |
root@095c263fb06d:/# mysql -u root -p | |
Enter password: | |
Welcome to the MySQL monitor. Commands end with ; or \g. | |
Your MySQL connection id is 25 | |
Server version: 5.7.18 MySQL Community Server (GPL) |
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
//結果 ’ 12’ | |
echo str_replace(" ", " ", sprintf("%3d", 12)); |
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
//結果 ’ 12’ | |
echo sprintf("%3d", 12); |
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 | |
use Illuminate\Database\Schema\Blueprint; | |
use Illuminate\Database\Migrations\Migration; | |
class AddZerofill extends Migration { | |
/** | |
* Run the migrations. | |
* |
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
[program:hoge]<br> | |
command=/usr/local/bin/php /home/hoge/public_html/artisan queue:listen beanstalkd | |
directory=/home/hoge/public_html | |
priority=999 ; the relative start priority (default 999) | |
autostart=true ; start at supervisord start (default: true) | |
autorestart=true ; retstart at unexpected quit (default: true) | |
startsecs=10 ; number of secs prog must stay running (def. 10) | |
startretries=3 ; max # of serial start failures (default 3) | |
exitcodes=0,2 ; 'expected' exit codes for process (default 0,2) | |
stopsignal=QUIT ; signal used to kill process (default TERM) |
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
%% Sequence diagram code | |
sequenceDiagram | |
マイページ->保有データ:問い合わせ | |
alt is sick | |
loop データ一覧を表示 | |
保有データ-->>マイページ: データ | |
end | |
else データ0件メッセージ | |
保有データ-->>マイページ: データはありません | |
end |
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
sequenceDiagram | |
ログイン ->> バリデーター: (Email,Password) | |
alt login is false | |
バリデーター -->> ログイン: 401 (メッセージ) | |
else login is true | |
バリデーター -->> ログイン: 200 OK | |
end |
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
%% Sequence diagram code | |
sequenceDiagram | |
オブジェクト名 ->> 送り先オブジェクト名: メッセージ | |
送り先オブジェクト名 -x 送り先オブジェクト名: エラー | |
Note right of 送り先オブジェクト名: エラー発生<br/>バリデーション | |
送り先オブジェクト名 -->> オブジェクト名: 応答メッセージ | |
オブジェクト名 ->> 送り先オブジェクト名: メッセージ再送 | |
送り先オブジェクト名 --x オブジェクト名: 応答メッセージ 終了 |
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 | |
//ついでに非 Laravelerの人のためにランダムなパスワード生成 | |
private function makeRandomPassword() | |
{ | |
$collectionA = array_rand(array_flip(range('a', 'z')), 4); | |
$collectionB = array_rand(array_flip(range('A', 'Z')), 4); | |
$collectionC = array_rand(array_flip(range(0, 9)), 3); | |
$collectionD = array_rand(array_flip(['!','$','%','&','(',')','*','+','/']), 3); | |
$passwordstr = array_merge($collectionA,$collectionB,$collectionC,$collectionD); | |
return str_shuffle(implode($passwordstr)); |
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 | |
use Illuminate\Support\Collection; | |
class SampleController extends Controller | |
{ | |
private function makeRandomPassword() | |
{ | |
$collectionA = collect(range('a', 'z'))->random(4)->all(); | |
$collectionB = collect(range('A', 'Z'))->random(4)->all(); |