<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
  <channel>
    <title>Tomofumi Chiba - Leaves</title>
    <link>https://leaves.chiba.dev/users/chiba</link>
    <description>Tomofumi Chiba - Leaves</description>
    <image>
      <url>https://leaves.chiba.dev/favicon.ico</url>
    </image>
    
    <item>
      <title>WSL + Docker 環境の使用領域を縮小する | Tomofumi Chiba - Leaves</title>
      <link>https://leaves.chiba.dev/posts/442</link>
      <pubDate>Wed, 09 Sep 2026 06:52:39 GMT</pubDate>
      <guid>442</guid>
      <description>
### WSL + Docker 環境の使用領域を縮小する

---

#### 確認

##### WSL の仮想ディスクを確認

PowerShell:

```powershell
Get-ChildItem $env:LOCALAPPDATA -Recurse -Filter ext4.vhdx -ErrorAction SilentlyContinue |
Select-Object FullName,Length
```
ext4.vhdx のパスとサイズが確認できる。

##### Docker 使用量を確認

```bash
docker system df
```

#### 一括削除

```bash
$ docker system prune -a --volumes
```

削除対象:

- 停止済みコンテナ
- 未使用イメージ
- 未使用ネットワーク
- 未使用ボリューム
- Build Cache

#### WSL 仮想ディスクを圧縮

##### WSL 停止

PowerShell:

```powershell
PS &gt; wsl --shutdown
```

##### VHDX 圧縮

管理者 PowerShell:

```
PS &gt; diskpart
DISKPART&gt; select vdisk file=&quot;&lt;ext4.vhdx へのパス&gt;&quot;
DISKPART&gt; compact vdisk
DISKPART&gt; exit
```
削除分が確実に C ドライブへ反映される。

---

#### Appendix

##### Docker ボリューム詳細確認

```bash
docker system df -v
```

#### Docker の不要データ削除

##### Build Cache 削除

```bash
docker builder prune -a
```

##### 停止済みコンテナ削除

```bash
docker container prune
```

##### 未使用イメージ削除

```bash
docker image prune -a
```

##### 未使用 Volume 削除

⚠️ データ削除あり

```bash
docker volume prune
```

      </description>
    </item>
    
    <item>
      <title>Markdown ファイルのリンク切れチェック | Tomofumi Chiba - Leaves</title>
      <link>https://leaves.chiba.dev/posts/441</link>
      <pubDate>Tue, 25 Aug 2026 22:13:13 GMT</pubDate>
      <guid>441</guid>
      <description>
#### Markdown ファイルのリンク切れチェック

repository root で実行
```
docker run --init -it --rm -w /input -v $(pwd):/input lycheeverse/lychee --extensions md --root-dir . --accept &quot;200..=299, 401, 403&quot; --max-concurrency 1 .
```

パスをドットで指定すると gitignore された部分はチェック対象から外すらしい

option を lychee.toml にまとめる場合
```
extensions = [&quot;md&quot;]
root_dir = &quot;.&quot;
verbose = &quot;debug&quot;
accept = [&quot;200..=299&quot;, &quot;401&quot;, &quot;403&quot;]
max_concurrency = 1
exclude = [&quot;^https?://localhost&quot;, &quot;^https?://127\\.0\\.0\\.1&quot;]
```

##### 参考
- https://zenn.dev/yamadatt/articles/20250118_dead-link-lychee
- https://lychee.cli.rs/

tag: dead link check

      </description>
    </item>
    
    <item>
      <title>devcontainer CLI | Tomofumi Chiba - Leaves</title>
      <link>https://leaves.chiba.dev/posts/440</link>
      <pubDate>Tue, 14 Jul 2026 13:17:26 GMT</pubDate>
      <guid>440</guid>
      <description>
# devcontainer CLI

## Deno で install
```
deno install -g -RE --allow-sys --allow-run=docker,git -N=containers.dev,ghcr.io,pkg-containers.githubusercontent.com -W=/tmp npm:@devcontainers/cli
```
```
devcontainer up --workspace-folder .
```

```
devcontainer exec bash
```

container 内で vs code を動かしてみる
```plain
code serve-web --host 0.0.0.0 --port 8000 --without-connection-token --accept-server-license-terms --default-folder .
```
      </description>
    </item>
    
    <item>
      <title>devcontainer.vim | Tomofumi Chiba - Leaves</title>
      <link>https://leaves.chiba.dev/posts/439</link>
      <pubDate>Mon, 13 Jul 2026 21:08:12 GMT</pubDate>
      <guid>439</guid>
      <description>
# devcontainer.vim
## Install
```
cd ~/.local/bin
wget https://github.com/mikoto2000/devcontainer.vim/releases/download/v4.0.1/devcontainer.vim-linux-amd64
mv devcontainer.vim-linux-amd64 devcontainer.vim
chmod 700 devcontainer.vim
```

```
devcontainer.vim --nvim start .
```
      </description>
    </item>
    
    <item>
      <title>AstroNvim | Tomofumi Chiba - Leaves</title>
      <link>https://leaves.chiba.dev/posts/438</link>
      <pubDate>Sun, 12 Jul 2026 07:42:39 GMT</pubDate>
      <guid>438</guid>
      <description>
# AstroNvim
## NeoVim
```
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.tar.gz
sudo rm -rf /opt/nvim-linux-x86_64
sudo tar -C /opt -xzf nvim-linux-x86_64.tar.gz
```
```
export PATH=&quot;$PATH:/opt/nvim-linux-x86_64/bin&quot;
```

## 絵文字アイコンが文字化け
Windows にフォント JetBrainsMono Nerd Font `JetBrainsMonoNerdFont-*.ttf` をまとめてインストール
https://www.nerdfonts.com/font-downloads

## Windows のクリップボードにテキストをコピーするには
Shift 押しながらカーソルでテキスト選択。Control + C
マウスイベントが neovim に取られているので素の vim と違う

## Plugin のインストール
```
vi ~/.config/nvim/lua/community.lua
```
以下の行を削除。ファイルが有効になる。
```
if true then return {} end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE
```
必要な Plugin を追記する
```
return {
  &quot;AstroNvim/astrocommunity&quot;,
  { import = &quot;astrocommunity.pack.lua&quot; },
  { import = &quot;astrocommunity.pack.typescript&quot; },
  { import = &quot;astrocommunity.pack.java&quot; },
  { import = &quot;astrocommunity.pack.spring-boot&quot; },
  -- import/override with your plugins folder
}
```
nvim を再起動

## TypeScript の LSP のインストール（これはたぶん不要）
`:mason` から `vtsls` を選択し `i`

## Terminal が bash で起動しない
```
vi ~/.config/nvim/init.lua
```
以下を追加する。
```
vim.opt.shell = &quot;/bin/bash&quot;
```

## 操作
### 開いているファイルをフィルターして選択
space - fb
### buffer の切り替え
`[b` or `]b`

## vim
### terminal の入力モードから通常モードへの切り替え
`&lt;C-\&gt;&lt;C-n&gt;`

## coding
* `space la` で code action。 import 挿入とか
      </description>
    </item>
    
  </channel>
</rss>