Mac – 常用终端软件包及工具归档
     发布在:System      浏览:85      评论:2 条评论

终端插件 oh-my-zsh

> sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
> vi ~/.zshrc
# -----------------------
# 最后一行加上
source ~/.bash_profile

> source ~/.zshrc

软件包管理器

> /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

mac Vim

> export PATH=/usr/local/bin:$PATH
> brew update
> brew install vim
> brew unlink vim && brew link vim

mac Wget

> brew install wget
> brew unlink wget && brew link wget

mac Composer

> cd ~
> sudo cp /private/etc/php.ini.default /private/etc/php.ini
> sudo vim /private/etc/php.ini
# -----------------------------------
detect_unicode = Off

> sudo curl -sS https://getcomposer.org/installer | PHP
> sudo mv composer.phar /usr/local/bin/
> sudo cp /usr/local/bin/composer.phar /usr/local/bin/composer
> sudo vim ~/.bash_profile
# ------------------------------------
alias composer="php /usr/local/bin/composer.phar"

mac Xcode

App Store 安装 Xcode

启用 Developer Tools Access

> DevToolsSecurity --status  # 查看开发工具状态 
> DevToolsSecurity --enable  # 启用开发工具
> DevToolsSecurity --disable # 关闭开发工具

mac Drush

# Create and/or navigate to a path for the single Composer Drush install.
> mkdir -p /usr/local/opt/drush-8.x
> cd /usr/local/opt/drush-8.x
# Initialise a new Composer project that requires Drush.
> composer init --require=drush/drush:8.* -n
# Configure the path Composer should use for the Drush vendor binaries.
> composer config bin-dir /usr/local/bin
# Install Drush. 
> composer install

安装完,如果有Unable to load autoload.php…的错误,编辑

> vim /usr/local/drush/drush/drush/includes/preflight.inc
# --------------------------------
$global_vendor_path = DRUSH_BASE_PATH . '/../vendor/autoload.php';

> drush version

mac Java

直接上官网下载 jdk 包

这是 java8 的下载地址

mac Gcc

安装 Xcode 即可

mac Git

官网下载安装包

mac Nodejs

官网下载安装包

mac 更新 Python

  1. 安装 Python最新版
  2. 修改 .bash_profile
> sudo vim ~/.bash_profile
# -------------------------
export Python3.7="/Library/Frameworks/Python.framework/Versions/3.7"
alias python="$Python3.7/bin/python3.7"

mac 安装 XDebug

官方文档

> curl 'http://pecl.php.net/get/xdebug-2.7.0.tgz' -o xdebug-2.7.0.tgz
> pecl install xdebug-2.7.0.tgz
> sudo vim /etc/php.ini
# ------------------------
zend_extension="/usr/lib/php/extensions/no-debug-non-zts-20160303/xdebug.so"
xdebug.remote_enable = true
xdebug.remote_autostart = true
xdebug.remote_host = 10.0.2.2
xdebug.remote_port = 9000
xdebug.remote_log = "/var/log/xdebug.log"
xdebug.max_nesting_level = 1000

mac 安装 Mounty

用于让 mac 支持 NTFS 挂载

> brew cask install mounty

Sequel Pro 数据库管理工具

官网地址

安装 FiraCode 字体

> brew tap homebrew/cask-fonts
> brew cask install font-fira-code

Enabled in Mac Vim

> vim ~/.gvimrc
# Add this in ~/.gvimrc
set macligatures
set guifont=Fira\ Code:h12

Enabled in VSCode

Open settings.json

"editor.fontFamily": "Fira Code", // "FiraCode-Retina"
"editor.fontLigatures": true,

"editor.fontWeight": "300" // Light
"editor.fontWeight": "400" // Regular
"editor.fontWeight": "500" // Medium
"editor.fontWeight": "600" // Bold

启动 U 盘制作工具

深度启动盘制作工具

Google Cloud SDK

> brew tap caskroom/cask
> brew cask install google-cloud-sdk

> gcloud compute instances list
> gcloud compute ssh my-instance --zone asia-northeast1-b

PHPStan 代码静态分析

> composer global require phpstan/phpstan
Responses

    加载中...
  1. 那个,mac简单的图像处理你用什么软件?比如加水印,改变尺寸。

    回复
    • OceanicKang博主

      Photo Image Editor Pixelstyle. 我用过几次,感觉还行,一般简单的图像处理我都是直接在线版PS搞定的。

      回复