nodebrewのinstallで"Failure writing output to destination"が出た時の対応
結論
~/.nodebrew/src
が必要だった
手順
#このようなエラーが出ます > nodebrew install-binary latest Fetching: https://nodejs.org/dist/v17.9.0/node-v17.9.0-darwin-arm64.tar.gz Warning: Failed to create the file Warning: /Users/azimicat/.nodebrew/src/v17.9.0/node-v17.9.0-darwin-arm64.tar.gz Warning: : No such file or directory 0.0%curl: (23) Failure writing output to destination download failed: https://nodejs.org/dist/v17.9.0/node-v17.9.0-darwin-arm64.tar.gz
#件のディレクトリを作る > mkdir -p ~/.nodebrew/src
#うまく行きます > nodebrew install-binary latest Fetching: https://nodejs.org/dist/v17.9.0/node-v17.9.0-darwin-arm64.tar.gz ###################################################################################################################################################################################### 100.0% Installed successfully
github pagesでカスタムドメインがpublishの度に外れて困っていたのをなおしたやつ
状況
github workfrowsを利用して別のbranchにpushすると、github Pagesのカスタムドメインが外れてしまっていた。
環境
- ビルドコンテンツは
docs
下に出力するようにしている - publishDirは
./docs
を指定している - CNAMEファイルは
./CNAME
にあり、ビルド対象でないためdocs
下には出力されない
原因
- たとえ過去に
./docs
下へCNAMEファイルを追加していても、force pushしているのでビルド時に上書かれて消えてしまっていた
対処
jobs: Build: - name: Generate pages run: | hugo -D #ここでビルド cp ./CNAME ./docs #CNAMEファイルをコピー - name: Deploy gh-pages uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./docs publish_branch: gh-pages
【vba】DictionaryのkeyがVariant型だとStringでは呼び出せない
A | B | C | |
---|---|---|---|
1 | ねこ | いぬ | うさぎ |
2 | にゃー | わん | きっ |
3 | たま | ぽち | うさ |
Sub sample1() Dim dic1 As dictionary Set dic1 = New dictionary Dim dic2 As dictionary Set dic2 = New dictionary For Each Item In Sheets(1).Range("A1:C1") Call dic1.Add(Item, "★_" & Item) Call dic2.Add(CStr(Item), "★_" & Item) Next Item Debug.Print "dic1: " & dic1.Item("ねこ") '=> dic1: Debug.Print "dic2: " & dic2.Item("ねこ") '=> dic2: ★_ねこ End Sub
格納するときは必ずキャストしよう。