ssh: connect to host port 22: Operation timed out

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

ssh: connect to host 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 =


url =

Then the git operations once stuck would work.


Understanding the Stages of Team Formation

Forming, Storming, Norming, and Performing


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.

Open video editor


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
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.


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>


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.