menu
Vundle Usage Memo

date_range Sept. 09, 2020 - Wednesday

Some Vundle basic usage tips.

Run Docker as Non-root User in Linux

date_range Sept. 04, 2020 - Friday

The solution is simple:

To fix the Docker permission denied error and use Docker as non-root user, create a group called “docker” with the following command:

$ sudo groupadd docker

Next, add your user to the docker group:

$ sudo usermod -aG docker $USER

After adding the user to the docker group, log out and log back in to take effect the changes.

Python Logging Export to File

date_range Sept. 01, 2020 - Tuesday

As for the need for logging from Python program, here is a memo for the use of the Python built-in module logging

Git Remove All Commit Clear Git History

date_range Aug. 20, 2020 - Thursday

In this article i am showing how to clear Git history by removing all commits. You may need this if you want to delete sensitive data from the history of Git commits. After such cleanup you will have the latest version of your Git repository, but with the one commit only. Be aware that after resetting all the history of changes in your Git repository will be deleted as well.

PPT Resolution Problem with 3D Format

date_range July 06, 2020 - Monday

PPT can normally export as PDF with very high resolution (the vectorized file). However, I encounter a weird problem today that cannot export a high resolution PDF. After “debugging” and “doing experiments”, I’ve finally found the problem. It’s because of the 3D format settings.

Setup Checklist on Windows PC

date_range April 28, 2020 - Tuesday

Just got a new working laptop with Windows 10. Here make a checklist of essential tools and software to be installed and configured on it.

How to Setup a GIT server

date_range April 27, 2020 - Monday

remote git repo is actually no difference from a local one. Here’s how to setup a LOCAL git server.

How to Use Selenium to Auto Login

date_range April 26, 2020 - Sunday

使用Selenium自动化操作网页,以自动登陆(办公网)系统。

How To Open A Port In CentOS 7 With Fiewalld

date_range Dec. 02, 2019 - Monday

Open Specific Port

Opening a port in firewalld is fairly straightforward, in the below example we allow traffic in from any source IP address to TCP port 100. First we modify the persistent configuration, then we reload firewall-cmd to load this change into the running configuration.

[root@centos7 ~]# firewall-cmd --permanent --add-port=100/tcp
success
[root@centos7 ~]# firewall-cmd --reload
success

If the –permanent flag is not specified, this will only change the running configuration but will not be saved.

We can check the ports that are opened in the current default zone with ‘–list-ports’.

[root@centos7 ~]# firewall-cmd --list-ports
100/tcp
As expected we see that TCP port 100 is open.

Should we wish to remove a port, we can use ‘--remove-port=’ instead.

We can also open a range of ports in the same way.

[root@centos7 ~]# firewall-cmd --permanent --add-port=200-300/tcp
success