跳至主要内容

Setup: 開發環境建構

· 閱讀時間約 5 分鐘

過去重灌電腦最麻煩的就是還原設定檔, 雖然 Mac 有 TimeMachine 可無痛轉移, 但個人癖好還是喜歡重新檢視與安裝設定. 但越來越多軟體可以把配置設定存在雲端, 不但保持多台電腦間的同步, 重灌也只需登入帳號就可還原配置, 個人以為比 TimeMachine 方便.

但仍有些開發或 CLI 工具, 是將配置檔存放於家目錄下的隱藏檔 (.files), 無法透過雲端同步. 我是把這些檔案搬移到 Dropbox 資料夾下, 再建立 Symbolic Link, 如此就可透過 Dropbox 來同步設定檔.

現在重灌電腦要安裝設定環境, 僅需透過 shell script 安裝軟體與建立 Symbolic Link, 相當無痛.

CLI Environment

iTerm2

brew install iterm2

zsh and oh-my-zsh

macOS Mojave (10.14.x) 開始內建 zsh, 而 Catalina (10.15.x) 以後預設 Shell 改為 zsh.

在 macOS Mojave 系統要把預設 shell 改為 zsh 以及配置 zsh 最方便也推薦的方式就是透過 Oh My Zsh

Oh My Zsh

macOS Mojave 以後已經內建 Zsh, 所以直接安裝 Oh My Zsh 即可.

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
brew install zsh-completion

Powerline Font

brew install font-fira-code-nerd-font font-fira-code font-fira-mono font-fira-sans
brew install font-source-code-pro
brew install font-hack-nerd-font

Base Environment

Docker runtime

  1. OrbStack Personal, non-commercial use
  2. Docker Desktop Personal, non-commercial use
  3. [[Docker CLI on macOS]]

Brew formulae

brew install git tig gitui git-delta zsh-completion tmux ncdu htop lesspipe sshtrix tldr diff-so-fancy fd ripgrep rclone thefuck ag svn moreutils asdf ansifilter fzf

See Also: [[Awesome CLI]]

Program Language

Node.js

Node.js

Installing Node.js or io.js with nvm

NVM Manual install

git clone https://github.com/creationix/nvm.git ~/.nvm && cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`
cat ". ~/.nvm/nvm.sh" >> .bashrc

Install node.js

nvm install v8.11.1
nvm alias default tls
nvm use default

Go

brew install go

IDE & GUI Tools

VSCode

brew install --cask visual-studio-code

GoLand

brew install --cask goland

WebStorm

brew install --cask webstorm

Others

Fork

Fork - a fast and friendly git client for Mac

brew install fork

Bruno

The Collaboration Platform for API Development.

brew install bruno

See Also: [[Postman Alternative]]

Sequel Pro

Sequel Pro is a fast, easy-to-use Mac database management application for working with MySQL databases.

brew install sequel-pro

TablePlus

Modern, Native Tool for Database Management.

brew install tableplus

Redis Desktop Manager

Redis GUI management tool for Windows, Mac OS X, Ubuntu and Debian.

brew install --cask another-redis-desktop-manager

Robo3T

Robo 3T. Free, open-source MongoDB GUI

brew install tableplus

See Also

遺珠

以下是曾為個人熱愛, 但因故越來越少用的軟體. 暫列於此...

Reference

Zsh

iTerm2 + Oh My Zsh

WebStorm

Mac Dev

Setup: 開發環境建構

· 閱讀時間約 5 分鐘

過去重灌電腦最麻煩的就是還原設定檔, 雖然 Mac 有 TimeMachine 可無痛轉移, 但個人癖好還是喜歡重新檢視與安裝設定. 但越來越多軟體可以把配置設定存在雲端, 不但保持多台電腦間的同步, 重灌也只需登入帳號就可還原配置, 個人以為比 TimeMachine 方便.

但仍有些開發或 CLI 工具, 是將配置檔存放於家目錄下的隱藏檔 (.files), 無法透過雲端同步. 我是把這些檔案搬移到 Dropbox 資料夾下, 再建立 Symbolic Link, 如此就可透過 Dropbox 來同步設定檔.

現在重灌電腦要安裝設定環境, 僅需透過 shell script 安裝軟體與建立 Symbolic Link, 相當無痛.

CLI Environment

iTerm2

brew install iterm2

zsh and oh-my-zsh

macOS Mojave (10.14.x) 開始內建 zsh, 而 Catalina (10.15.x) 以後預設 Shell 改為 zsh.

在 macOS Mojave 系統要把預設 shell 改為 zsh 以及配置 zsh 最方便也推薦的方式就是透過 Oh My Zsh

Oh My Zsh

macOS Mojave 以後已經內建 Zsh, 所以直接安裝 Oh My Zsh 即可.

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
brew install zsh-completion

Powerline Font

brew install font-fira-code-nerd-font font-fira-code font-fira-mono font-fira-sans
brew install font-source-code-pro
brew install font-hack-nerd-font

Base Environment

Docker runtime

  1. OrbStack Personal, non-commercial use
  2. Docker Desktop Personal, non-commercial use
  3. [[Docker CLI on macOS]]

Brew formulae

brew install git tig gitui git-delta zsh-completion tmux ncdu htop lesspipe sshtrix tldr diff-so-fancy fd ripgrep rclone thefuck ag svn moreutils asdf ansifilter fzf

See Also: [[Awesome CLI]]

Program Language

Node.js

Node.js

Installing Node.js or io.js with nvm

NVM Manual install

git clone https://github.com/creationix/nvm.git ~/.nvm && cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`
cat ". ~/.nvm/nvm.sh" >> .bashrc

Install node.js

nvm install v8.11.1
nvm alias default tls
nvm use default

Go

brew install go

IDE & GUI Tools

VSCode

brew install --cask visual-studio-code

GoLand

brew install --cask goland

WebStorm

brew install --cask webstorm

Others

Fork

Fork - a fast and friendly git client for Mac

brew install fork

Bruno

The Collaboration Platform for API Development.

brew install bruno

See Also: [[Postman Alternative]]

Sequel Pro

Sequel Pro is a fast, easy-to-use Mac database management application for working with MySQL databases.

brew install sequel-pro

TablePlus

Modern, Native Tool for Database Management.

brew install tableplus

Redis Desktop Manager

Redis GUI management tool for Windows, Mac OS X, Ubuntu and Debian.

brew install --cask another-redis-desktop-manager

Robo3T

Robo 3T. Free, open-source MongoDB GUI

brew install tableplus

See Also

遺珠

以下是曾為個人熱愛, 但因故越來越少用的軟體. 暫列於此...

Reference

Zsh

iTerm2 + Oh My Zsh

WebStorm

Mac Dev

Yet Another Macbook

· 閱讀時間約 1 分鐘
kywk
Site Maintainer

紀錄新購入 Macbook Air 安裝設定流程.

  1. Homebrew, 所有軟體第一步
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  2. Dropbox, 安裝 maestral, 等候同步完成
    brew install maestral
  3. terminal/console 設定
    • 本步驟所有軟體與
      brew install iterm2 fzf
      brew install font-fira-code-nerd-font font-fira-code font-fira-mono font-fira-sans
      brew install font-source-code-pro
      brew install font-hack-nerd-font
    • 打開 iTerm2, 匯入設定與色卡後重啟, 進行 Shell 設定
      ln -sfF Dropbox/config/dotfiles .files
      ln -sfF .files/zsh/mac.zshrc .zshrc
      ln -sfF .files/zsh/mac.zprofile .zprofile
      mkdir .local
      touch .local/develop.sh
      touch .local/local.sh
    • 重開 iTerm2, 自動進行 zinit 相關套件下載與 p10k config
  4. Mac 環境設定
    • Safari / Dock / Hot corners
  5. 其他軟體安裝與設定

Ref: Setup: App 安裝紀錄 | kywk.me

Those Lazy, Hazy, Crazy Days Of Summer

· 閱讀時間約 2 分鐘
kywk
Site Maintainer
Roll out those lazy, hazy, crazy days of summer  
Those days of soda and pretzels and beer
Roll out those lazy, hazy, crazy days of summer
Dust off the sun and moon and sing a song of cheer

Just fill your basket full of sandwiches and weenies
Then lock the house up, now you're set
And on the beach you'll see the girls in their bikinis
As cute as ever but they never get 'em wet

Roll out those lazy, hazy, crazy days of summer
Those days of soda and pretzels and beer
Roll out those lazy, hazy, crazy days of summer
You'll wish that summer could always be here

Roll out those lazy, hazy, crazy days of summer
Those days of soda and pretzels and beer
Roll out those lazy, hazy, crazy days of summer
Dust off the sun and moon and sing a song of cheer

Don't have to tell a girl and fella about a drive-in
Are some romantic movie scene
Right from the moment that those lovers start arrivin'
You'll see more kissin' in the car than on the screen

Roll out those lazy, hazy, crazy days of summer
Those days of soda and pretzels and beer
Roll out those lazy, hazy, crazy days of summer
You'll wish that summer could always be here

You'll wish that summer could always be here
You'll wish that summer could always be here

Make it happen

· 閱讀時間約 2 分鐘
kywk
Site Maintainer

今天 通勤學英語 15 Mins Today 幕後教師室Teacher's Lounge Ep.35: 強化好習慣的原子架構 James Clear's framework for forming better habits podcast 節目中聽到 [[Atomic habits]] 的幾個核心精神, 備註一下:

訂定適合自己的學習框架, 可以簡單地拆解成下面四個步驟:

  1. Make it obvious 讓它顯而易見
  2. Make it attractive 讓它有吸引力
  3. Make it easy 讓它簡單易行
  4. Make it satisfying 讓它令人滿意

節目中, 另一句更 impress me 的是一萬小時法則

一萬小時定律:任何人做一件事,只要經過一萬小時的錘煉,都能從普通人變為某一領域的頂級人才。 國外作家格拉德威爾在《異類》一書中,明確地指出:“人們眼中的天才之所以卓越非凡,並非天資超人一等,而是付出了持續不斷的努力。 1萬小時的錘煉是任何人從平凡變成超凡的必要條件”。

任何人做一件事,只要經過一萬小時的錘煉,都能從普通人變為某一領域的頂級人才。

暫不討論後續諸多關於一萬小時是否正確的不同觀點延伸討論, 出發立意 - 持之以恆是值得參考的.

紀錄一下, 慢慢讓這些事發生...

just-us

· 閱讀時間約 0 分鐘

The Carry 50

· 閱讀時間約 2 分鐘
kywk
Site Maintainer

看 NBA 這幾年來, 今年季後賽 (連同季末、附加賽) 大概是近年來最精彩的一年.

而八年老勇迷, 看著衛冕軍勇士一路掙扎, 直到季末才篤定進季後賽.
季後賽在評論普遍認為 4:2 勝出下, 開盤先落後兩場勝差.
所幸主場魔咒下, 即使犯了愚蠢錯誤, 仍是險勝追平勝差. 而在全員發揮出色下拿下關鍵 Game 5 天王山之戰.
本以為回到自家主場就穩了, 卻不斷打鐵失誤打入搶七.

人生如戲, 這樣劇本如此狗血俗套, 卻真實上演著...

然後, Curry 拿下 50 分, 不僅破了 NBA 紀錄的 Playoff Game 7 最高得分,
也把球風相近卻年輕一截的國王送回家放假, 把勇士帶到第二輪.

不可思議的一場比賽, 當壓力大到 KT 只能繳出 2/10 的命中率時, Curry 竟用如此石破天驚的表現, 撐起了勇士隊.

人生如戲, 這樣劇本如此狗血俗套, 卻真實上演著...

恭喜 Curry, 恭喜勇士!