Visit address:portal
Handy Note
DB
Use navicat11 client to connect localhost mysql database and get Client does not support authentication protocol requested by server; consider upgrading MySQL client
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'newpass';
Copy the code
IDE
idea2018 active code
http://idea.lanyus.com/
Copy the code
use zsh as the default shell in vscode
-
Open
User Settings
and searchterminal.integrated.shell.osx
-
Set it to
/bin/zsh
use code
command to open a project with vscode quickly in shell
-
Command+Shift+P
and searchshell command
-
Choose
Install 'code' command in PATH
preview markdown file real time in vscode
-
Command+Shift+P
and searchmarkdown
-
Choose
Open locked preview to the side
Maven
The environment variable
vim ~/.bash_profile
export M2_HOME=/Users/username/Documents/maven # Here is your Maven path
export PATH=$PATH:$M2_HOME/bin
source ~/.bash_profile
mvn -v
Copy the code
The plug-in USES
- maven-install-plugin
- maven-install-plugin/examples
The plugin problem
- maven-plugins-can-not-be-found-in-intellij
Linux
View the Linux version
lsb_release -a
Copy the code
lsb = Linux Standard Base
CPU usage
top
Copy the code
CPU information
cat /proc/cpuinfo |more
Copy the code
Check the memory
free -m
Copy the code
Check the disk
df -h
Copy the code
fdisk -l
Copy the code
Command interpretation
which&where
- which & whereis
/usr/bin is different from /usr/local/bin
- /usr/bin & /usr/local/bin
MacOS
use zsh as the default shell
- See the shells you already installed with the command
cat /etc/shells
Copy the code
- Set zsh as the default shell
chsh -s /usr/local/bin/zsh
Copy the code
- (Optional)If you want to configure zsh mannually, use
vim ~/.zshrc
Copy the code
- After change
.zshrc
, do remember tosource
it to make it work
source ~/.zshrc
Copy the code
- (Restore default shell)
chsh -s /bin/bash
Copy the code
Git
Initialize the git
- Check the configuration
git config --list
Copy the code
- Initialize the user and mailbox
git config --global user.name "your name"
git config --global user.email your email
Copy the code
SSH keys are generated locally and stored remotely for SSH access
- Generate a ssh key locally
ssh-keygen -o
Copy the code
- Catch your key just generated before
cat ~/.ssh/id_rsa.pub
Copy the code
- Put it into your ssh keys in your romote repository
Use VS Code to open the project from Git Clone on Github, modify it and make git remote association, and input your account and password every time when git push
Storing global accounts
git config --global credential.helper wincred
Copy the code
Git global configuration user name. Multiple configurations are generated due to misoperations
background
Use the following incorrect command and parameters to modify the configuration
git config --global user.name = "M1kewang"
Copy the code
Changing the configuration item user.name first does not require an equal sign or quotes
The result of this configuration is two user.names, as follows
git config -l
user.name=magi
user.name==
Copy the code
That is, a record with the value of user.name as an equal sign is generated
Git will not know which configuration you are trying to manipulate because there are two properties with the same name
The specific error
warning: user.name has multiple values
error: cannot overwrite multiple values with a single value
Use a regexp, --add or --replace-all to change user.name.
Copy the code
The solution
Let’s take a look at what configuration parameters git has
git config
Copy the code
In Git, the configuration is stored as a global variable, like in MySQL.
Trying to do this, however, is not ideal and will prompt you that there are multiple records for the property to be modified
warning: user.name has multiple values
Copy the code
The correct way to do this is to batch the property, which is to modify all the property values with the same name
git config --global --replace-all user.name M1kewang
Copy the code
Git then merges the two same properties into one and returns to normal
Github
Upload local projects to Github
-
Get into your project folder and
git init
, then a.git
folder was created. -
Add your files to git.
git add .
Copy the code
- Commit your added files to the stage area.
git commit -m "write your comment"
Copy the code
- Link your local git project with your GitHub repository.
git remote add origin https://github.com/youraccount/yourrepository.git
Copy the code
- Pull the existed files of your current GitHub repository.
git pull origin master
Copy the code
-
Fix the conflicts if there exist.
-
Push your local project managed by git to your remote GitHub repository.
git push -u origin master
Copy the code
- Done.
Gitlab
- install-on-ubuntu
Terminal
- Nslookup Domain name related
TODO
- nslookup