How to connect and upload files to a remote machine using OpenVPN and SSH on macOS

Motivation:

You have a server inside a network. You are granted OpenVPN and SSH access to the server. You have a MacBook. You want to upload files to the server. You want to execute a process on the server (e.g. training a machine learning model).

Procedure:

  • Request a certificate and an Open VPN configuration file (an .ovpn file) from your network administrator.
  • Install Tunnelblick https://tunnelblick.net
  • Drag the Open VPN configuration file to the Tunnelblick Configurations tab.
  • Click the Connect button.
  • On macOS, open Terminal and execute below command
ssh root@172.29.64.144 -p 7081

where 172.29.64.144 is the machine IP and 7081 is the SSH port

How to completely uninstall Python on Mac OS?

Problem:

You have an issue with a Python version (e.g. the 3.7 version) and want to install another version (e.g. the 3.6 version). In order to install a fresh version you need to uninstall the current version first.

Solution:

Assume that the current version is 3.7. Replace 3.7 with another version that you installed.

Follow these 3 steps below.

1. Remove the third-party Python 3.7 framework

sudo rm -rf /Library/Frameworks/Python.framework/Versions/3.7

2. Remove the Python 3.7 applications directory

sudo rm -rf "/Applications/Python 3.7"

3. Remove the symbolic links, in /usr/local/bin, that point to this Python version. Ensure that the links exit using below command.

ls -l /usr/local/bin | grep '../Library/Frameworks/Python.framework/Versions/3.7'

and then run the following command to remove all the links:

cd /usr/local/bin/
ls -l /usr/local/bin | grep '../Library/Frameworks/Python.framework/Versions/3.7' | awk '{print $9}' | tr -d @ | xargs rm

Source: http://stackoverflow.com

Installing a new version:

  1. Download a version from https://www.python.org/downloads/mac-osx/, double click the file and follow the instructions.
  2. Verify installation: python3 –version
  3. Install Homebrew from https://brew.sh
  4. Install virtualenv
  5. pip3 install virtualenv
    pip3 install virtualenvwrapper

5.  Create and activate a virtual environment

cd /Users/admin/Downloads/training_model/model 
python3 -m virtualenv /Users/admin/Downloads/training_model/model
source bin/activate

How to Fix the Dell Laptop “Hard Drive Not Installed” issue

Problem:

Suddenly, when turning your Dell laptop on you get the error message “Hard drive Not installed” and cannot boot into Windows.

Solution:
  1. Power your laptop and quickly press F2 key to enter BIOS.
  2. Expand System Configuration node.
  3. Click SATA Operation.
  4. Select AHCI option.
  5. Click Apply button.
  6. Click Exit button.
  7. If the problem still persists then restore BIOS settings to Default BIOS settings and try the procedure again.