Skip to content

Instantly share code, notes, and snippets.

@f1r3starter
Last active October 22, 2020 20:26
Show Gist options
  • Save f1r3starter/2fa6003c660142a1a40c8b4c12865338 to your computer and use it in GitHub Desktop.
Save f1r3starter/2fa6003c660142a1a40c8b4c12865338 to your computer and use it in GitHub Desktop.
Linux -> MacOS migration

Packet manager installation:

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

PHPStorm hotkeys are little bit different:

https://resources.jetbrains.com/storage/products/phpstorm/docs/PhpStorm_ReferenceCard.pdf

Docker Edge with mutagen:

https://docs.docker.com/docker-for-mac/edge-release-notes/

Minikube installation guide (for me, works better with HyperKit rather than with VirtualBox):

https://kubernetes.io/docs/tasks/tools/install-minikube/

Skaffold for better local development experience:

https://skaffold.dev/docs/quickstart/

Terminal shell:

https://github.com/ohmyzsh/ohmyzsh

Script to execute on your local machine if you are having troubles with network inside container:

#!/bin/bash
interfaces=( $(netstat -in | egrep 'utun\d .*\d+\.\d+\.\d+\.\d+' | cut -d ' ' -f 1) )
rulefile="rules.tmp"
echo "" > $rulefile
sudo pfctl -a com.apple/tun -F nat
for i in "${interfaces[@]}"
do
  RULE="nat on ${i} proto {tcp, udp, icmp} from 192.168.64.0/24 to any -> ${i}"
  echo $RULE >> $rulefile
done
sudo pfctl -a com.apple/tun -f $rulefile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment