GitHub 2021 年 9 月热门 Golang 项目

gokart

url

https://github.com/praetorian-inc/gokart

简介

A static analysis tool for securing Go code

star 数量

1720

filebrowser

url

https://github.com/filebrowser/filebrowser

简介

📂 Web File Browser

star 数量

12833

podman

url

https://github.com/containers/podman

简介

Podman: A tool for managing OCI containers and pods.

star 数量

10260

cli

url

https://github.com/cli/cli

简介

GitHub’s official command line tool

star 数量

25405

netpoll

url

https://github.com/cloudwego/netpoll

简介

A high-performance non-blocking I/O networking framework, which focused on RPC scenarios, developed by ByteDance.

SSH 配置文件简单指南

前言

如果我们有许多服务器需要连接,并且这些机器存在不同的用户名、端口或者其他的选项,如果在去连接的时候记住这些内容是很麻烦和影响效率的事情。当然我们也可以采用 alias 来简化某些场景下的使用。 本文主要是介绍在 ssh 配置文件中对不同服务器单独设置一些参数(比如端口、用户名)。

【# 01】Just Javascript 笔记

前言 && 心智模型 Mental Model

心智模型

心智模型/心智模式的理论是基于一个试图对某事做出合理解释的个人会发展可行的方法的假设,在有限的领域知识和有限的信息处理能力上,产生合理的解释。心智模型是对思维的高级建构,心智模型表征了主观的知识。通过不同的理解解释了心智模型的概念、特性、功用。心智模型是个体为了要了解和解释他们的经验,所建构的知识结构,该模型受限于个体关于他们经验的内隐理论(Implicit Theories),这可能有很多或很少的正确性。

Nginx location 和 proxy_pass

Location

Nginx location 用于匹配请求 URI,匹配上之后按照其定义的方式对该请求进行处理。loacation 官方说明

语法

1
2
3
4
Syntax:	location [ = | ~ | ~* | ^~ ] uri { ... }
location @name { ... }
Default:	—
Context:	server, location

匹配命令

参数/修饰符说明
location 后没有参数直接跟着 标准 URI,表示前缀匹配,代表跟请求中的 URI 从头开始匹配。
=精确匹配,用于标准 URI 前,要求请求字符串与其精准匹配,成功则立即处理,Nginx 停止搜索其他匹配。
~用于正则 URI 前,表示 URI 包含正则表达式, 区分大小写
~*用于正则 URI 前, 表示 URI 包含正则表达式, 不区分大小写
^~用于标准 URI 前,最长非正则匹配,并要求一旦匹配到就会立即处理,不再去匹配其他的。
@@ 定义一个命名的 location,@ 定义的locaiton名字一般用在内部定向,例如error_page, try_files命令中。它的功能类似于编程中的goto。
/通用匹配, 如果没有其它匹配,任何请求都会匹配到

匹配顺序

To find location matching a given request, nginx first checks locations defined using the prefix strings (prefix locations). Among them, the location with the longest matching prefix is selected and remembered. Then regular expressions are checked, in the order of their appearance in the configuration file. The search of regular expressions terminates on the first match, and the corresponding configuration is used. If no match with a regular expression is found then the configuration of the prefix location remembered earlier is used.