2020/02/18~23のメモ

Application Security Management Platform | Sqreen

雑に眺めたので間違ってるかもだけど

  • アプリケーションサーバに対するファイヤウォール
  • エージェント(かな?)をアプリケーションサーバにインストールして、攻撃を検知する
  • 試すのはともかくお値段だいぶ高そうなので、ちゃんと売上の立っていてかつセンシティブなサービスでないと導入が難しそうな雰囲気がある
  • 小さいサービス(3Mリクエスト/月)なら無料で使えるので手持ちのサービスにいれて雰囲気を掴んでみたい

Develop. Preview. Ship. - ZEIT

  • 無料でサーバレス環境使えるのは便利そうではある
  • rubyも使えるっぽい

que-rb/que: A Ruby job queue that uses PostgreSQL's advisory locks for speed and reliability.

  • better delayed_jobっぽい
  • postgres限定
  • postgres のadvisory lockを使っているので速いとのこと

ghq

  • brew upgrade ghqでバージョンアップしたらメジャーバージョンがあがり非互換な変更が入っていた
  • デフォルトのディレクトリが~/.ghqから~/ghqに変更されていた
  • 単純にmv .ghq ghqとして対応

  • yoshiori/fish-peco_select_ghq_repository がうまく動かなくなった

    • そもそも↑でghq配下のリポジトリに移動すると、ghqやfishのプロセスが残ってしまって標準入力を奪っているような挙動を見せることがあってなんとかしたいな、と思ってバージョンアップを始めたのだった
    • が、バージョン上げたらそもそも動かなくなったぞ

fishのお作法がよくわかっていない

fish-peco_select_ghq_repository/peco_select_ghq_repository.fish at master · yoshiori/fish-peco_select_ghq_repository を読みつつ何をやっているのかざっと書く

function peco_select_ghq_repository
  ghq list | peco | read line

  if [ $line ]
    cd (ghq list --full-path --exact $line)
    commandline -f repaint
  end
end

yarn

yarn install --frozen-lockfile

でyarn.lockが更新されないことを保証できる。yarn.lockがpackage.jsonの記述を満たさないときは通常yarn.lockは更新されるのだけど、このオプションではそれを抑制できるっぽい

yarn install | Yarn

webpackerってどうやって最新のnpmがインストールされていることを確認しているんだっけ

NOTE: The command yarn check has been historically buggy and undermaintained and, as such, has been deprecated and will be removed in Yarn 2.0. You should use yarn install --check-files instead.

  • yarn checkは使わないほうがいいらしい。
    • これはyarn check単体の話で、yarn check --integrityyarn check --verify-treeはまた別(つかってもよい)のかな?
      • いろいろ見た感じ、どうも同様っぽいぞ
  • yarn check(使わない)はpackage.jsonとyarn.lockとの整合性を見る
  • yarn check --integrityはpackage.jsonとyarn.lockとの整合性と、yarn.lockのハッシュ値が正しいかを見る
  • yarn check --verify-treeはpackage.jsonnode_modules配下に置いてあるファイルのバージョンとの整合性を見る(yarn.lockは見ない)

  • Remove yarn check by arcanis · Pull Request #106 · yarnpkg/rfcs

It has to do with the way we make an early bailout if the node_modules is already there (to avoid running an installation if there is no need). Without --check-files Yarn will only checks for the various folders to exist (plus various other settings), whereas with --check-files it will also check for all the registered files to exist. It's not super useful anymore, but it's not as redundant as yarn check.

  • yarn install --check-filesはインストール前にnode_modeles配下をちゃんとファイル単位で見る、というのが--check-filesなしとの違いのよう

Add strict_loading mode to optionally prevent lazy loading by eileencodes · Pull Request #37400 · rails/rails

lazy loadingしないぞ!という強い決意を示したいとき(どういうときだろ)に使えそう

Spark