おれさまラボ

実際に手を動かして理解を深めるブログ。

新しい Windows PC にインストールしたアプリケーション一覧

はじめに

プライベート用のメイン端末として Syrface Pro 3 をいままで使ってきましたが、画面割ってしまっていることと、電池がへばってきたこともあり、持ち運び用の端末としては使えなくなってしまいました。中古で3万円程度で Panasonic Let's Note CF-NX2 を手にいれたので、乗り換えにあたっての環境整備をまとめておきます。

Atom(Editor)

以下、設定内容や、導入したパッケージについて書きます。

Theme

UI Theme も Syntax Theme も Atom Lite にしました。

Editor Setting

以下の設定にチェックを追加

  • Show indent guide
  • Show invisibles 通常は表示されない制御文字等を表示してくれる。
  • Soft Wrap 長い文を折り返してくれる。

Plugins

  • japanese-menu Menu をすべて日本語化してくれる。
  • document-outline markdownなどのアウトライン表示をしてくれる。
  • markdown-scroll-sync Markdownのプレビュー画面と入力画面をシンクロさせてくれる。
  • markdown-writer Markdown 入力支援。
  • markdown-toc Markdown 文書の目次を自動生成。
  • markdown-preview-enhanced 強力な Markdown プレビュー機能UML の埋め込みも可能。(引用に {piml} をつける。)

Pandoc

Markdown を PDF や Word(docx) に変換するために Pandoc を使用します。インストールはこちらから。

Docker for Windows

インストール

Windows Update で、 Windows10 を最新化します。

コントロールパネル > プログラムと機能 > Windows の機能の有効化または無効化 から Hyper-V を有効にします。

Docker for Windows をダウンロードして、インストールします。

インストール後、サインアウトが必要になりますので、サインアウトします。

Hello world

Docker がきちんと機能するか確認します。

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

PS C:\Users\Naoto> docker version
Client:
 Version:      17.09.1-ce
 API version:  1.32
 Go version:   go1.8.3
 Git commit:   19e2cf6
 Built:        Thu Dec  7 22:22:26 2017
 OS/Arch:      windows/amd64

Server:
 Version:      17.09.1-ce
 API version:  1.32 (minimum version 1.12)
 Go version:   go1.8.3
 Git commit:   19e2cf6
 Built:        Thu Dec  7 22:28:28 2017
 OS/Arch:      linux/amd64
 Experimental: true
PS C:\Users\Naoto>
PS C:\Users\Naoto>
PS C:\Users\Naoto> docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
PS C:\Users\Naoto>
PS C:\Users\Naoto>
PS C:\Users\Naoto> docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
PS C:\Users\Naoto>
PS C:\Users\Naoto>
PS C:\Users\Naoto> docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
ca4f61b1923c: Pull complete
Digest: sha256:445b2fe9afea8b4aa0b2f27fe49dd6ad130dfe7a8fd0832be5de99625dad47cd
Status: Downloaded newer image for hello-world:latest

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (amd64)
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
 https://cloud.docker.com/

For more examples and ideas, visit:
 https://docs.docker.com/engine/userguide/

右クリックメニューから Docker を起動する。

こちら を参考に設定しました。ディレクトリ指定が、() だとうまく行かなかったので {} に変更しました。

パスは以下の通り。(コンピューター\HKEY_CLASSES_ROOT\Directory\Background\shell)

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoExit -command "docker run --rm -it -v ${pwd}:/share skksky/centos:1.0.6 bash"

Docker Cloud に自分好みの Image をおいているので、それを右クリックメニューから簡単に run できます。

ボリュームマウントもしているので、データは Windows 側に永続化されます。

これで、Vagrant 利用時に唯一不満だった起動の遅さといつでも破壊できる手軽さが解消されました。

(追記)Powershell 利用時に日本語が文字化けする事象を直すために chcp 65001 を実行してから docker run するように変更しました。

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoExit -command "chcp 65001; docker run -it -v ${pwd}:/share skksky/centos:1.4.0 bash"

(追記)環境変数bash_profileで変更されなかったので、--loginオプションを追加しました。

あと、レジストリ毎回いじるの面倒なので、latest タグを付けることにしました。docker commitする時に、毎回タグがx.x.xのものとlatestのものをコミットしてます。

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoExit -command "chcp 65001; docker run -it -v ${pwd}:/share skksky/centos:latest bash"

参考:bash - Dockerコンテナにログインしても.bash_profileで設定している環境変数が反映されない - スタック・オーバーフロー

CLI Tools

peco

フィルタリングツールです。バイナリ版を落とせば golang 環境用意しなくて良いので便利。基本的には Docker で起動する Linux 内でしか使ってません。

Anaconda

Python の勉強のために、Anaconda をインストールしました。

Greenshot

スクリーンショットを快適にとることができます。

Google Drive バックアップと同期

ダウンロードページ