prefectures テーブル SQL

INSERT INTO `prefectures` VALUES(1,'北海道', NULL, NULL); (2,'青森県', NULL, NULL), (3,'岩手県', NULL, NULL), (4,'宮城県', NULL, NULL), (5,'秋田県', NULL, NULL), (6,'山形県', NULL, NULL), (7,'福島県', NULL, NULL), (8,'茨城県', NULL, NULL),…

マウスオーバー  サムネイル切り替え

osyu-web.com

chart.js radar

https://office7fuku.com/wp-content/uploads/frame/graph_rader_sample_indata.html office7fuku.com

EC2 立ち上げ mysql

nginx, php-fpm はいけた mysql が入らない Amazon Linux2でmysqlを入れようとしたらエラーが出た - Qiita mariadb を消して、mysqldを入れる Amazon Linux 2 で MySQL を使用する – Amazon Web Service(AWS)導入開発支援 #自動起動設定$ sudo systemctl sta…

新規docker コンテナ作成 コマンド一覧

docker run -i -t -d -v /Users/mirei_hayase/git/:/home/git --name コンテナ名 -p 8082:80 -p 3306:3306 --privileged 22bb35c58310 /sbin/init vim /etc/nginx/conf.d/default.conf root /home/git/qa_test/public; yum install -y mysql-server これがな…

docker コマンド

コンテナ作成docker run -i -t -d -v /Users/mirei_hayase/git/:/home/git --name qa_test -p 8080:80 -p 3306:3306 --privileged 22bb35c58310 /sbin/init ログインdocker exec -it qa_test /bin/bash

LightsailでWordPressを立ち上げる

https://ferret-plus.com/8127?page=2 「Connect Using SSH」をクリック $ cat bitnami_application_password ドメイン設定など https://shinonono.net/entry/amazon-lightsail-wordpress

LightsailでWordPressを立ち上げる

https://ferret-plus.com/8127?page=2 「Connect Using SSH」をクリック $ cat bitnami_application_password

bitFlyerの過去チャートを取得するAPI

Cryptowatchを使う https://blog.shoby.jp/entry/2017/05/24/093733#f-e6c220ff http://nipper.work/btc/index.php?market=bitFlyer&coin=BTCJPY&periods=86400&after=1420070400

chart.js 役に立ったまとめ

https://blog.imind.jp/entry/2019/07/19/224640 https://blog.imind.jp/entry/2019/07/19/210646

nginx.conf 301 redirect

http://lifehack.skytips.xyz/wp/2016/12/31/post-403/ http://kentayamamoto.github.io/google-index-rewrite/

log 吐き出し

log file_put_contents('/debug.log',__FILE__ . " : " . __LINE__ . " : " . __FUNCTION__ . " : " . json_encode($this->_session).PHP_EOL,FILE_APPEND); file_put_contents('/debug.log',__FILE__ . " : " . __LINE__ . " : " . __FUNCTION__ . " : " . …

s3 ssl 設定

S3 -> cloud front -> ssl cloud front をかます場合、 amcのssl取得のリージョンを東京ではなく、米国にしたらなぜかいけた

RDS 互換性のないネットワーク

AWS KC Videos: How do I avoid and fix an incompatible network state for an RDS DB instance? - YouTube これをなぞったら解決した? VPCの設定の問題 RDSのインスタンスを複製する

AWS お名前 SSL 設定

Route 53でドメインを設定 新規のname server 4つをお名前の「他のネームサーバーを利用」に追加 ロードバランサーの追加 リスナーの追加

AWS お名前 SSL 設定

Route 53でドメインを設定 新規のname server 4つをお名前の「他のネームサーバーを利用」に追加 ロードバランサーの追加

laravel 初期設定404

laravel 404 public/404.html" failed (13: Permission denied) sudo chown -R nginx:nginx /home/ec2-user/ これやってEC2に入れなくなる!! public/50x.html" failed (2: No such file or directory) php artisan key:generate .env): failed to open str…

EC2 RDS 疎通

RDS パブリクに設定 mac local から叩けるのにEC2からたたけない VPC、サブネット、ルートテーブルあたりの問題 ping がたたけないVPCの設定で DNS ホスト名: いいえ にしたら一応いけた 正しい設定ではないけど一応動く

amazon-linux-extras

amazon-linux-extrasの場合は普通にphpを入れると5.4になる。 sudo amazon-linux-extras install epelepel-release-7-11.noarch.rpm sudo yum install https://rpms.remirepo.net/enterprise/remi-release-7.rpmインストール: remi-release.noarch 0:7.5-2.e…

react 入門

yarn inityarn add webpack webpack-dev-server babel-core babel-loader babel-preset-react babel-preset-es2015 start コマンドnode_modules/.bin/webpack-dev-server コンパイルコマンドnode_modules/.bin/webpack 静的解析yarn add eslint eslint-plugi…

ec2 rds 疎通

セキュリティグループ設定合わせる EC2からRDS(MySQL)に接続できない。セキュリティグループの設定について・・・ - Qiita socketのpathをあわせる show variables like '%sock%'; socket | /tmp/mysql.sock vim /etc/my.cnf socket=/tmp/mysql.sock laravel…

php7 memcached install

yum install gcc-c++ -y が必要と気付かず結構はまった ```yum install -y memcachedyum install -y php71-php-pecl-memcached````libmemcached install````yum install gcc-c++ -ycd /usr/local/src/wget https://launchpad.net/libmemcached/1.0/1.0.18/+d…

redis classをベタで書く

redis = new Redis(); if (!$this->redis->connect($hostname, $port)) { throw new Exception('fail connect redis server.'); } } /** * */ public function __destruct() { $this->…

sql order by

SELECT * FROM userswhere prefecture_id = 13and deleted_at is not nullorder by created_at > current_time() desc, created_at != '0000-00-00 00:00:00' asc, created_at asc; created_at > current_time() の結果を0,1 で判断し、desc or asc で並び替…

EC2新規作成 php version

基本はいつもどおり CentOS7+nginx+php7+MariaDBの環境構築 - Qiita これでいけるけど、 なぜかphp のversionが古い yum remove php-* httpd-* AWS EC2 Amazon Linux 2016.09 + nginx + PHP7.0でサーバー構築 - Qiita sudo yum install php70 sudo yum insta…

正規表現メモ ひらがな カタカナ

ひらがな function check_hiragana( $str ) { mb_regex_encoding('UTF-8'); $result = true; if (!preg_match("/^[ぁ-ゞー]+$/u",$str)) { $result = false; } return $result;} カタカナ function check_katakana( $str ) { mb_regex_encoding('UTF-8'); $r…

9/23

尊敬できる先輩起業家を間近で見て悔しかった。 自分がやりたい、作りたいと思う、自分の理想に近い経営を目の前で見せつけられた。 プロダクト、組織づくり、メンバーのキャリア育成、経営哲学、すべてにおいてブレない。 24h仕事のこと考えて楽しそうなの…

9/19

朝目標、todoリストつくったか no事業アイディア思いついたか no ダイエットキュレーション × 何か 考える時間は取れたか yes 事業リサーチしたか no 今日新たに10個海外サービス知れたか 今日のよかったこと 中目のスタバに仮想通貨の本があったから読んで…

SJISにencodeする

ini_set('memory_limit', '512M'); $file_path = '~/Desktop/file_name.csv'; $data = file_get_contents($file_path, true);$sjis_data = mb_convert_encoding($data, "SJIS"); file_put_contents($file_path, $sjis_data);

embulk 環境設定

wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u65-b17/jdk-8u65-linux-x64.rpmyum localinstall jdk-8u40-linux-x64.rpmcurl --create-dirs -o ~/…