preface

The owner of the building has not finished writing, every day after work continue to update, there is a good tool welcome to leave a message below

Recommended Collection Recommended collection Recommended collection

The command line

CMD seconds into the specified directory

Inefficient operation

Win +r, enter CMD, then jump to the specified directory SAO operation

Enter CMD in the folder address bar. The CMD window is displayed and the specified directory is displayed

SSH and SCP commands

SSH: log in from one machine to another machine SCP: Transfer files from one machine to another machine

You can use the SSH command to log in using a password, but it is still cumbersome. You are advised to configure public key access. Check whether you have generated a public key file before. If not, you need to manually generate one

Windows: In Windows, check whether the id_rsa, id_rsa.pub files exist in drive C > User > User name >.ssh

MAC: in /Users/${own user name}/.ssh folder

Ssh-keygen -t rsa -c "[email protected]" -t Specifies the key type, which is RSA by default. You can omit the -c comment text, such as youremail addressCopy the code

The directory containing id_rsa (private key) and id_rsa.pub (public key) has been generated.

Win10 PowerShell, Linux, Mac is able to directly use these 2 commands, but Win7 does not support

To log in, add the public key to the ~/.ssh/authorized_keys file on the Linux server

The SSH command format is as follows. The port number is 22 by default

SSH -p < port > < username >@<IP address >Copy the code

If the local user name is the same as the remote user name, even the user name can be omitted

#Log in to the Hadoop1 server
ssh hadoop@hadoop1
#Log in as a Hadoop user from hadoop1 server to Hadoop2 server
ssh hadoop2
Copy the code

The SCP command format is as follows. The default value is 22

SCP -p < port > <filename> < username >@<IP address >:< destination directory >Copy the code

If you’ve ever been in a cluster, such as a Hadoop cluster, you’ll know that these two commands are a great way to quickly switch between servers and distribute environment variables and configurations.

Of course, it is also useful in real development, if you want to upload your JAR packages to the test environment. You can submit the code to GitLab and have Jenkins publish it automatically or manually.

However, my habit is to test myself before submitting the code, so I usually run the script manually to upload the JAR package to the server

Win the script

deploy.bat

call mvn clean package -DskipTests=true cd ./build/libs scp demo.jar username@ip:/opt/application/ cd .. /.. / @pauseCopy the code

MAC script

Command line tool

I use Xshell on Win and SecurtCRT on MAC (no Xshell on MAC, really hurt). SecurtCRT has a super easy to use function, select that copy, right click that paste, and then use Ctrl+C and Ctrl+V. Xshell also supports this functionality, but you need to set up a wave

Tools -> OptionsRight-click to paste content, and select Automatically copy the selected text to the clipboard At this point, select that copy, right click that paste, super convenient

Xshell executes the same command in multiple Windows

Executing commands in a cluster makes it easy to check view -> Write -> WriteIn the sidebar below, select all sessions, and commands executed in the sidebar will be executed on all tabs that are currently open

Alias various commands

It works on both Linux and Mac

You can define an alias for Linux commands that you often use but that are too long (for example, entering a deep project deployment directory)

Alias defined at the system level

All users can use this alias

For example, if you want to use SSH to switch to server 21, configure the alias

echo "alias go21='ssh mosh@21'">>/etc/profile
source /etc/profile
Copy the code

If you’re not comfortable with this, just open the /etc/profile file and add alias go21=’ SSH mosh@21 ‘to the file. In this case, just execute go21 and don’t forget source, and you can jump directly to the server 21. You can also configure an alias like the following

Alias tozo = 'CD/root/zookeeper - 3.4.12 / bin'Copy the code

The tozo command goes directly to the /root/zookeeper-3.4.12/bin directory.

An alias defined at the user level

Only the current user can use this file, but the configuration file is different from /etc/profile to ~/.bash_profile

echo "alias go21='ssh mosh@21'">>~/.bash_profile
source /etc/profile
Copy the code

JSON

Browser formats display JSON

Format and display JSON in Chrome with various plugins such as JSONView. However, the jSON-Handle I have used is the best one. The page is beautiful and you can edit and copy on the right side of the browser, which is really cool.


Edit JSON Format JSON

Recommend 2 websites I use most, the most obvious feature is powerful, no advertising

Web site:jsoneditoronline.org/

When writing interface documents, I often need to edit JSON, and the one I use most often is json Editor Online

JSON is easy to write, and the format is validated in real time, showing crosses to the left when errors occur. Of course, you can also format JSON with this tool, but the appearance level is not too high.

Web site:codebeautify.org/jsonviewer

It’s a super powerful site, just take a look and see how powerful it is.You think, you don’t think, it has

All kinds of file format conversion all kinds of picture format conversion all kinds of file verification, comparison…

Postman

There is a Chrome plugin, but you are advised to download one, and many people use only a fraction of postman’s functionality

Save the interface export as a file

Postman has login function. It is suggested to put a Collection for each project, indicating the function of each interface, so that the account can be sent to the test after self-testing, and the test does not need to reconstruct request parameters by itself. Or export your Collection to a file for someone else to importIn addition, the requested URL should be written to support multi-environment switching. Because the domain name of the development environment and the test environment are different, but the subsequent request path is the same.

Multi-environment Configuration

It can be seen that I have configured three environments now. Switch the environment and click the drop-down box to select it. Click the configuration button at the back to configure the environment

Base_url was used in the previous request path and is equivalent to a key, and this configuration is equivalent to a map

Test login interface

Nowadays, many enterprises login users based on cookies and sessions, testing some need to login interface. I saw one of my colleagues do it earlier, and, seriously, it really showed me

  1. First log in to the system and get the cookie value from the request head of the interface
  2. Paste the value of this cookie into the header of the Postman request
  3. Send request test interface

I’ll send you a picture, you can probably think of the position SAO operation

In Postman, all you have to do is ask for the login interface first, and the cookie will be automatically added to the interface after the request, so you don’t have to paste the header every time. You don’t have to click on the login interface again until the cookie expires, just keep testing

As long as a website has set a cookie, subsequent requests will automatically carry the set cookie, the browser is the same, postman, do not need to manually paste

drawing

ProcessOn

Website: www.processon.com/

Chinese development of online drawing procedures, the renderings are as follows

drawio

Website: www.draw.io/

This is an online drawing program developed by foreigners Xmind

Website: www.xmind.cn

A commonly used mind mapping tool

markdown

Typora

One of the most visually advanced Markdown editors, this may be a bit of a shock for beginners, as it shows the effects in real time while editing the page. It’s good to get used to it, but it can’t be saved to the cloud server

Impression of notes

A very well-known software, left to write, right preview. Can be saved to the cloud server, support multi-terminal. Markdown, mind mapping are supported, but they have to be expensive to use

code

Share code with pictures

Address: carbon. Now. Sh /

The main purpose of this is to export the code as an image, which is easy to distribute to multiple platforms, so that the format of the image is not messy border, font and style can be adjusted (I usually remove both border and style, so that the code looks bigger).

Use web pages to share code

Address: paste.ubuntu.com/

Sometimes when I want others to see the code, I send it to them through chat tools, and the format will be messy, so I usually post the code on the web page for others to see

Data structures and algorithms

Cattle from

Website: www.nowcoder.com/

There is nothing wrong with visiting this website

LeetCode

Address: leetcode-cn.com/

It’s a site where you can find all kinds of algorithmic questions that you’ve been asked during your interview,And it’s the original problem

Other useful websites

Love course

Address: www.icourse163.org/

I used to watch it when I was in school, and many universities have it in open courses

Stack Overflow

Address: stackoverflow.com/

Many of the problems encountered are well explained

Redis command reference

Address: redisdoc.com/

Redis’s various commands are explained in super detail, with lots of demos

The lab building

Website: www.shiyanlou.com/

Learn Linux and Git, etc., with the experimental floor can not be too cool, online to provide you with the environment and test questions, is to let you practice

Java knowledge sharing network

Website: www.java1234.com/

Many books are available as PDF downloads

Linux command

Web site:man.linuxde.net/

Other utility tools

Leak check

This is used in many enterprises to manage the code quality. Many inelegant writing methods in the code can be checked out. It can be integrated with gitLab and strongly recommended to use it

Web site:www.sonarqube.org/

API Management Tools

API management tools I have used include Wiki, Wordfinch, Yapi, SwaggerWiki is a text tool. Yapi is an open source project to manage apis. Swagger writes comments directly in code and then exports documentation.

I think whisperer and Swagger are better. The Language Sparrow supports Markdown syntax, and the page is nice. Swagger is friendly to the front end and easy to debug, and the back end does not need to write interface documentation, but it is somewhat intrusive to the back end code, in fact, I think it is also ok.

If swagger open source version request entry is in form form, I can write swagger annotation (for writing annotation) and Spring MVC annotation (for requesting mapping), but our infrastructure group rewrote Spring MVC parameter parser, only need to use one annotation, support annotation, request mapping, Invalid parameters return JSON message, do not need to manually verify, super convenient. At the same time, Swagger is integrated into the company’s single sign-on, test sign-on interface is also very convenient.

Chrome plug-ins

Octotree

Display code in a tree structure, click to jump directly to the directory, this is the best use, so the top

Sourcegraph

Click View Repository on the RepositoryHierarchical display, view references, view definitions, automatic jump, common operations on the IDE basically have

Isometric Contributions

Replace the chart below with a bar chart to measure your workload

Enhanced Github

Display file sizes, download individual files separately, and copy file contents to clipboard

Awesome Autocomplete for GitHub

Match search results in real time to make the search faster

GitHub Hovercard

Presents an overview of author, repository, Issues, Pull requests in a floating box

Mac

Software download

Address: xclient info /

If you have ever used a Mac, you probably know this website. If you have changed from Win, you can collect a lot of useful tools

Git

Git Bash, Git Gui, Git Sourcetree, etc. The most commonly used Git tools are Git Bash, Git Gui, Git Sourcetree, etc

Use Git in IDEA

Git’s many commands can be implemented in IDEA without using the command line. Here is a demonstration of how to use the graphical interface to improve the efficiency of the part of the IDEA 2019

Upload code

Add only a. Gitignore file and a readme. md file command line commit

git add .
git commit -m "Project initialization"
git push origin master
Copy the code

The IDEA to submitClick the green check box in the upper right cornerPop-up dialog boxThe upper left box shows the changed files (shown later) and the new files. The changes and new contents are displayed below, and the changed files are displayed in comparison (very convenient).

Git Commit -m “project initialization”If you right-click anywhere in the project ->git->Repository->Push, you will find that the shortcut key for Push is Ctrl+Shift+K. This shortcut key will conflict with input method, so I usually set Push command as tool bar, which is super convenient to use

The steps are as follows: File-SettingsLocate the location as shown and click Add ActionPop-up dialog box, click the position shown in the pictureClick the location shown in the pictureThe order of the buttons can be adjusted by clicking the up and down buttons above. I put push after Commit

You can see the push button on the Tool BarYou can modify remote and Branch by clicking the push buttonI’m gonna hit Push

In the demo, to modify the code, I’ll modify the README description and click the Commit buttonIdea is displayed below, and the modified content is displayed in another background color, which is very convenient to see what we have modified

Pull the code

When we want to pull the latest code from the remote repository

Command line pull

git pull origin master
Copy the code

The IDEA of pull Click the Pull buttonBy default, click OK to stop showing this dialog box

Version back

Click the button on the clock to display all submissions. Versioning can be done in one of two ways: revert

Blog.csdn.net/zzti_erlie/…

Right-click the version you want to roll back and click the button belowPop-up dialog boxClick Commit, you don’t even need to write a Commit message, and click push

Switch branches, tag, commit

To switch between a local branch and a remote branch, just click the Checkout tag or button for a commitTo demonstrate switching to a COMMIT, copy the version value firstClick the Checkout Tag or button to pop up the dialog box and paste the value you just copied

Welcome to attention

Refer to the blog