今週のまとめ(8/31)

技術

Vue.js v-tokyo Meetup #11

まちにまった Vue.js 3 @kazu_pon

speakerdeck.com

viteではじめる Vue3 + TypeScript @yuneco

docs.google.com

Vue.js with TSX - From Vue 2.x to Vue 3 @potato4d

speakerdeck.com

Vue 3

あ、あとで……よむ……

Vue 3: mid 2020 status update

github.com

Migration to Vue 3 Guide

github.com

Googleサービス大規模障害の原因と対策

トラフィックが増えてきて、詰まりはじめると一気にダメになるやつ……

別のGoogleサービスからのトラフィックの増加により、BLOBメタデータサービスの過負荷が始まって待ち時間が発生し、操作が過度に再試行されたことでリソースが使い果たされた。失敗したリクエストをキャンセルして再試行しようとすることで事態は悪化し、トラフィックがさらに増加した。

www.itmedia.co.jp

チーム

qiita.com

ローカライズ

ハンコ文化は滅ぼさねばならん

その他

ゲーム

徳を積んでいないと事前予約出来ない仕組み、良い転売対策と思う

登録するPSN IDのこれまでの行い、「プレイステーション アクティビティ」に応じて決めるとの回答。具体的にどんな「アクティビティ」が関連するのかは分かりませんが、過去に実在のプレーヤーとして登録や購入などの行動が確認できたかでフィルターする趣旨と思われます。要するにPSに功徳を積んできたかどうか。

japanese.engadget.com

まめち

キャンプ

スイーツ

今週のまとめ(8/24)

技術

認証機能を自作するのは大変だから IDaaS 使おうぜという話

mizchi.dev

徳丸さんもTwitterで言及しているが、認証機能を自作するべきではない

開発中の案件でも使っている、実装がかなり楽
「firebaseui の日本語化が面倒」とブコメしたら Twitter で「使わないほうが楽」と mizchi さんからコメント貰った(あとで試す

なお、Auth0 は高い
https://auth0.com/pricing/

「localStorageにはセッション用のトークンは保存するな」という主張はあまり気にしなくて良いよという話

qiita.com

Bonfire Frontend #6

Y!MAPがリニューアル版をベータリリースしてたの知らなかった……
構成は React + Redux + express + TypeScript

www.slideshare.net

最近よく聞く Core Web Vitals の話

www.slideshare.net

ローディング画面のお知らせ機能はとても良い、ゲームでよく見るやつだ

www.slideshare.net

速度改善の話
IaaS から CaaS への移行、速度改善とは別の取り組みのはずなので 600ms 早くなっている

www.slideshare.net

Core Web Vitals

とりあえず、この辺りを見ておく

web.dev
youtu.be

TypeScript

TypeScript 4.0

devblogs.microsoft.com

Generics の使いどころについて

effectivetypescript.com

とりあえず、これだけ覚えておく

Rule: If a type parameter only appears in one location, strongly reconsider if you actually need it.

CSS

Tailwind.css

uit-inside.linecorp.com

こちらも開発中の案件で使っている
機能的なクラスを割り当ててコンポーネントのスタイルを決められて便利

PurgeCSS との組み合わせで軽量化されるので良い
(個別のコンポーネントにスタイルを書くやり方の場合、CSSが肥大化しがち)

`tailwind.config.js` を設定することでカスタマイズが容易なのもオススメのポイント

https://tailwindcss.com/docs/configuration

CPUの動作原理を僕はまだ知らない

amane-uehara.github.io

今週のQii活

qiita.com

その他

ゲーム

旅行

料理

スイーツ

FuelPHP on heroku

下ごしらえ

create fuelphp project

$ oil create heroku-fuelphp
$ cd heroku-fuelphp/
$ rm -fr .git . gitmodules
$ rm *.md
$ rm -fr docs/

自分の環境(MacOS 10.8.1/git version 1.7.8.4)だと

Adding existing repo at 'fuel/core' to the index

とか言われてsubmodule add出来ないので予め削除

$ rm -fr fuel/core/
$ rm -fr fuel/packages/auth/
$ rm -fr fuel/packages/email/
$ rm -fr fuel/packages/oil/
$ rm -fr fuel/packages/orm/
$ rm -fr fuel/packages/parser/

git init & submodule add

$ git init
$ git submodule add git://github.com/fuel/core.git fuel/core
$ git submodule add git://github.com/fuel/auth.git fuel/packages/auth
$ git submodule add git://github.com/fuel/email.git fuel/packages/email
$ git submodule add git://github.com/fuel/oil.git fuel/packages/oil
$ git submodule add git://github.com/fuel/orm.git fuel/packages/orm
$ git submodule add git://github.com/fuel/parser.git fuel/packages/parser

git submodule checkout & pull

$ git add .
$ git submodule foreach git checkout 1.3/master
$ git submodule foreach git pull origin 1.3/master
$ git status
#	modified:   fuel/core (new commits)
#	modified:   fuel/packages/orm (new commits)
$ git add fuel/core      
$ git commit -m 'init'                            

heroku create

$ heroku create --buildpack https://github.com/winglian/heroku-buildpack-php -s cedar
Creating serene-dusk-4028... done, stack is cedar
BUILDPACK_URL=https://github.com/winglian/heroku-buildpack-php
http://serene-dusk-4028.herokuapp.com/ | git@heroku.com:serene-dusk-4028.git
Git remote heroku added

git push

$ git push heroku master 
Counting objects: 54, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (46/46), done.
Writing objects: 100% (54/54), 99.37 KiB, done.
Total 54 (delta 3), reused 0 (delta 0)

-----> Heroku receiving push
-----> Git submodules detected, installing
       Submodule 'fuel/core' (git://github.com/fuel/core.git) registered for path 'fuel/core'
       Submodule 'fuel/packages/auth' (git://github.com/fuel/auth.git) registered for path 'fuel/packages/auth'
       Submodule 'fuel/packages/email' (git://github.com/fuel/email.git) registered for path 'fuel/packages/email'
       Submodule 'fuel/packages/oil' (git://github.com/fuel/oil.git) registered for path 'fuel/packages/oil'
       Submodule 'fuel/packages/orm' (git://github.com/fuel/orm.git) registered for path 'fuel/packages/orm'
       Submodule 'fuel/packages/parser' (git://github.com/fuel/parser.git) registered for path 'fuel/packages/parser'
       Initialized empty Git repository in /tmp/build_owc6gc2lo4pn/fuel/core/.git/
       Submodule path 'fuel/core': checked out '61ef4c098485035f4d625d87238e4d408dfa59e5'
       Initialized empty Git repository in /tmp/build_owc6gc2lo4pn/fuel/packages/auth/.git/
       Submodule path 'fuel/packages/auth': checked out 'd5c78ff7e3b1698334747587505d79baf59a3158'
       Initialized empty Git repository in /tmp/build_owc6gc2lo4pn/fuel/packages/email/.git/
       Submodule path 'fuel/packages/email': checked out '6a38100229aa02c905d143c200a0dac5184a174e'
       Initialized empty Git repository in /tmp/build_owc6gc2lo4pn/fuel/packages/oil/.git/
       Submodule path 'fuel/packages/oil': checked out 'e0947076c4058104f92d8465ccb82d2ac93f6b72'
       Initialized empty Git repository in /tmp/build_owc6gc2lo4pn/fuel/packages/orm/.git/
       Submodule path 'fuel/packages/orm': checked out '42a37ce5d639bc6485b907764280dca3285a2bf9'
       Initialized empty Git repository in /tmp/build_owc6gc2lo4pn/fuel/packages/parser/.git/
       Submodule path 'fuel/packages/parser': checked out 'f85eafe3ed198bf51feb7c3c1c7116aa3a77ea24'
-----> Fetching custom buildpack... cloning with git...done
 !     Heroku push rejected, no Cedar-supported app detected

To git@heroku.com:serene-dusk-4028.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:serene-dusk-4028.git'

index.phpがないとリジェクトされるらしいので作る

$ touch index.php
$ git add index.php 
$ git commit -m 'add index.php'
[master 73128cb] add index.php
 0 files changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 index.php

/Users/khirose/workspace/heroku-fuelphp% touch index.php
/Users/khirose/workspace/heroku-fuelphp% git add index.php 
/Users/khirose/workspace/heroku-fuelphp% git commit -m 'add index.php'
[master 73128cb] add index.php
 0 files changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 index.php
$ git push heroku master     
Counting objects: 56, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (48/48), done.
Writing objects: 100% (56/56), 99.57 KiB, done.
Total 56 (delta 4), reused 0 (delta 0)

-----> Heroku receiving push
-----> Git submodules detected, installing
       Submodule 'fuel/core' (git://github.com/fuel/core.git) registered for path 'fuel/core'
       Submodule 'fuel/packages/auth' (git://github.com/fuel/auth.git) registered for path 'fuel/packages/auth'
       Submodule 'fuel/packages/email' (git://github.com/fuel/email.git) registered for path 'fuel/packages/email'
       Submodule 'fuel/packages/oil' (git://github.com/fuel/oil.git) registered for path 'fuel/packages/oil'
       Submodule 'fuel/packages/orm' (git://github.com/fuel/orm.git) registered for path 'fuel/packages/orm'
       Submodule 'fuel/packages/parser' (git://github.com/fuel/parser.git) registered for path 'fuel/packages/parser'
       Initialized empty Git repository in /tmp/build_3so3ldgotzkpp/fuel/core/.git/
       Submodule path 'fuel/core': checked out '61ef4c098485035f4d625d87238e4d408dfa59e5'
       Initialized empty Git repository in /tmp/build_3so3ldgotzkpp/fuel/packages/auth/.git/
       Submodule path 'fuel/packages/auth': checked out 'd5c78ff7e3b1698334747587505d79baf59a3158'
       Initialized empty Git repository in /tmp/build_3so3ldgotzkpp/fuel/packages/email/.git/
       Submodule path 'fuel/packages/email': checked out '6a38100229aa02c905d143c200a0dac5184a174e'
       Initialized empty Git repository in /tmp/build_3so3ldgotzkpp/fuel/packages/oil/.git/
       Submodule path 'fuel/packages/oil': checked out 'e0947076c4058104f92d8465ccb82d2ac93f6b72'
       Initialized empty Git repository in /tmp/build_3so3ldgotzkpp/fuel/packages/orm/.git/
       Submodule path 'fuel/packages/orm': checked out '42a37ce5d639bc6485b907764280dca3285a2bf9'
       Initialized empty Git repository in /tmp/build_3so3ldgotzkpp/fuel/packages/parser/.git/
       Submodule path 'fuel/packages/parser': checked out 'f85eafe3ed198bf51feb7c3c1c7116aa3a77ea24'
-----> Fetching custom buildpack... cloning with git...done
-----> PHP app detected
-----> Bundling Apache 2.2.22/PHP 5.3.10 build
Creating Slug Identifier file with id: 11eb980091f29e7be8abbe03604ff2ac
-----> Discovering process types
       Procfile declares types -> (none)
       Default types for PHP   -> web
-----> Compiled slug size is 18.4MB
-----> Launching... done, v4
       http://serene-dusk-4028.herokuapp.com deployed to Heroku

To git@heroku.com:serene-dusk-4028.git
 * [new branch]      master -> master

成功したっぽい

$ heroku open

http://serene-dusk-4028.herokuapp.com/public/

参考:
http://d.hatena.ne.jp/Kenji_s/20111202/1322783183
http://d.hatena.ne.jp/hnw/20120603
http://dqn.sakusakutto.jp/2012/04/heroku_push_rejected_no_cedar-.html

brew install mongo

% sudo brew install mongo                                   

Password:

==> Downloading http://fastdl.mongodb.org/osx/mongodb-osx-x86_64-1.6.5.tgz

######################################################################## 100.0%

==> Caveats

If this is your first install, automatically load on login with:

    cp /usr/local/Cellar/mongodb/1.6.5-x86_64/org.mongodb.mongod.plist ~/Library/LaunchAgents

    launchctl load -w ~/Library/LaunchAgents/org.mongodb.mongod.plist

 

If this is an upgrade and you already have the org.mongodb.mongod.plist loaded:

    launchctl unload -w ~/Library/LaunchAgents/org.mongodb.mongod.plist

    cp /usr/local/Cellar/mongodb/1.6.5-x86_64/org.mongodb.mongod.plist ~/Library/LaunchAgents

    launchctl load -w ~/Library/LaunchAgents/org.mongodb.mongod.plist

 

Or start it manually:

    mongod run --config /usr/local/Cellar/mongodb/1.6.5-x86_64/mongod.conf

==> Summary

/usr/local/Cellar/mongodb/1.6.5-x86_64: 16 files, 83M, built in 2 seconds