-
-
Notifications
You must be signed in to change notification settings - Fork 91
MacOS Build Environment
-
Install iTerm2 and accept the prompt to install Apple Developer Tools: https://iterm2.com/downloads.html
Navigate to Settings > Advanced and then change the option Scroll wheel sends arrow keys when in alternate screen mode to Yes.
Navigate to Settings > Profile > Terminal and tick Unlimited Scrollback
-
Install Homebrew: https://brew.sh/
eval "$(/opt/homebrew/bin/brew shellenv)"
-
Install Perl and GNU sed and OpenSSL:
brew install perl gnu-sed openssl
-
Install PostgreSQL: https://postgresapp.com/
-
Enable snmp locally if you wish: https://help.domotz.com/tips-tricks/how-to-enable-snmp-on-linux-machines/
-
Disable AirPlay Receiver if you wish to use default port 5000: https://stackoverflow.com/questions/69818376/localhost5000-unavailable-in-macos-v12-monterey
-
Configure your environment:
cat >> ~/.zshrc
export POSTGRES_HOME="/Applications/Postgres.app/Contents/Versions/latest"
# gnu-sed and psql PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$POSTGRES_HOME/bin:$PATH"
# send cpanm installed perl modules here instead of brew Cellar eval "$(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib=$HOME/perl5)"
export PERL_CPANM_OPT='--notest --curl --quiet'
export CFLAGS="-I$(brew --prefix)/include $(perl -MAlien::SNMP -E 'say Alien::SNMP->cflags')" export LDFLAGS="-L$(brew --prefix)/lib $(perl -MAlien::SNMP -E 'say Alien::SNMP->libs')" PATH="$(perl -MAlien::SNMP -E 'say Alien::SNMP->bin_dir'):$PATH"
alias g='git' alias gs='git status' alias ll='ls -lhG'
-
Get the above config in place:
source ~/.zshrc
-
Set up cpanminus and local::lib:
curl -L https://cpanmin.us | PERL_MM_OPT="INSTALL_BASE=$HOME/perl5" perl - App::cpanminus local::lib
-
A
~/.gitconfig
looking something like:[core] autocrlf = input whitespace = cr-at-eol commentChar = @ [push] default = current followTags = true [diff] noprefix = true [user] name = Boaty McBoatFace email = [email protected]
-
Get a decent editor config:
cd curl -O https://gorwits.me.uk/data/files/vimrc mv vimrc .vimrc
-
Repurpose the § key to be ` and ± to be ~
mkdir -p ~/Library/KeyBindings cat > ~/Library/KeyBindings/DefaultKeyBinding.dict
{ /* this will make all § (i.e. section sign: §) turn into ` */ "\UA7" = ("insertText:", "`"); /* this will make all ± (i.e. plus/minus: ±) turn into ~ */ "\UB1" = ("insertText:", "~"); }
-
Or repurpose the § key to be Escape
mkdir -p ~/Library/KeyBindings cat > ~/Library/LaunchAgents/give.me.esc.key.plist
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>give.me.esc.key</string> <key>ProgramArguments</key> <array> <string>hidutil</string> <string>property</string> <string>--set</string> <string>{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0x700000064,"HIDKeyboardModifierMappingDst":0x700000029}]}</string> </array> <key>RunAtLoad</key> <true/> </dict> </plist>
That’s it.
For Netdisco and SNMP::Info developers, you should cpanm Alien::SNMP Mozilla::CA CPAN::Uploader IO::Tty
.
See also: