tech| 我的開發環境 & 效率工具

date: 2018-8-30 13:15:52
title: tech| 我的開發環境 & 效率工具

行文一覽:

  • 上手 mac: 離開「我 win 玩得賊溜」的舒適區
  • 效率工具簡介: 簡易入坑指北
  • 軟件列表: 這些我現在在用的

其他:

高效, 是一種癮
人生苦短, 我用 mac

上手 mac

  • 說一下剛上手 mac 的一些囧事, 首先是想要折騰 Navicat 破解版, 按照百度出來的結果刪除了一個文件, Mac 無法進入系統, 而我在只 2 天折騰 Mac 的情況下, 選擇了 放棄, 迴歸 win 懷抱, 舒適區果然是存在的
  • 打算重整旗鼓再戰 Mac, 這次有了 win 的教訓, 準備老老實實的使用系統自帶功能, 然後按照百度來, 先格式化 HD, 然後使用聯網裝機(浪費時間一)的方式, 然後出現 APFS 不支持 preboot, 不死心多次重試(最開始因爲沒仔細看就關了, 第二次才記下報錯信息, 之後的幾次都是在 掙扎, 浪費時間二), 最後百度發現只能通過外接啓動盤, 於是 找組織求救(公司很多人用 Mac), 可以安心 週一見

外接個機械鍵盤吧, 打字舒服度提升明顯

效率工具簡介

mac - 16g 標配

Alfred

  • 切換應用
  • 其他工具: yd(有道翻譯) 計算器 自定義搜索(bm 百度地圖)

iterm2 + fishshell

  • git 狀態
  • 代碼自動補全
  • 爲重複工作添加小腳本

docker - 搞定開發環境

  • docker desktop
  • docker-compose

vscode - 文本編輯
phpstorm - IDE

  • 提示
  • 補全
  • 重構
    datagrip - 數據庫管理工具
  • 自動補全
  • 快速切連接
  • 快速打開表
  • 快速查看DDL

one vim, use where

  • chrome
    • 可點擊位置(包括輸入框)
    • 快速打開標籤
  • vscode

軟件列表

alfrd3 + workflow: 效率神器, 切應用簡直酸爽, 這是我切 mac 的主要動機之一
chrome
- 谷歌訪問助手(就能訪問 Google 了)
- 設置項中的 password 需要配合使用 iCloud(多麼「痛」的領悟)
- f12 -> cmd-S-p 命令面板
搜狗拼音: 語言輸入 英文輸入
git + git desktop(看 diff 和 pr 神器)
vscode + command:
- command
- shell: 把 code 添加到 PATH 中
- sync setting
idea: phpstorm + datagrip(關係數據庫操作神器)
docker desktop + aliyun下載文件 + docker 中文網源
iterm2 + fish + fish_config(~/.config/fish/fish_config): fish 簡直零配置
imageopti 無損優化圖片
navicat(換 datagrip 吧): 快捷鍵
charles 視頻教程
無法抓包 -> 白名單/代理衝突
無法抓localhost: https://www.charlesproxy.com/documentation/faqs/localhost-traffic-doesnt-appear-in-charles/
截圖工具:
- [qq 截圖] -> 推薦這個: 截圖+錄屏+文字識別, 真強大
- jietu: 功能夠用, 截圖後默認存到剪切板
- snip: snip.qq 功能比 jietu.qq 少
- snipaste: 只能截圖當前顯示器
nimble commander: 類似 total commander 的文件管理工具 -> 習慣這種文件管理方式後就改不了了
外接顯示器: mac 下一個 typec 接口只能接一個顯示器, 哪怕轉接頭上有多個顯示器接口
生產力工具鏈: https://github.com/Louiszhai/tool
圖片上傳工具: picgo + 七牛雲
cal 日曆: account 添加 qq calDAV -> 移動端直接添加 qq exchange

touchbar + fn: touchbar 對 fn 鍵相關設置

# homebrew install
curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install >> brew_install
BREW_REPO = "https://mirrors.ustc.edu.cn/brew.git".freeze
CORE_TAP_REPO = "https://mirrors.ustc.edu.cn/homebrew-core.git".freeze
/usr/bin/ruby brew_install
# homebrew update: https://mirrors.tuna.tsinghua.edu.cn/help/homebrew/
# brew cask 安裝dmg格式軟件
brew cask info xxx # 查詢
brew cask install xxx # 安裝
brew cask install --force xxx # 更新

# pkg
pkgutil --pkgs
# pkg-uninstall https://github.com/mpapis/pkg_uninstaller
bash < <(curl -sL https://raw.github.com/mpapis/pkg_uninstaller/master/pkg-install)

# allow app form anywhere
sudo spctl --master-disable

# SIP(system integrity protection, rootless)
csrutil disable

# spotlight
# 關閉spotlight服務, mdutil -h 查看具體使用
sudo mdutil -a -i off
# 禁用, load 啓用
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
cd /System/Library/CoreServices/ # 刪除menubar圖標
sudo mv Search.bundle Search2.bundle # 提出SystemUIServer進程生效

# launchpad動畫效果
defaults write com.apple.dock springboard-show-duration -int 0
defaults write com.apple.dock springboard-hide-duration -int 0
killall Dock # 生效

# 刪除默認輸入法
cd ~/Library/Preferences
cp com.apple.HIToolbox.plist com.apple.HIToolbox.plist.bak
sudo open com.apple.HIToolbox.plist # 關閉SIP -> 切換到默認輸入法, 才能保存 -> 安裝xcode, 也可以 xed com.apple.HIToolbox.plist -> 重啓

# 七牛圖片高級處理: https://developer.qiniu.com/dora/manual/1270/the-advanced-treatment-of-images-imagemogr2
?imageMogr2/auto-orient/thumbnail/500x500 # 自動旋轉; 等比限寬+高縮放
?imageMogr2/rotate/-90 # 旋轉

alfred

alfred的確是神器, 需要好好提提:

  • 切應用: 常用應用可以「調教」到輸入一個字母解決
  • 搜索 文件
  • 搜索 chrome 書籤
  • 設置 百度/百度地圖 搜索
  • 設置 微雲 同步配置

Alfred workflow
workflow - gtihub: gh > help 查看幫助

iterm2

mouseless copy C-f-tab
Autocomplete C-;
Paste History C-S-h
Full Screen C-enter
Window Arrangements: 保存常用TAB佈局
Shell Integration/Utilities https://iterm2.com/documentation-shell-integration.html
Password Manager
show timestamp
open quickly
find cursor C-/
iterm2 粘貼時有多餘字符 0~ 1~: printf '\e[?2004l'
copy mode: cmd-S-c(進入) -> C-v(選中模式) jkhl(移動) y(複製)

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章