Skip to content

Instantly share code, notes, and snippets.

View QuiteZeal's full-sized avatar
🎯
Focusing on Learning!

Zeal Young QuiteZeal

🎯
Focusing on Learning!
View GitHub Profile
@QuiteZeal
QuiteZeal / zsh-autosuggestions&zsh-syntax-highlighting to Oh-my-zsh plugins.md
Last active April 22, 2020 10:53
Install zsh-autosuggestions&zsh-syntax-highlighting to Oh-my-zsh plugins.

Install zsh-autosuggestions&zsh-syntax-highlighting to Oh-my-zsh plugins.

Ather install Oh-my-zsh

If you havn't git in your Linux, you can:

$ sudo apt install git //Ubuntu

$ sudo yum install git //CentOS

Use git clone method

$ git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

@QuiteZeal
QuiteZeal / Keep ssh connection alive.md
Last active April 22, 2020 11:21
Keep ssh connection alive.

Keep ssh connection alive

Here is the solution to keep the terminal ssh status alive

If you don't know where the file you should change, you can:

$ find / -name "ssh_config" it will tell where is it, such as /etc/ssh/sshd_config

change the default config

$ sudo vim /etc/ssh/sshd_config and find

@QuiteZeal
QuiteZeal / Change Linux Timezone.md
Last active April 24, 2020 08:16
Change Linux Timezone

Change Linux Timezone

Use date -R to display system time

Sometime the linux will use 0 timezone, so we need to change.

Type this:

$ timedatectl list-timezones

@QuiteZeal
QuiteZeal / Change Hostname in CentOS or Ubuntu.md
Last active April 23, 2020 11:32
Change Hostname in CentOS or Ubuntu.

Change Hostname in CentOS or Ubuntu

I choose the manual way

type this to display current hostname:

hostname

and type this to change it:

sudo hostnamectl set-hostname NewName

@QuiteZeal
QuiteZeal / Turn on the Google BBR on CentOS8.md
Last active April 23, 2020 12:39
Turn on the Google BBR on CentOS8

Turn on the Google BBR on CentOS8

there is an easy way if you have kernel version above 4.9.0 type this to display the current version: uname -R

Just three steps to turn on BBR

Line by line to input:

echo 'net.core.default_qdisc=fq' | sudo tee -a /etc/sysctl.conf

@QuiteZeal
QuiteZeal / Fixed chsh: command not found in CentOS 8.md
Created April 23, 2020 12:23
Fixed chsh: command not found in CentOS 8

Fixed chsh: command not found in CentOS 8

This problem happens on some vps provider.

Need to manual install to solve it

sudo dnf install util-linux-user

That means use dnf to solve it.

@QuiteZeal
QuiteZeal / Change SSH port on CentOS 8.md
Last active December 18, 2023 20:40
Change SSH port on CentOS 8

Change SSH port on CentOS 8

The key step is to turn your want listen-port and close the default ssh-port. For CentOS 8, will use firewalld

Open your want listen-port and close the default

sudo firewall-cmd --zone=public --permanent --add-port=30000/tcp
sudo firewall-cmd --zone=public --permanent --remove-service=ssh

If firewalld not installed, you can manually install and enable it.

@QuiteZeal
QuiteZeal / Locations of Ubuntu's desktop shortcut.md
Created May 16, 2020 16:39
Locations of Ubuntu's desktop shortcut

Locations of Ubuntu's desktop shortcut

They will be on these three locations:

/usr/share/applications
/usr/local/share/applications
~/.local/share/applications

Normally, for not root user, it will be at the home directory, that mean is~/.local.

Markdown 2 hrs 34 mins β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘ 86.1%
Python 12 mins β–ˆβ–β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 6.9%
Sublime Text Config 6 mins β–Šβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 3.6%
JSON 4 mins β–Œβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 2.5%
HTML 1 min ▏░░░░░░░░░░░░░░░░░░░░ 0.7%
@QuiteZeal
QuiteZeal / Github Emoji Collection.md
Last active September 15, 2020 04:46
Github Emoji collection and corresponding trigger code
Smileys & People
:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue:
😴 :sleeping: 😟 :worried: 😦 :frowning: