Don't wanna be here? Send us removal request.
Text
開発用にオレオレ証明書を作成してNginxで使用する手順
オレオレ証明書作成
openssl genrsa -des3 -out cert.key 2048 openssl req -new -key cert.key -out cert.csr cp cert.key cert.key.org openssl rsa -in cert.key.org -out cert.key openssl x509 -req -days 365 -in cert.csr -signkey cert.key -out cert.pem
nginx.conf設定
MacのHomebrewでインストールした場合、 デフォルトだと/usr/local/etc/nginx/nginx.conf あたりにある
server { listen 8443 ssl; server_name localhost.co.jp; ssl_certificate cert.pem;#ここに指定 ssl_certificate_key cert.key;#ここに指定 ssl_session_cache shared:SSL:1m; ssl_session_timeout 5m; ssl_ciphers HIGH:!aNULL:!MD5; ssl_prefer_server_ciphers on; }
0 notes
Text
SNS共有ボタン設置方法
それぞれ以下でコード生成してサイトに貼り付け。
Twitterボタン
https://about.twitter.com/ja/resources/buttons
Facebookボタン
https://developers.facebook.com/docs/plugins/like-button?locale=ja_JP
はてなブックマークボタン
http://b.hatena.ne.jp/guide/bbutton
0 notes
Text
Visual Studio Codeのオススメ拡張機能
Visual Studio Codeに入れると便利な拡張機能たち。
Live Server
HTMLのライブプレビュー。
HTML Snippets
HTMLのスニペット入力補完。
Beautify
HTML/CSS/Javascriptのフォーマット。
jQuery Code Snippets
jQueryのスニペット入力補完。
Bootstrap 3 Snippets
Bootstrapのスニペット入力補完。
Laravel 5 Snippets
Laravel5のスニペット入力補完。
Laravel Blade Snippets
Laravel Bladeのスニペット入力補完。
Laravel Artisan
LaravelのartisanコマンドをVSCode上で実行可。
0 notes
Text
Laravelチートシート
使用環境/バージョン
MacOSX Sierra 10.12.5
Laravel 5.1 LTS
PHP 5.6
環境構築
PHPインストール
brew tap homebrew/php brew install php56
Composerインストール
brew install composer
実装
プロジェクト作成
composer create-project laravel/laravel hoge "5.1.*"
DB準備(SQLiteを使う場合)
touch database/database.sqlite vi .env
モデル
php artisan make:model Hoge
マイグレーション/シーダー
php artisan make:migration create_hoges_table vi yyyy_mm_dd_HHMMSS_create_hoges_table.php
php artisan make:seeder HogeTableSeeder vi ModelFactory.php vi HogeTableSeeder.php vi DatabaseSeeder.php
php artisan migrate:refresh --seed php artisan migrate:status
ルーティング
vi routes.php
コ��トローラ
php artisan make:controller HogeController vi HogeController.php
リクエスト
php artisan make:request HogeRequest vi HogeRequest.php
ビュー
vi hoge.blade.php
起動
php artisan serve
テスト
php artisan make:test HogeTest
参考URL
Laravel公式ドキュメント
0 notes