Open12

環境構築系

satory074satory074

Windows

ファイル名を指定して実行を極める

これをやらないとしぬ
https://hiboma.hatenadiary.jp/entry/20070311/1173592731

  1. ショートカットをパス通したフォルダに放り込む
  2. ファイル名を指定して実行で、ファイル名指定して実行

最初に起動するアプリを管理する

[Win] s →スタートアップ
のオン/オフ切り替えで、Windows起動時に勝手に実行されるアプリの切り替え

JISキーボードのMBPに別のUSキーボードを接続して使う。

USキーボードにしなかったのが大後悔。
テンキー付きのMagic Keyboard使ってる。

  1. 検索([Win] s)言語の設定 -> 優先する言語 -> 日本語(「オプション」クリック) -> ハードウェアキーボードレイアウト -> (「レイアウトを変更する」クリック) -> 英語キーボード(101/102キー) -> OK -> 再起動
  2. Power ToysのKeyboard Manager/キーの再マップを行う。
  • Win(Left) -> VK26: 左Windows(command)キーをIME変換キーにする。
  • Win(Right) -> VK22: 右Windows(command)キーをIME無変換キーにする。
  • Caps Lock -> Win(Left): Caps LockキーをWindowsキーにする。
    https://github.com/microsoft/PowerToys/releases/
satory074satory074

Chrome拡張

Vimium

VimっぽくChromeを操作する
「f」の要素選択ができないともう生きていけない
https://chrome.google.com/webstore/detail/vimium/dbepggeogbaibhgnhhndojpepiihcmeb?hl=ja

Dark Reader

Chromeをダークモードにする
見づらいと思ったらそのサイトだけダークモードにしない設定もできる
https://chrome.google.com/webstore/detail/dark-reader/eimadpbcbfnmbkopoojfekhnkhdbieeh

Wikiwand

Wikipediaのレイアウト変更
https://www.wikiwand.com/

satory074satory074

WSL

WSL2が遅い

解決

WSL1の時より5倍くらい早くなって草。
https://amaya382.hatenablog.jp/entry/2019/12/27/120057


BootCampでWSL2に変更できなくて困った。

問題

リンクの手順で↓を実行しても、WSL1からWSL2に変更できなくて困った。

PowerShell
C:\Windows\system32> wsl --set-default-version 2
Windows の仮想マシン プラットフォーム機能を有効にして、BIOS で仮想化が有効になっていることを確認してください。
詳細については、https://aka.ms/wsl2-install を参照してください

https://docs.microsoft.com/ja-jp/windows/wsl/install-win10

解決

再起動。はい。
https://www.nyamucoro.com/entry/2017/10/14/212731


brewを入れる

Bash
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
...
Warning: /home/linuxbrew/.linuxbrew/bin is not in your PATH.
==> Installation successful!

==> Homebrew has enabled anonymous aggregate formulae and cask analytics.
Read the analytics documentation (and how to opt-out) here:
  https://docs.brew.sh/Analytics
No analytics data has been sent yet (or will be during this `install` run).

==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
  https://github.com/Homebrew/brew#donations

==> Next steps:
- Add Homebrew to your PATH in /home/satory074/.profile:
    echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> /home/satory074/.profile
    eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
- Run `brew help` to get started
- Further documentation:
    https://docs.brew.sh
- Install the Homebrew dependencies if you have sudo access:
    sudo apt-get install build-essential
    See https://docs.brew.sh/linux for more information
- We recommend that you install GCC:
    brew install gcc

$ brew doctor

Command 'brew' not found, did you mean:

  command 'qbrew' from deb qbrew (0.4.1-8build1)
  command 'brec' from deb bplay (0.991-10build1)

Try: sudo apt install <deb name>

$ echo 'export PATH="/home/linuxbrew/.linuxbrew/bin:$PATH"' >>  ~/.bashrc
$ source ~/.bashrc

pyenvがBUILD FAILEDになる

  • apt-get update
  • runtimeのintall
Bash
$ brew install pyenv
....
$ pyenv -v
pyenv 1.2.24
$ pyenv install 3.9.2
Downloading Python-3.9.2.tar.xz...
-> https://www.python.org/ftp/python/3.9.2/Python-3.9.2.tar.xz
Installing Python-3.9.2...
python-build: use readline from homebrew

BUILD FAILED (Ubuntu 20.04 using python-build 20180424)

Inspect or clean up the working tree at /tmp/python-build.20210331162918.9640
Results logged to /tmp/python-build.20210331162918.9640.log

Last 10 log lines:
checking for python3.9... python3.9
checking for --enable-universalsdk... no
checking for --with-universal-archs... no
checking MACHDEP... "linux"
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/tmp/python-build.20210331162918.9640/Python-3.9.2':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
$ brew apt-get update
...
$ sudo apt install build-essential
...
$ sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev
...