Bipul Kuri

Proper and clean way of Python install on mac

First install pyenv

brew install pyenv

Look at the available python versions

pyenv install --list

and then select a version to install

$pyenv install 3.9.0
python-build: use openssl@1.1 from homebrew
python-build: use readline from homebrew
Downloading Python-3.9.0.tar.xz...
Installing Python-3.9.0...
python-build: use readline from homebrew
python-build: use zlib from xcode sdk
Installed Python-3.9.0 to /Users/jondoe/.pyenv/versions/3.9.0

setup the bash profile

$echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n  eval "$(pyenv init -)"\nfi' >> ~/.bash_profile

or zsh

$echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n  eval "$(pyenv init -)"\nfi' >> ~/.zshrc

mtr This command should help us determining any TCP packet loss seen on any hops in the path

mtr -n -T -c 200 <destination ip address/host>

hping3 is a network tool able to send custom TCP/IP packets and to display target replies like ping program does with ICMP replies


Usecase 1

when you want to push your single commit changes from your repo to upstream

$ git fetch --all
$ git checkout -b my-single-commit-change upstream/master
$ git cherry-pick bf77ad7da
$ git push -u origin my-single-commit-change


upstream — →

origin — →github/user/project this is where my awesome single commit is

you want to move code from origin 1 commit (my single change) to upstream repo for a PR

Usecase 2

To sync upstream branch with origin branch

git checkout --track origin/branch
git merge upstream/branch
git push origin branch


upstream — →

origin — →github/user/project