To do a good job, he must sharpen his tools. — Analects of Confucius

google

  • Extend the chrome: / / extensions
    • Vimium
    • Youdao Cloud web page scissors
  • Tabs & Windows
operation shortcuts
Open a new window ⌘ + n
Opens a new window in traceless mode ⌘ + Shift + n
Open a new TAB ⌘ + t
Reopen the last closed TAB ⌘ + Shift + t
Open the home page in the current TAB ⌘ + Shift + h
Jumps to a specific TAB ⌘ + 1 to ⌘ + 8
Jump to the last TAB ⌘ + 9
Close the current TAB ⌘ + w
Close current window ⌘ + Shift + w
Minimize window ⌘ + m
Hide the Google Chrome ⌘ + h.
Reload the current page ⌘ + r
Reload current web page (ignoring cached contents) ⌘ + Shift + r
Stop loading webpage Esc
Print current web page ⌘ + p
Save the current page ⌘ + s
Send the current web page by email ⌘ + Shift + I
  • View & Search
operation shortcuts
Enable or disable the full-screen mode ⌘ + Ctrl + F
Zoom in on everything on the page ⌘ and +
Zoom out on everything on your web page ⌘ and –
Restore all content on the web page to its default size ⌘ + 0
Scroll down the page, one screen at a time The blank space key
Scroll up the page, one screen at a time Shift + spacebar
Jump to the address bar ⌘ + L
Current page search ⌘ + f
Jump to the next item that matches the search term in the lookup bar ⌘ + g
Jumps to the last item that matches the search term in the lookup bar ⌘ + Shift + g
The Internet search ⌘ + Option + f
  • The function keys
operation shortcuts
Shows or hides the bookmarks bar ⌘ + Shift + b
Save the current web page as a bookmark ⌘ + d
Save all open tabs as bookmarks in a new folder ⌘ + Shift + D
Open the bookmark Manager ⌘ + Option + b
Open the Settings page in a new TAB ⌘ +,
Open the History page in a new TAB ⌘ + y
Open the Download Content page in a new TAB ⌘ + Shift + j
Open the Clear Browsing Data option ⌘ + Shift + Delete
Log in using another account or browse as a guest ⌘ + Shift + m
Open developer Tools ⌘ + Option + I
Display the HTML source code for the current web page (non-modifiable) ⌘ + Option + u
Open up the JavaScript console ⌘ + Option + j

terminal

If Use Option as Meta Key is selected on the Keyboard, Use the Option == Alt key

mobile a e xx b f
ctrl+a Move the beginning of a line
ctrl+e Move the end of each line
ctrl+xx Move between the beginning and end of the line
ctrl+b Move left one character
ctrl+f Move right one character
alt +b Move one word to the left
alt +f Move one word to the right
search r g p n
ctrl + r Search for the history command and Enter the ESC command
ctrl+g Exit history search
ctrl + p Displays the last command
ctrl+n Displays the next command
delete h w d u k _
ctl+h Delete the character on the left
ctrl+d Delete the character on the right, no self-character exit the system
ctrl+u Deletes all characters to the left of the cursor
ctrl+k Deletes all characters to the right of the cursor
alt+d Delete the words on the right
ctrl+w Delete the word on the left
ctrl+_ Cancel the operation
Ctrl+l Clear the screen
Ctrl+r Search history command
Ctrl+z The current process runs fg in the background to restore the Disown background
Ctrl+d Exit the current shell when no command is used
# set terminal prompt PS1
# User directory (branch)
function git_br() {
	local git_branch
	ls .git &> /dev/null
	if[$? == 0];then
		git_branch=$(git branch | grep ^* | awk '{print $2}')
                git_branch="($git_branch)"
	else
		git_branch=' '
	fi
        echo $git_branch
}

# h host u user W directory $Default prompt
#PS1='\h:\u \W\$ '
export PS1='\u \W$(git_br)\$ '
export CLICOLOR=1
# dark blue
export LSCOLORS=gxfxcxdxbxegedabagacad

# alias
alias gitee='cd /data/go/src/gitee.com/feareless11'
alias github='cd /data/go/src/github.com'
Copy the code

Mac

operation instructions
Ctrl + Command + Q Lock screen
Cmd + Shift + 4 Mac screenshots
The enter key rename
Command on the right The Windows key
sudo scutil –set HostName newName Setting the host Name
open / Quick directory opening
After starting up, hold down CMD + Shift + R to enter resetPasswd To reset your password

vscode

  • Plug-in: start memory consumption, not banned
    • Markdown-toc, SFTP, draw. IO, and Restclient
 # centos
 sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
 sudo sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=ht tps://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/vscode.repo'
 
 yum check-update
 sudo yum install code
Copy the code
instructions operation
Create a file CTRL + n, ⌘ n
Close the file ctrl+w
Save the file ctrl+s
Create the vscode window ctrl+shift+n
Close the vscode window ctrl+shift+w
The main command ctrl+shift+p
Jump directly to the file Enter the file name after CTRL + P
Lists the current executable actions CTRL + P, enter?
Jumps to the specified number of rows After CTRL + P, enter:
Jumps to a specified function or variable Enter @ after CTRL + P
File switch CRTL + TAB or Alt + left and right arrows
View function definitions alt+F12
MAC back ctrl+-
MAC forward ctrl+shift+-
Open your browser quickly alt+shfit+b
Formatting code shift+alt+f
According to the left ctrl+B
Open a terminal ctrl+`
Quickly generate HTML documents ! + enter
Gitbash enters the directory and quickly calls VScode to open the directory code .
Run code debugging F5 double-click
To set breakpoints F9
Skip to function definition F12
  • The plug-in configuration

    # add-on: F1 or CTRL + Shift + P, type Extensions:Install Extension -- > Menu File - Preferences - user-extensions - go-edit in settings.json {"window.zoomLevel": 0."files.autoSave": "off"."files.eol": "\n"."editor.columnSelection": false."editor.fontSize": 20."editor.formatOnSave": true."editor.codeActionsOnSave": {
        "source.fixAll": true
      },
      "editor.renderWhitespace": "all"."editor.minimap.enabled": true."breadcrumbs.enabled": true."debug.allowBreakpointsEverywhere": true."git.path": "D:\\Program Files (x86)\\Git\\cmd\\git.exe"."go.gopath": "D:\\gohome"."go.goroot": "D:\\Program Files (x86)\\go"."go.buildOnSave": "package"."go.lintOnSave": "package"."go.formatTool": "goimports"."go.useCodeSnippetsOnFunctionSuggest": true."go.useLanguageServer": false."go.useGoProxyToCheckForToolUpdates": true."eslint.validate": [
        "javascript"."javascriptreact"."html",]."python.linting.flake8Enabled": true."python.formatting.provider": "yapf"."python.linting.flake8Args": [
        "--max-line-length=248"]."python.linting.pylintEnabled": false,}Copy the code
  • Plug-in SFTP

    # workspace. Vscode /sftp.json {# alias for the remote directory"name": "vue"."host": "192.168.56.101"."protocol": "sftp"."port": 22."username": "root"."password": "root123456", # default vscode workspace directory, set the directory to synchronize"context": "D:\\gohome\\src\\github.com\\didi\\nightingale", # sync to the directory on the remote machine"remotePath": "/data/vue", # save upload"uploadOnSave": true, # ignore files are not uploaded"ignore": [
            ".vscode".".git".".DS_Store"], # listen, rename files or delete synchronous updates"watcher": {
            "files": "* * / *"."autoUpload": true."autoDelete": true}, # support synchronization of different Git branches to different hosts"profiles": {
            "dev": {
                "host": "192.168.56.101"."remotePath": "/data/vue"."uploadOnSave": true
            },
            "master": {
                "host": "192.168.56.101"."remotePath": "/data/vue2"}},"defaultProfile": "master"
    }
    Copy the code
  • Plug-in REST Client

    # Similar to Postman, supports cURL and RFC2616CURL -x GET: you can automatically generate code for the following language: CTRL + Alt + C: you can automatically generate code for the following language: cURL -x GET: you can automatically generate code for the following language"http://alert.zhenaioa.com/api/v1/users"
    
    ### Basic Auth
    GET https:/ / httpbin.org/basic-auth/user/passwd HTTP / 1.1
    Authorization: Basic user:passwd
    
    ### RFC 2016 POST
    POST http:/ / alert.oa.com/api/v1/alert HTTP / 1.1
    User-Agent: rest-client
    Content-Type: application/json
    Authorization: token xxx
    
    {
        "alertname": "vscode-REST-client"."from": "Test"."level" : "I"."txt": "ok"} # # # custom Environment variables # # branch according to the different Environment to distinguish the variables in the Settings. The json rest - client. EnvironmentVariables set a GET HTTP:/ / {{host}} / API / {{version}} / users HTTP / 1.1
    Authorization: {{token}}
    
    ### file variables
    @hostname = alert.oa.com
    @port = 8080
    ### 
    @name = hello
    GET https:/ / {{the hostname}}, {{port}} / authors / {{name}} HTTP / 1.1Declare the Request before sending it// @name requestName or # @name requestName
    @baseUrl = https://example.com/api
    
    # @name login
    POST {{baseUrl}}/api/login HTTP/1.1
    Content-Type: application/x-www-form-urlencoded
    
    name=foo&password=bar
    
    ###
    @authToken = {{login.response.headers.X-AuthToken}}
    
    # @name createComment
    POST {{baseUrl}}/comments HTTP/1.1
    Authorization: {{authToken}}
    Content-Type: application/json
    
    {
        "content": "fake content"
    }
    
    ### system variables
    # {{$processEnv [%]envVarName}}: local machine environment variable
    # {{$dotenv [%]variableName}}: the .env file value 
    # {{$timestamp [offset option]}}: Add UTC timestamp of now. 
    # {{$datetime rfc1123|iso8601|"custom format"|'custom format' [offset option]}}: Add a datetime string in either ISO8601, RFC1123 or a custom display format. 
    # {{$localDatetime rfc1123|iso8601|"custom format"|'custom format' [offset option]}}: Similar to $datetime except that $localDatetime returns a time string in your local time zone.
    
    # {{$timestamp -3 h}} : 3 hours ago
    # {{$timestamp 2 d}} : tthe day after tomorrow
    POST https:/ / api.example.com/comments HTTP / 1.1
    Content-Type: application/xml
    Date: {{$datetime rfc1123}}
    
    {  
        "SECRET": "{{$processEnv SECRET}}"."user_name": "{{$dotenv USERNAME}}"."request_id": "{{$guid}}"."updated_at": "{{$timestamp}}"."created_at": "{{$timestamp -1 d}}"."review_count": "{{$randomInt 5 200}}"."custom_date": "{{$datetime 'YYYY-MM-DD'}}"."local_custom_date": "{{$localDatetime 'YYYY-MM-DD'}}"
    }
    Copy the code