Ubuntu で phpenv を用いて PHP をビルドする際に必要なライブラリをインストールする

結論

$ sudo apt install -y libjpeg-dev libonig-dev libzip-dev libcurl4-openssl-dev re2c libxml2-dev libtidy-dev libxslt-dev libmcrypt-dev libreadline-dev autoconf

補足

  • もっと必要なものがあるかもしれません*1
  • phpenv に限った話ではなく、一般的に PHP をビルドする際の話でもあります
  • rbenv などと違い、オフィシャルのドキュメントが見つかりませんでした*2
  • トライアンドエラーで一つずつライブラリを入れていくと平気で 1時間 ぐらい溶けていくので*3、参考にしていただければ幸いです

*1:build-essential とか

*2:検索力不足かもしれません

*3:PHP のビルドには結構な時間がかかる

VS Code の「GitHub Pull Requests and IssuesPreview」拡張機能において複数アカウントを使い分ける方法

「GitHub Pull Requests and IssuesPreview」とは

こちらです。

marketplace.visualstudio.com

結論

現時点(2021/01/04 時点)では、ありません*1

関連Issue

github.com

補足

別のアカウントを使う度に「ログアウト」「ログイン」を繰り返せば、複数アカウントを用いることはできます。しかし、この方法は本質的ではないですし、事故を起こす可能性が高いと思います。

*1:後述の方法で擬似的に使い分ける方法はあります

Windows Terminal でウィンドウを透過させるための設定ファイルへの記述方法

結論

設定ファイルの profiles 配下の defaults または list 配下の内容に "useAcrylic": true"acrylicOpacity": 0.7 を追加する。

具体例

例えば、Ubuntu 20.04 のウィンドウに対して、透過度を 0.5 とするように設定します。そのときの設定ファイルの内容は次のとおりです。

// This file was initially generated by Windows Terminal 1.4.3243.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.

(中略)

{
    (中略)

    // A profile specifies a command to execute paired with information about how it should look and feel.
    // Each one of them will appear in the 'New Tab' dropdown,
    //   and can be invoked from the commandline with `wt.exe -p xxx`
    // To learn more about profiles, visit https://aka.ms/terminal-profile-settings
    "profiles":
    {
        "defaults":
        {
        },
        "list":
        [
            {
                (中略)

                "useAcrylic": true,
                "acrylicOpacity": 0.5

                (中略)
            },
    (後略)

全ての list 内の環境に対しても適用したい場合は、list 内の要素に対してではなく、defaults の方に書きます。

参考

公式ドキュメントに詳しく書いてあります*1

docs.microsoft.com

*1:というか、ここに全て書いてあります

Windows Terminal でコマンドパレットをショートカットキーで出すようにする方法

結論

設定ファイル*1の、actions というディレクティブ内*2に、起動するためのキー割り当てを記載します。

具体例

例えば、ctrl+shift+p で起動する場合には、設定ファイル以下のように書きます(追記します)。

// This file was initially generated by Windows Terminal 1.4.3243.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.

(中略)

    // Add custom actions and keybindings to this array.
    // To unbind a key combination from your defaults.json, set the command to "unbound".
    // To learn more about actions and keybindings, visit https://aka.ms/terminal-keybindings
    "actions":
    [
        (中略)

        { "command": "commandPalette", "keys": "ctrl+shift+p" }
    ]
}

補足

公式ドキュメント や一部の解説記事を見ても、「{ "command": "commandPalette", "keys": "ctrl+shift+p" } という内容を設定ファイルに追加しろ」と書いてあるだけなので混乱しました。

コマンドパレットを起動した状態の画面

gyazo.com

*1:Windows Terminal のメニューから「設定」を選んで編集できる settings.json

*2:JSON的には「キー」

Powered by はてなブログ