Revamp on Old Hardware, Week 3

Opinionated choices for macOS development...

·

3 min read

As part of a larger effort to find tools that enable more functionality without compromising productivity to the user, the software as mentioned in previous post:

  • A modern IDE to type and write computer processes, e.g. Atom , VSCode

  • A more ideal Terminal.app

  • A complete Git installation

The aforementioned utilities could help to alleviate most of the frustration with pain points in configuration, and to allow the software to interoperate with specific, daily tasks. Granted, these utilities may yield to the greater benefit as offered to the user.

Technical Overview

A modern IDE to type and write computer processes is essential for organization, code formatting, and integration with other software.

# Install Atom editor on Mac OS
curl -JLO "https://github.com/atom/atom/releases/download/v1.60.0/atom-mac.zip"

wait %10

unzip atom-mac.zip

# -J, --remote-header-name Use the header-provided filename.
# -L, --location Follow redirects.
# -O, --remote-name Write output to a remote filename.

Similarly, Atom can be installed through wget command. See below with Node installation.

It may be easier to download directly from Github releases page...


A more ideal Terminal can provide a visually appealing interface to run computer processes and customization to the development tool suite.

Three important files that can be modified to configure the Terminal:

  • ~/.bash_profile

  • ~/.bashrc

  • ~/.zshrc (If Z shell is used, topic for another post!)

If the above files are not present, follow the next steps to create on your machine. Else, continue to customization.

# Check out the configuration of Bash terminal
# Create ~/.bash_profile & ~/.bashrc 
touch ~/.bash_profile ~/.bashrc
echo 'if [ -f ~/.bashrc ]; then . ~/.bashrc ;fi ' >> .bash_profile

Going forward, .bashrc file may be used to add new variables to the local $PATH variable.

# example `.bashrc` file
export JAVA_HOME=$(/usr/lib/../java_home)
export JRE_HOME=$(/usr/lib/../jre_home)

Custom changes can be made to ~/.bash_profile
(i.e. for improving readability).

echo 'export CLICOLOR=1 ' > .bash_profile
# create alias for colorized output of 'ls' command
echo 'alias ls='ls -FGha' ' > .bash_profile
# create alias for colorized, ascending sorted, time output
echo 'alias ll='ls -FGhalt' ' > .bash_profile

Choose 1 of 2 options based on your Terminal display preference.

# dark Terminal themes
echo 'export LSCOLORS=GxFxCxDxBxegedabagaced ' > .bash_profile
# light Terminal themes
echo 'export LSCOLORS=ExFxBxDxCxegedabagacad ' > .bash_profile

A complete Git installation is necessary as it is a notorious software utility that enables version control across local and remote software repositories.

There are additional changes to take note of during the setup and installation of Git on a Mapple computer, as different installations may exist on the system in question.

# Check out what is currently installed
which -a git
# Does installation of binary 'git' exist?
/usr/local/bin/git --version
# Does installation of binary Apple 'git' exist?
/usr/bin/git --version
# Does installation of brew.sh 'git' exist?
DIR=/usr/local/Cellar/git
[ -d "$DIR" ] && echo "$DIR directory exists."

You can view all of the installation binaries from the which -a git command also!

# Display binary locations for all 'git' installations
for i in $(which -a git); do echo -n "${i}:  "; ${i} --version; done
# EOF

/Gist

References Cited:
- [https://git-scm.com/download/mac](https://git-scm.com/download/mac)\
- [https://gist.github.com/lemenkov/1674929](https://gist.github.com/lemenkov/1674929)\
-
- [https://apple.stackexchange.com/q/93002](https://apple.stackexchange.com/q/93002)\
- [https://apple.stackexchange.com/a/272220](https://apple.stackexchange.com/a/272220)\