- System ubuntu18.04.2 desktop
- Internet interface name eth0 with dhcp.
- Disable network-manager:
1) Edit the local .git/config, add the following code: | |
[remote "github"] | |
fetch = +refs/heads/*:refs/remotes/github/* | |
url = git://github.com/PROJ_NAME | |
2) Check remote branches | |
git branch -r github |
Pattern Matching | |
In pattern matching, you can match from the left or from the right. The operators, along with their functions and examples, are shown below: | |
Operator: ${foo#t*is} | |
Function: deletes the shortest possible match from the left | |
Example: | |
$ export foo="this is a test" |
su -c "Your command right here" -s /bin/sh otheruser |
# Install Latest Git on Ubuntu: | |
sudo add-apt-repository ppa:git-core/ppa | |
sudo apt-get update | |
sudo apt-get install git |
Gateway set up | |
The following example will focus on the most common gateway setup: an Ubuntu computer with two wired network adapters (eth0 and eth1) hosting ICS to a static internal network configured for the 192.168.0.x subnet. | |
For this example, eth0 is used to represent the network card connected to the Internet, and eth1 represents the network card connected to a client PC. You can replace eth0 and eth1 as needed for your situation. Also, any private IP subnet can be used for the internal network IP addresses. | |
In summary: | |
eth0 = the network adapter with internet (external or WAN). | |
eth1 = the network adapter to which a second computer is attached (internal or LAN). |
I installed SpaceVIM on Ubuntu Bionic today but the file-type icons are shown in strange Chinese characters rather than the correct icons.
Set terminal profile encoding to UTF-8
Set VIM encoding to UTF-8. Check the encoding via following command in VIM
Today I tried to setup a small Kubernetes cluster on top of 3 Raspberry Pi 4 (4GB Memory). Here is the steps to install the cluster.
I have 3 Raspberry Pi 4 stacked with PoE headers and connected to a PoE switch at home. The are connected to Internet through a home router. All Pis are equipped with a 64GB Samsung SDXC card flushed with Ubuntu 20.04 image.