Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
wenerme committed Mar 14, 2024
1 parent 6e203e9 commit f5e9e23
Show file tree
Hide file tree
Showing 79 changed files with 1,397 additions and 253 deletions.
2 changes: 1 addition & 1 deletion notes/ai/ai-awesome.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ tags:
- [janhq/jan](https://github.com/janhq/jan)
- AGPLv3, Typescript
- source alternative to ChatGPT that runs 100% offline
- [Hannibal046/Awesome-LLM](https://github.com/Hannibal046/Awesome-LLM)

## LLaMA

Expand Down Expand Up @@ -308,7 +309,6 @@ tags:

## Awesome


- [webpilot-ai/Webpilot](https://github.com/webpilot-ai/Webpilot)
- GPLv3
- [outlines-dev/outlines](https://github.com/outlines-dev/outlines)
Expand Down
4 changes: 4 additions & 0 deletions notes/ai/service/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@ tags:
---

# AI Service

- [OpenAI](./openai/README.md)
- anthropic
- claude
9 changes: 9 additions & 0 deletions notes/algorithm/monte-carlo.md
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)
10 changes: 10 additions & 0 deletions notes/db/relational/mssql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,13 @@ title: MSSQL
| 1433 | default |
| 1434 | browser service |

## 备份

- .bkf
- ntbackup 工具
- [geocar/mtftar](https://github.com/geocar/mtftar)
- .bkf -> tar

```
Windows NTbackup archive NT, with file catalog, soft size 1*512, software (0x1200): Microsoft SQL Server
```
4 changes: 4 additions & 0 deletions notes/db/relational/postgresql/postgresql-faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -890,3 +890,7 @@ on conflict(value) do update set (label)= (excluded.label);
```
on conflict(value) do update set (label,extensions)= (excluded.label,excluded.extensions);
```

## for update nowait - FOR UPDATE cannot be applied to the nullable side of an outer join

- mikroorm LockMode.PESSIMISTIC_WRITE_OR_FAIL
183 changes: 183 additions & 0 deletions notes/dev/design/design-auth-api.md
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
}
```
68 changes: 68 additions & 0 deletions notes/dev/design/design-erp.md
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
31 changes: 31 additions & 0 deletions notes/dev/design/design-iam.md
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
Loading

0 comments on commit f5e9e23

Please sign in to comment.