ようへいの日々精進XP

よかろうもん

2021 年 02 月 02 日 (火)

アクティビティ (今までの走行 (歩行) 距離)

https://pixe.la/v1/users/inokappa/graphs/fitbit-activity

Fitibit Charge2 のアクティビティから走行 (歩行) 距離を Fitbit Web API で取得して Pixela で草生やしている。色が濃くなれば濃くなる程強度が高い (歩行、走行距離が長い) ということで。実装の詳細はこちら

ジョギング

腰の痛みが続いているけど、エアロバイク 40min (負荷 8)

まだまだ腰が痛くて、終日、立って仕事をしていた。

読書

今日も読む時間を作れなかった。

レアジョブ

明日の 19 時に予約を入れた。

夕飯

Lighthouse CI Server の Basic 認証設定

サーバー起動時に、以下のようにコマンドライン引数として渡す方法。

$ $(npm bin)/lhci server --basicAuth.username=myusername --basicAuth.password=mypassword

lighthouserc.json に設定する方法は以下の通り。

{
  "ci": {
    "server": {
      "port": 9001,

... snip ...

      "basicAuth": {
        "username": "myusername",
        "password": "mypassword"
      }
    }
  }
}

Lighthouse CI CLI (クライアント) での指定は以下の通り。

$ $(npm bin)lhci autorun \
  --upload.basicAuth.username=myusername --upload.basicAuth.password=mypassword

ちなみに、$(npm bin) を指定しているのは、npm install -g でインストールしたコマンドのパスを返してくれる。

$ npm help bin

NAME
       npm-bin - Display npm bin folder

   Synopsis
         npm bin [-g|--global]

   Description
       Print the folder where npm will install executables.

... snip ..

なるほど。

Docker Registry API で Docker イメージの更新情報を取得したい

docs.docker.com

例えば、指定した Docker イメージのタグ名と最終更新日を取得したい場合。

$ curl -s "https://hub.docker.com/v2/repositories/patrickhulce/lhci-server/tags" | jq -r '.results[]|[.name, .last_updated]|@sh'
'latest' '2020-11-12T03:32:12.396879Z'
'0.6.1' '2020-11-12T03:32:10.00785Z'
'0.6.0' '2020-10-29T16:43:19.567753Z'
'0.5.1' '2020-10-20T21:38:33.319676Z'
'0.5.0' '2020-08-21T14:41:54.616743Z'
'0.4.4' '2020-08-04T17:37:52.936931Z'
'0.4.3' '2020-07-20T19:48:45.244419Z'
'0.4.2' '2020-06-26T15:26:06.097611Z'
'0.4.1' '2020-05-30T01:21:47.235762Z'
'0.4.0' '2020-05-21T22:35:08.532656Z'

こんな感じ。

awspec で (2)

昨日、書いた、以下の issue について。

github.com

awspec が利用している rspec-its が影響しているかも... というところまでは解った。

github.com

ドットで区切られていると、ドットでスプリットして個別の attribute としてテストが動くようだ。

これを解決するには、どのようなアプローチが良いのだろうか。