Workarounds with Ubuntu
Remotely accessing jupyter notebooks
Running a jupyter notebook on the server and would like to access locally?
- Run the notebook as usual on the host machine but without browser
$ jupyter-notebook --no-browser --port 9999
- Forward the traffic from the host port to the local client port as follows:
$ ssh -N -L localhost:8888:localhost:9999 user@host_ip
- Run the jupyter notebook locally in the browser as follows:
localhost:8888
Constantly update the output of a command
$ watch -n1 iwconfig
Important options
n1
: updates the command after every 1 secondd
: highlight the changes in the update of the command
Git push without entering username and password
- Check your current remote
$ git remote -v
origin https://github.com/USERNAME/REPOSITORY.git (fetch)
origin https://github.com/USERNAME/REPOSITORY.git (push)
- Switch remote access of repository from HTTPS to SSH
$ git remote set-url origin git@github.com:USERNAME/REPOSITORY.git
- Verify the remote is infact SSH
$ git remote -v
origin git@github.com:USERNAME/REPOSITORY.git (fetch)
origin git@github.com:USERNAME/REPOSITORY.git (push)
- Generate ssh key (if you do not have one already)
$ ssh-key gen
- Copy your public-id to github and add it under New SSH key
glfw in cmakelists
find_package(glfw3 3.3 REQUIRED)
target_link_libraries(target glfw)