-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
79 changed files
with
1,397 additions
and
253 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,7 @@ tags: | |
--- | ||
|
||
# AI Service | ||
|
||
- [OpenAI](./openai/README.md) | ||
- anthropic | ||
- claude |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
title: Monte-Carlo | ||
--- | ||
|
||
# Monte-Carlo | ||
|
||
- 参考 | ||
- [Monte-Carlo graph search from first principles](https://github.com/lightvector/KataGo/blob/master/docs/GraphSearch.md) | ||
- [HN](https://news.ycombinator.com/item?id=39662698) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,183 @@ | ||
--- | ||
tags: | ||
- API | ||
--- | ||
|
||
# Auth API | ||
|
||
- API Keys | ||
- Basic Auth | ||
- OAuth 2.0 | ||
- HMAC | ||
- 参考 | ||
- [simov/grant](https://github.com/simov/grant) | ||
- JS | ||
- OAuth Proxy | ||
- [simov/purest](https://github.com/simov/purest) | ||
- REST API Client Library | ||
- https://docs.strapi.io/dev-docs/plugins/users-permissions | ||
- https://docs.directus.io/reference/authentication.html | ||
|
||
## strapi | ||
|
||
- Login /api/auth/local | ||
- /connect/github/redirect | ||
- `/api/connect/${provider}` | ||
- `/api/auth/${provider}/callback` | ||
- `/api/auth/forgot-password` | ||
- `/api/auth/reset-password` | ||
- `/api/auth/send-email-confirmation` | ||
- `/api/auth/email-confirmation?confirmation=TOKEN` | ||
|
||
``` | ||
POST /api/auth/local/register | ||
``` | ||
|
||
```json | ||
{ | ||
"username": "Strapi user", | ||
"email": "[email protected]", | ||
"password": "strapiPassword" | ||
} | ||
``` | ||
|
||
**修改密码** | ||
|
||
``` | ||
POST /api/auth/change-password | ||
``` | ||
|
||
```json | ||
{ | ||
"currentPassword": "currentPassword", | ||
"password": "userNewPassword", | ||
"passwordConfirmation": "userNewPassword" | ||
} | ||
``` | ||
|
||
## directus | ||
|
||
### access token | ||
|
||
- by header | ||
- by cookie | ||
- by query | ||
|
||
``` | ||
Authorization: Bearer <token> | ||
Cookie: directus_session_token=<token> | ||
``` | ||
|
||
``` | ||
?access_token=<token> | ||
``` | ||
|
||
### login | ||
|
||
``` | ||
POST /auth/login | ||
POST /auth/login/provider | ||
``` | ||
|
||
```json | ||
{ | ||
"email": "[email protected]", | ||
"password": "password", | ||
"otp": "123456", | ||
"mode": "jsoncookie|session" | ||
} | ||
``` | ||
|
||
```json | ||
{ | ||
"access_token": "", | ||
"expires": 7200, | ||
"refresh_token": "" | ||
} | ||
``` | ||
|
||
### refresh | ||
|
||
``` | ||
POST /auth/refresh | ||
``` | ||
|
||
```json | ||
{ | ||
"refresh_token": "refresh_token_string", | ||
"mode": "json|cookie|session" | ||
} | ||
``` | ||
|
||
```json | ||
{ | ||
"access_token": "", | ||
"expires": 7200, | ||
"refresh_token": "" | ||
} | ||
``` | ||
|
||
### logout | ||
|
||
``` | ||
POST /auth/logout | ||
``` | ||
|
||
```json | ||
{ | ||
"refresh_token": "refresh_token", | ||
"mode": "json" | ||
} | ||
``` | ||
|
||
### password reset | ||
|
||
``` | ||
POST /auth/password/request | ||
``` | ||
|
||
```json | ||
{ | ||
"email": "user_email", | ||
"reset_url": "" | ||
} | ||
``` | ||
|
||
``` | ||
POST /auth/password/reset | ||
``` | ||
|
||
```json | ||
{ | ||
"token": "password_reset_token", | ||
"password": "password" | ||
} | ||
``` | ||
|
||
### providers | ||
|
||
``` | ||
GET /auth | ||
``` | ||
|
||
```json | ||
{ | ||
"data": [ | ||
{ | ||
"name": "GitHub", | ||
"driver": "oauth2", | ||
"icon": "github" | ||
}, | ||
{ | ||
"name": "Google", | ||
"driver": "openid", | ||
"icon": "google" | ||
}, | ||
{ | ||
"name": "Okta", | ||
"driver": "openid" | ||
} | ||
], | ||
"disableDefault": false | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
--- | ||
tags: | ||
- ERP | ||
--- | ||
|
||
# Design ERP | ||
|
||
## Resource | ||
|
||
- Resource - 资源 | ||
- 通用概念 | ||
- 主要实体都是资源 - 非主要实体例如: 中间表,中间实体 | ||
- 基本操作 | ||
- 增删改查 | ||
- Owner - 管理者 分配、认领 - 个人 释放、转移 | ||
- 导入导出 | ||
- 扩展关联 | ||
- label - 标签 - 预定义 | ||
- tags - 标记 - 自定义 - 任意字符串 | ||
- task - 任务 - 资源可能被关联到任务 | ||
- activity - 活动 | ||
- comment - 评论 | ||
- 视图 | ||
- 列表 - List | ||
- 详情 - View/Detail | ||
- Resource Overview + 多 Tab 视图 | ||
- Summary | ||
- 基本信息加活动跟进 | ||
- Detail | ||
- Activity | ||
- File | ||
- 创建表单 | ||
- 编辑表单 - 如果是 inline 编辑可能会不太一样 | ||
- Mention - 提及 - 显示被关联引用 | ||
- Select/Picker - 选择关联引用 | ||
- Popup/Overview/Profile - 弹出层预览 | ||
|
||
## CRM | ||
|
||
- 面向销售 | ||
- 核心实体 | ||
- Account - 客户 | ||
- Contact - 联系人 | ||
- Lead - 潜在客户 | ||
- Opportunity - 商机 | ||
- Activity - 活动 | ||
- 辅助 | ||
- Order - 销售订单 | ||
- Product - 产品 | ||
- 公共 | ||
- Task - 任务 | ||
- Event - 事件 | ||
- Note - 备注 | ||
- Attachment - 附件 | ||
- Comment - 评论 | ||
|
||
## UI 状态 | ||
|
||
- Nothing/Before - An empty element | ||
- https://emptystat.es/ | ||
- Loading - A fetch is happening | ||
- None - No items returned | ||
- One - A single item comes back | ||
- Some - A few items comes back | ||
- Too Many - Too many items, need pagination (or similar) | ||
- Incorrect - An error occurred | ||
- Correct - A success happened | ||
- Done - The operation finished |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
title: IAM | ||
--- | ||
|
||
# IAM | ||
|
||
- IAM -> Identity and Access Management | ||
|
||
## Google Cloud Platform IAM | ||
|
||
- 角色 | ||
- 名称 | ||
- 说明 | ||
- ID | ||
- 角色发布阶段 | ||
- 权限 | ||
- 类型 | ||
- 自定义 | ||
- 预定义 | ||
- 状态 | ||
- 已启用 | ||
- 已停用 | ||
- 待删除 | ||
- 权限 | ||
- 名称 | ||
- 服务 | ||
- 类型 | ||
- appengine.applications.create | ||
- 服务: appengine | ||
- 资源: applications | ||
- 操作: create |
Oops, something went wrong.