Tag: macbook pro

How to install SVN with Homebrew on Mac M1

Step- 1. Installing Xcode’s Command Line Tools.

xcode-select --install

Step- 2. First you need to Installing and Setting Up Homebrew.

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

The file you’ll modify depends on which shell you’re using. If you’re using Bash, you’ll use the file ~/.bash_profile:

nano ~/.bash_profile

However, if you’re using ZSH, you’ll open the file ~/.zshrc.

nano ~/.zshrc

Uncomment and change brew path with new path like: /opt/homebrew/bin.

# If you come from bash you might have to change your $PATH.
export PATH=$HOME/bin:/usr/local/bin:$PATH

If you modified .bash_profile, execute this command:

source ~/.bash_profile

If you modified .zshrc, execute this command:

source ~/.zshrc

Now let’s verify that Homebrew is set up correctly. Execute this command:

brew doctor

Step- 3. Install subversion (svn) with brew. more info.

brew install subversion

Now let’s verify that SVN is set up correctly. Execute this command:

svn help

Main tutorial link: https://www.digitalocean.com/community/tutorials/how-to-install-and-use-homebrew-on-macos


How to setup WPCS with Visual Studio Code on Mac

Step 1. Install Composer

Download composer binary file from getcomposer.org website by running the following command. It will create a composer.phar file in the current directory.

curl -sS https://getcomposer.org/installer | php

Now, copy this composer.phar file under bin directory to make available anywhere in the system. Also, set the execute permission on file. I have changed the filename from composer.phar to composer for the easy use.

sudo mv composer.phar /usr/local/bin/composer
chmod +x /usr/local/bin/composer

Run composer command on the command prompt. This will provide you composer version details along with options available with composer command.


Upgrade PHP Composer

The PHP composer provides a command-line option (self-update) to upgrade itself. You can simply run below command from the terminal to upgrade compose on your macOS.

sudo composer self-update

more step: https://wpbeaches.com/set-up-composer-and-phpcodesniffer-on-visual-studio-code-on-macos/