ssh: connect to host github.com port 22: Operation timed out

This happened to me when doing a git pull from a coffee shop.

ssh: connect to host github.com port 22: Operation timed out
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

The reason is because port 22 is blocked at the coffee shop wifi router. Turns out github allows https to do git operations.

git config --local -e

Change (or comment it out using #)

url = git@github.com:username/repo.git

to

url = https://github.com/username/repo.git

Then the git operations once stuck would work.

ref:
https://stackoverflow.com/questions/35558649/github-error-ssh-connect-to-host-github-com-port-22-operation-timed-out-fat

Understanding the Stages of Team Formation

Forming, Storming, Norming, and Performing

Ref: https://www.mindtools.com/pages/article/newLDR_86.htm

Generate image classifier without code

Finally, we are onto something useful now. This service creates image classifier without writing any code. That’s the right direction. Next step is to combine these classifiers to form a final classifier.

https://www.seeme.ai/

https://www.zerotosingularity.com/blog/seeme-intro/

Open video editor

logo

https://www.openshot.org/

Switch python version in osx

I have python 3.7 installed but will need to run something with python 3.6. Here are the steps to do so.

brew unlink python
brew install --ignore-dependencies https://raw.githubusercontent.com/Homebrew/homebrew-core/f2a764ef944b1080be64bd88dca9a1d80130c558/Formula/python.rb
brew switch python 3.6.5

To switch it back to python 3.7

brew switch python 3.7.0

Now with two versions installed, we can use virtualenv for projects.

Notice that when you issue virtualenv –python=$(which python3) env, virtualenv may throw an error -bash: /usr/local/bin/virtualenv: /usr/local/opt/python/bin/python3.7: bad interpreter: No such file or directory. That’s because the virtualenv script has a shebang line referencing python 3.7. To fix that error, edit that file /usr/local/bin/virtualenv and change the version to 3.6. Then virtualenv will work fine.

Ref:
https://stackoverflow.com/questions/51726203/installing-python3-6-alongside-python3-7-on-mac
https://stackoverflow.com/questions/45269867/python-virtualenvwrapper-bad-interpreter/48259762#48259762

Remove local changes from a git branch

When you just want to start fresh, you can always re-clone the repo. However, if you have local feature branches hanging around, then you may just want to clean up a particular branch.

If you do a git status, you will see two sections. One is unstaged local changes (before commit), the other is local untracked files.

For unstaged local changes (changes to files already checked in before)

# discard and save changes for possible re-use
git stash

# discard changes of a file
git checkout <filename>

# discard all changes to all unstaged local files
git reset --hard

After you run the above commands, the untracked files will still stay put. It’s annoying if you have a long list of files/directories.

# to see what would be removed (just preview)
git clean -n

# to remove them
git clean -f

# or do the usual
rm -rf <file | dir>

ref:
https://docs.gitlab.com/ee/topics/git/numerous_undo_possibilities_in_git/
https://koukia.ca/how-to-remove-local-untracked-files-from-the-current-git-branch-571c6ce9b6b1

Our dangerous quest to perfect ourselves – Thomas Curran

We should strive to do best at school and work, so that we can achieve what our potential can reach. But that drive should not be limitless. Otherwise it would become the source of stress and internal looking down on oneself.