9/26/2016
GIS frequently used commands
gdallocationinfo N37W122.hgt 120 683
9/21/2016
Virtual box cannot boot to GUI?
1) Find the IP of your virtual box, say, 192.168.1.23
2) From your host machine: ssh 192.168.1.23
3) ssh console: sudo service lightdm start
4) The virtual box should start the GUI
9/14/2016
9/07/2016
How to fix Docker
So far I haven't figured out a way to fix it without rebooting the machine.
Even worse: docker daemon won't start after reboot. I need to reinstall docker to get it to work. And I had to use the following commands to uninstall and reinstall to make it work.
$ sudo apt-get autoremove --purge docker-engine
$ rm -rf /var/lib/docker
$ sudo apt-get install docker-engine
8/29/2016
GIT commonly used commands
# How to remove unwanted file from last commit
git reset --soft HEAD~1
Then reset the unwanted files in order to leave them out from the commit:
git reset HEAD path/to/unwanted_file
Now commit again, you can even re-use the same commit message:
git commit -c ORIG_HEAD
# How to resolve conflicts
After git rebase "branch"
If you want to accept the changes from the "branch"
git checkout --ours
Or If you want to accept the changes from current branch, just run:
git checkout --theirs
Or
git rebase -s ours
How to fix this error: error: The following untracked working tree files would be overwritten by merge:
git fetch --all
git reset --hard origin/master
# Change the remote
Submodules
=========
g submodule add https://github.com/google/protobuf.git third_party/protobuf
g submodule update --init # to clone all submodules
======
By checking: https://docs.github.com/en/authentication/troubleshooting-ssh/using-ssh-over-the-https-port
which I followed the ~/.ssh/config added the port 443.
and use command like: "proxychains -q git pull", it is working now.
Here is what is working now through https, and through proxy:
❯ proxychains -q ssh -T git@github.com
The authenticity of host '[ssh.github.com]:443 ([20.205.243.160]:443)' can't be established.
ED25519 key fingerprint is SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '[ssh.github.com]:443' (ED25519) to the list of known hosts.
Hi LeisureLinux! You've successfully authenticated, but GitHub does not provide shell access.
8/25/2016
bazel commonly used commands
bazel build -c opt --strip=always foo/bar/...
# How to verbose log bazel build
bazel build -s //my:target
bazel test --runs_per_test=10