Open20

いろいろ

ピン留めされたアイテム
acomaguacomagu

ここに書かれたことはそのうちどこかに移動される

acomaguacomagu

CDK でなぜ以下がアンチパターンとされるのか

    super(scope, id, {
      env: {
        account: process.env.CDK_DEFAULT_ACCOUNT,
        region: process.env.CDK_DEFAULT_REGION,
      },
    });

https://docs.aws.amazon.com/cdk/latest/guide/environments.html

When you pass in your environment using CDK_DEFAULT_ACCOUNT and CDK_DEFAULT_REGION, the stack will be deployed in the account and Region determined by the AWS CDK CLI at the time of synthesis. This allows environment-dependent code to work, but it also means that the synthesized template could be different based on the machine, user, or session under which it is synthesized. This behavior is often acceptable or even desirable during development, but it would probably be an anti-pattern for production use.

まあ別にいい気がする(CI で使う AWS ロールは決定的だろうし)。気になるならその下に書いてある CDK_DEPLOY_ACCOUNT とかを受け取っても良さそう。

acomaguacomagu

AWS の aws-elasticbeanstalk-ec2-role Role もしくは InstanceProfile ははじめて Beanstalk にアプリケーションを(コンソールもしくは ebcli から)デプロイしたときに作成されるらしい

なのでこれを参照した CFN スタックとかを作りたての AWS アカウントとかでデプロイしようとすると死ぬ

acomaguacomagu

npm で依存の依存のバージョンを変える方法

基本的にはこれ

https://stackoverflow.com/a/48524488

node_modules はガチで消さないとだめ

あと requires 内の指定消すってあるけど今回は消しても復活した

acomaguacomagu

AWS、なんか Role 作ってしばらくは The AWS Access Key Id you provided does not exist in our records. とか The security token included in the request is invalid own. とか言われる説ない?

時間経ったら解決したんだけど(30分くらい?)

acomaguacomagu

GeoJSON で Feature があるのはどうやら properties フィールドのためだけっぽい、多分

A Feature is an object with a geometry and additional properties.

http://wiki.geojson.org/GeoJSON_draft_version_6#Feature

GeometryCollection というのもあり、FeatureCollection とどっちを使っても良さそうだけど properties を含む Feature のリストというほうが利用頻度が高く定着しているのでは?

一応 Feature の説明は仕様では以下のように書かれている

A Feature object represents a spatially bounded thing.

https://tools.ietf.org/html/rfc7946#section-3.2

acomaguacomagu

NeoVim で LSP を再起動するには

:lua vim.lsp.stop_client(vim.lsp.get_active_clients())

そして :e

OrganizeImports 機能を使うには

:lua vim.lsp.buf.code_action({ diagnostics = vim.lsp.diagnostic.get_line_diagnostics(), only = {  'source.organizeImports' } })
acomaguacomagu

Arch で MariaDB Server が起動しない時

[ERROR] Could not open mysql.plugin table: "Table 'mysql.plugin' doesn't exist". Some plugins may be not loaded
[ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist
[Note] Server socket created on IP: '::'.
[ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.db' doesn't exist
[ERROR] Aborting

これ

sudo mysql_install_db --user=mysql --ldata=/var/lib/mysql/

https://bbs.archlinux.org/viewtopic.php?id=137365

acomaguacomagu

ふたつの span の親要素が li か span かによって、それらの baseline が揃う(?)かどうかが変わる例を見た

A

<li>
  <span>...</span>
  <span>...</span>
</li>

B

<li>
  <span>
    <span>...</span>
    <span>...</span>
  </span>
</li>

遠目で見ても結構違う(自分は B のほうが自然、揃っていると思う)

あと距離も変わってるし...(どちらも 2 つめの span に margin: 0 16px)

なぜこんなことが起こる?


あー空白の件はなんかスペースがあるかないかっぽい...?

B の書き方をした時だけ DevTool に"空白"の表記があり、ちょっと横幅取ってる