diff --git a/notes/ai/ai-faq.md b/notes/ai/ai-faq.md index 34752dd8140..8a7bd5ea096 100644 --- a/notes/ai/ai-faq.md +++ b/notes/ai/ai-faq.md @@ -21,3 +21,9 @@ tags: - DL 是实现 ML 的方式之一 - Algorithms - 通用的概念 + +## RAG + +- RAQ - retrieval-augmented generation - 检索增强生成 +- 参考 + - https://research.ibm.com/blog/retrieval-augmented-generation-RAG diff --git a/notes/db/design-schema.md b/notes/db/design-schema.md index b12a51a7854..2de78bdfe1e 100644 --- a/notes/db/design-schema.md +++ b/notes/db/design-schema.md @@ -57,7 +57,7 @@ tags: - timestamp 41bits + instance 10bits + sequence 12bits - sequence - 4096 个 - 正常 1ms 内达到了会递增 timestamp - **需要维护全局状态** - 69 years - - timestamp 通过 offset 调整 - e.g `(2023-1970)*31536000*1000` + - timestamp 通过 offset 调整 - e.g `(2023-1970)*31536000*1000` - instance - Machine ID - 注意选择,通常使用 IP/Hostname/Mac - AmazonEC2MachineID @@ -120,6 +120,23 @@ a-1-b-0 > - 元数据不要用于业务依赖 > - 可以创建模板表然后 CREATE TABLE LIKE +| column | for | +| ---------- | -------------------------------------------------------- | +| id | 主键 | +| sid | 租户维度单调递增 - 用户友好 | +| tid | 租户 ID | +| eid | 用于导入数据关联 - tid+eid 唯一 | +| cid | 外部系统租户 ID - Colocate ID/Corp ID - tid+cid+rid 唯一 | +| rid | 外部系统资源 ID - Ref ID/Relative ID | +| created_at | +| updated_at | +| deleted_at | +| version | 基于版本的乐观锁 | +| metadata | 补充数据 | +| attributes | 使用端自定义数据 - 客户端 读写 | +| properties | 服务端自定义数据 - 客户端 只读 | +| extensions | 内部扩展数据 - 客户端 不可见 | + ```sql create table tpl_res ( diff --git a/notes/dev/design/design-auth.md b/notes/dev/design/design-auth.md index b27950002d9..ad9e4c368d3 100644 --- a/notes/dev/design/design-auth.md +++ b/notes/dev/design/design-auth.md @@ -32,7 +32,9 @@ title: Auth - Bearer RFC6750 - PAT - Persional Access Token - Bearer - Opaque 的内容 -- JWT 对 Token 内容做第一 +- JWT 对 Token 内容做定义 +- ACL + - Subject, Object, Action, Condition, Effect, Priority - 参考 - [Swagger Aith](https://swagger.io/docs/specification/authentication/) @@ -65,3 +67,17 @@ OpenAI-Organization: $ORG_ID - client_id + client_secret - grant=client_credential -> AccessToken - 可以获取用户相关的 AccessToken + +## Principal vs Subject + +- Subject - 访问主体 - 请求访问对象或者执行操作的发起方 + - 通用概念 - 更抽象 + - 主动发起 + - 当前状态 + - 使用场景: ACL, 临时授权, 主体隔离, 代理访问, 会话管理, 审计跟踪 + - 常见主体: User, Department, Customer, Process, Group, Service Account, System, Device +- Principal - 明确身份 + - 是一个验证过的身份,通常是一个指定的用户 - 更具体 + - 被动绑定 + - 持久标识 + - 使用场景: 认证, 授权, 跟踪审计, 身份隔离, 权限委托, 资源归属, 责任追究, 长会话 diff --git a/notes/dev/design/design-workflow.md b/notes/dev/design/design-workflow.md index c6973c8f125..d45a64c8d6a 100644 --- a/notes/dev/design/design-workflow.md +++ b/notes/dev/design/design-workflow.md @@ -16,3 +16,52 @@ title: Workflow design - argo workflow - n8n - nodered +- Dynamic 365 Customer Engagement + - Workflow=[Process](https://learn.microsoft.com/en-us/dynamics365/customerengagement/on-premises/developer/entities/workflow) + - 基于实体事件创建流程 + - PrimaryEntity - 触发的实体类型 + - 不同事件的开始阶段 + - CreateStage + - DeleteStage + - UpdateStage + - FormId - 可关联一个 Form + - [NewProcess](https://learn.microsoft.com/en-us/dynamics365/customerengagement/on-premises/developer/entities/newprocess?view=op-9-1) + - 流程实例 + - ActiveStageId - 当前阶段 + - ActiveStageStartedOn - 开始时间 + - CompletedOn + - State=Active/Inactive + - Status=Active/Finished/Aborted + - [ProcessStage](https://learn.microsoft.com/en-us/dynamics365/customerengagement/on-premises/developer/entities/processstage?view=op-9-1) + - StageCategory - Qualify, Develop, Propose, Close, Identify, Research, Resolve, Approval + - 分类是固定的,不支持任意流程 + - StageName + - ClientData + - 所有相关实体上有 StageId 字段反向关联 ProcessStage + - lead, products, campaing, opportunity, quote, salesorder, invoice, contract, case, knowledgearticle + +## Workflow vs Flow + +- workflow + - 着重预定义流程 + - 图形化设计 + - 通常在一个系统内部执行 + - 由内部事件触发 + - 使用更广泛 +- flow + - 更强调动态自由流程 + - 可以通过低代码实现 + - 可以跨多个系统和服务 + - 可以通过外部服务触发 + - 出现时间更晚 + +## Stage vs Step + +- Step + - 更加细粒度,强调组成部分 + - 顺序执行 +- Stage + - 可能包含多个 Step + - 不一定顺序执行 + - 比如 CI 里有多个 Stage - Build、Test、Deploy + - 比如销售里有多个阶段 - Qualify, Develop, Propose, Close, Identify diff --git a/notes/dev/editor/jetbrain.md b/notes/dev/editor/jetbrain.md index 6c0e48e3e8f..d11ded17f60 100644 --- a/notes/dev/editor/jetbrain.md +++ b/notes/dev/editor/jetbrain.md @@ -147,3 +147,12 @@ sharedIndex: - 显示使用情况 - 占用更多 CPU - https://www.jetbrains.com/help/rider/Code_Vision.html + +## Cannot connect to already running IDE instance. Exception: Process 621 is still running + +```bash +ls "$HOME/Library/Application Support/JetBrains/IntelliJIdea2023.2" + +ls $HOME/Library/Application\ Support/JetBrains/*/.lock +rm $HOME/Library/Application\ Support/JetBrains/*/.lock +``` diff --git a/notes/dev/format/har.md b/notes/dev/format/har.md new file mode 100644 index 00000000000..35728c06c13 --- /dev/null +++ b/notes/dev/format/har.md @@ -0,0 +1,910 @@ +--- +title: HTTP Archive format +--- + +# har + +- har - HTTP Archive format + - by W3C + - **abandoned** +- adopted by: + - Google Chrome + - Safari + - Firefox + - Charles Proxy + - Fiddler + - Firebug + - Internet Explorer 9 + - Microsoft Edge + - Postman + - OWASP ZAP + - k6 - 记录 HTTP 请求 + - http://www.softwareishard.com/blog/har-adopters/ +- 参考 + - [Everettss/puppeteer-har](https://github.com/Everettss/puppeteer-har) +- 可用于 + - 记录 HTTP 请求 + - 测试、Mock +- JSON-formatted archive file + +```ts +/** + * HTTP Archive 1.2 + * + * http://www.softwareishard.com/blog/har-12-spec + */ +export interface Har { + /** This object represents the root of exported data. */ + log: Log; +} +/** + * This object (`log`) represents the root of exported data. + * + * http://www.softwareishard.com/blog/har-12-spec/#log + */ +export interface Log { + version: string | "1.1"; + creator: Creator; + browser?: Browser | undefined; + /** + * List of all exported (tracked) pages. + * + * _Leave out this field if the application + * does not support grouping by pages._ + * + * There is one `` object for every exported web page and one + * `` object for every HTTP request. + * In case when an HTTP trace tool isn't able to group requests by a page, + * the `` object is empty and individual requests doesn't have a + * parent page. + */ + pages?: Page[] | undefined; + /** List of all exported (tracked) requests. */ + entries: Entry[]; + /** A comment provided by the user or the application. */ + comment?: string | undefined; +} +export interface Creator { + name: string; + version: string; + comment?: string | undefined; +} + +export interface Browser { + name: string; + version: string; + comment?: string | undefined; +} +/** + * This object represents list of exported pages. + * + * http://www.softwareishard.com/blog/har-12-spec/#pages + */ +export interface Page { + /** + * Date and time stamp for the beginning of the page load + * + * (ISO 8601 - `YYYY-MM-DDThh:mm:ss.sTZD`, + * e.g. `2009-07-24T19:20:30.45+01:00`). + */ + startedDateTime: string; + /** + * Unique identifier of a page within the `` (HAR doc). + * Entries use it to refer the parent page. + */ + id: string; + /** Page title. */ + title: string; + /** Detailed timing info about page load */ + pageTimings: PageTiming; + /** A comment provided by the user or the application */ + comment?: string | undefined; + + _adult_site?: number | null | undefined; + + _aft?: number | null | undefined; + + _base_page_cdn?: string | null | undefined; + + _base_page_redirects?: number | null | undefined; + + _base_page_ttfb?: number | null | undefined; + + _browser_main_memory_kb?: number | null | undefined; + + _browser_name?: string | null | undefined; + + _browser_other_private_memory_kb?: number | null | undefined; + + _browser_process_count?: number | null | undefined; + + _browser_version?: string | null | undefined; + + _browser_working_set_kb?: number | null | undefined; + + _bytesIn?: number | null | undefined; + + _bytesInDoc?: number | null | undefined; + + _bytesOut?: number | null | undefined; + + _bytesOutDoc?: number | null | undefined; + + _cached?: number | null | undefined; + + _certificate_bytes?: number | null | undefined; + + _connections?: number | null | undefined; + + _date?: number | null | undefined; + + _docCPUms?: number | null | undefined; + + _docCPUpct?: number | null | undefined; + + _docTime?: number | null | undefined; + + _domContentLoadedEventEnd?: number | null | undefined; + + _domContentLoadedEventStart?: number | null | undefined; + + _domElements?: number | null | undefined; + + _domInteractive?: number | null | undefined; + + _domLoading?: number | null | undefined; + + _domTime?: number | null | undefined; + + _effectiveBps?: number | null | undefined; + + _effectiveBpsDoc?: number | null | undefined; + + _eventName?: string | null | undefined; + + _firstPaint?: number | null | undefined; + + _fixed_viewport?: number | null | undefined; + + _fullyLoaded?: number | null | undefined; + + _fullyLoadedCPUms?: number | null | undefined; + + _fullyLoadedCPUpct?: number | null | undefined; + + _gzip_savings?: number | null | undefined; + + _gzip_total?: number | null | undefined; + + _image_savings?: number | null | undefined; + + _image_total?: number | null | undefined; + + _isResponsive?: number | null | undefined; + + _lastVisualChange?: number | null | undefined; + + _loadEventEnd?: number | null | undefined; + + _loadEventStart?: number | null | undefined; + + _loadTime?: number | null | undefined; + + _minify_savings?: number | null | undefined; + + _minify_total?: number | null | undefined; + + _optimization_checked?: number | null | undefined; + + _pageSpeedVersion?: string | null | undefined; + + _render?: number | null | undefined; + + _requests?: number | null | undefined; + + _requestsDoc?: number | null | undefined; + + _requestsFull?: number | null | undefined; + + _responses_200?: number | null | undefined; + + _responses_404?: number | null | undefined; + + _responses_other?: number | null | undefined; + + _result?: number | null | undefined; + + _run?: number | null | undefined; + + _score_cache?: number | null | undefined; + + _score_cdn?: number | null | undefined; + + _score_combine?: number | null | undefined; + + _score_compress?: number | null | undefined; + + _score_cookies?: number | null | undefined; + + _score_etags?: number | null | undefined; + + _score_gzip?: number | null | undefined; + + '_score_keep-alive'?: number | null | undefined; + + _score_minify?: number | null | undefined; + + _score_progressive_jpeg?: number | null | undefined; + + _server_count?: number | null | undefined; + + _server_rtt?: number | null | undefined; + + _SpeedIndex?: number | null | undefined; + + _step?: number | null | undefined; + + _title?: string | null | undefined; + + _titleTime?: number | null | undefined; + + _TTFB?: number | null | undefined; + + _URL?: string | null | undefined; + + _visualComplete?: number | null | undefined; + /** + * _non-standard_ + * + * See "Custom Fields" under http://www.softwareishard.com/blog/har-12-spec + */ + [customField: `_${string}`]: unknown | null | undefined; +} +/** + * This object describes timings for various events (states) fired during the + * page load. + * + * All times are specified in milliseconds. + * + * If a time info is not available appropriate field is set to `-1`. + * + * http://www.softwareishard.com/blog/har-12-spec/#pageTimings + */ +export interface PageTiming { + /** + * Content of the page loaded. Number of milliseconds since page load + * started (`page.startedDateTime`). + * + * Use `-1` if the timing does not apply to the current request. + */ + onContentLoad?: number | undefined; + /** + * Page is loaded (`onLoad` event fired). Number of milliseconds since + * page load started (`page.startedDateTime`). + * + * Use `-1` if the timing does not apply to the current request. + */ + onLoad?: number | undefined; + /** A comment provided by the user or the application */ + comment?: string | undefined; + _startRender?: number | null | undefined; +} +/** + * _non-standard_ + * + * Data for Chunk as provided by e.g. WebPageTest + */ +export interface Chunk { + bytes: number; + ts: number; +} +/** + * This object represents an array with all exported HTTP requests. Sorting + * entries by `startedDateTime` (starting from the oldest) is preferred way how + * to export data since it can make importing faster. + * However the reader application should always make sure the array is sorted + * (if required for the import). + * + * http://www.softwareishard.com/blog/har-12-spec/#entries + */ +export interface Entry { + /** + * Reference to the parent page. Leave out this field if the application + * does not support grouping by pages. + */ + pageref?: string | undefined; + /** + * Date and time stamp of the request start + * + * (ISO 8601 - `YYYY-MM-DDThh:mm:ss.sTZD`). + */ + startedDateTime: string; + /** + * Total elapsed time of the request in milliseconds. + * + * This is the sum of all timings available in the timings object + * (i.e. not including `-1` values). + */ + time: number; + /** Detailed info about the request. */ + request: Request; + /** Detailed info about the response. */ + response: Response; + /** Info about cache usage. */ + cache: Cache; + /** Detailed timing info about request/response round trip. */ + timings: Timings; + /** + * IP address of the server that was connected + * (result of DNS resolution). + */ + serverIPAddress?: string | undefined; + /** + * Unique ID of the parent TCP/IP connection, can be the client or server + * port number. + * + * Note that a port number doesn't have to be unique identifier + * in cases where the port is shared for more connections. + * + * If the port isn't available for the application, any other unique + * connection ID can be used instead (e.g. connection index). Leave out + * this field if the application doesn't support this info. + */ + connection?: string | undefined; + /** A comment provided by the user or the application */ + comment?: string | undefined; + + _all_end?: number | string | null | undefined; + + _all_ms?: number | string | null | undefined; + + _all_start?: number | string | null | undefined; + + _bytesIn?: number | string | null | undefined; + + _bytesOut?: number | string | null | undefined; + + _cacheControl?: string | null | undefined; + + _cache_time?: number | string | null | undefined; + + _cdn_provider?: string | null | undefined; + + _certificate_bytes?: number | string | null | undefined; + + _chunks?: Chunk[] | null | undefined; + + _client_port?: number | string | null | undefined; + + _connect_end?: number | string | null | undefined; + + _connect_ms?: number | string | null | undefined; + + _connect_start?: number | string | null | undefined; + + _contentEncoding?: string | null | undefined; + + _contentType?: string | null | undefined; + + _dns_end?: number | string | null | undefined; + + _dns_ms?: number | string | null | undefined; + + _dns_start?: number | string | null | undefined; + + _download_end?: number | string | null | undefined; + + _download_ms?: number | string | null | undefined; + + _download_start?: number | string | null | undefined; + + _expires?: string | null | undefined; + + _fromCache?: 'memory' | 'disk' | null | undefined; + + _full_url?: string | null | undefined; + + _gzip_save?: number | string | null | undefined; + + _gzip_total?: number | string | null | undefined; + + _host?: string | null | undefined; + + _http2_stream_dependency?: number | string | null | undefined; + + _http2_stream_exclusive?: number | string | null | undefined; + + _http2_stream_id?: number | string | null | undefined; + + _http2_stream_weight?: number | string | null | undefined; + + _image_save?: number | string | null | undefined; + + _image_total?: number | string | null | undefined; + + _index?: number | null | undefined; + + _initiator?: string | null | undefined; + + _initiator_column?: string | null | undefined; + + _initiator_detail?: string | null | undefined; + + _initiator_function?: string | null | undefined; + + _initiator_line?: string | null | undefined; + + _initiator_type?: string | null | undefined; + + _ip_addr?: string | null | undefined; + + _is_secure?: number | string | null | undefined; + + _jpeg_scan_count?: number | string | null | undefined; + + _load_end?: number | string | null | undefined; + + _load_ms?: number | string | null | undefined; + + _load_start?: number | string | null | undefined; + + _method?: string | null | undefined; + + _minify_save?: number | string | null | undefined; + + _minify_total?: number | string | null | undefined; + + _number?: number | null | undefined; + + _objectSize?: number | string | null | undefined; + + _objectSizeUncompressed?: number | string | null | undefined; + + _priority?: string | null | undefined; + + _protocol?: number | string | null | undefined; + + _request_id?: number | string | null | undefined; + + _resourceType?: + | 'document' + | 'stylesheet' + | 'image' + | 'media' + | 'font' + | 'script' + | 'texttrack' + | 'xhr' + | 'fetch' + | 'prefetch' + | 'eventsource' + | 'websocket' + | 'webtransport' + | 'wasm' + | 'manifest' + | 'signed-exchange' + | 'ping' + | 'csp-violation-report' + | 'other' + | 'preflight' + | 'sm-script' + | 'sm-stylesheet' + | 'webbundle' + | null + | undefined; + + _responseCode?: number | string | null | undefined; + + _score_cache?: number | string | null | undefined; + + _score_cdn?: number | string | null | undefined; + + _score_combine?: number | string | null | undefined; + + _score_compress?: number | string | null | undefined; + + _score_cookies?: number | string | null | undefined; + + _score_etags?: number | string | null | undefined; + + _score_gzip?: number | string | null | undefined; + + '_score_keep-alive'?: number | string | null | undefined; + + _score_minify?: number | string | null | undefined; + + _score_progressive_jpeg?: number | null | undefined; + + _server_count?: number | string | null | undefined; + + _server_rtt?: number | string | null | undefined; + + _socket?: number | string | null | undefined; + + _ssl_end?: number | string | null | undefined; + + _ssl_ms?: number | string | null | undefined; + + _ssl_start?: number | string | null | undefined; + + _ttfb_end?: number | string | null | undefined; + + _ttfb_ms?: number | string | null | undefined; + + _ttfb_start?: number | string | null | undefined; + + _type?: number | string | null | undefined; + + _url?: string | null | undefined; + + _was_pushed?: number | string | null | undefined; + + _initialPriority?: string | null | undefined; + + _renderBlocking?: string | null | undefined; + + _isLCP?: boolean | null | undefined; + + _webSocketMessages?: + | Array<{ + type: 'send' | 'receive'; + time: number; + opcode: number; + data: string; + }> + | null + | undefined; + /** + * _non-standard_ + * + * See "Custom Fields" under http://www.softwareishard.com/blog/har-12-spec + */ + [customField: `_${string}`]: unknown | null | undefined; +} +/** + * This object contains detailed info about performed request. + * + * http://www.softwareishard.com/blog/har-12-spec/#request + */ +export interface Request { + /** Request method (`GET`, `POST`, ...). */ + method: string; + /** Absolute URL of the request (fragments are not included). */ + url: string; + /** Request HTTP Version. */ + httpVersion: string; + /** List of cookie objects. */ + cookies: Cookie[]; + /** List of header objects. */ + headers: Header[]; + /** List of query parameter objects. */ + queryString: QueryString[]; + /** Posted data info. */ + postData?: PostData | undefined; + /** + * Total number of bytes from the start of the HTTP request message until + * (and including) the double CRLF before the body. + * + * Set to `-1` if the info is not available. + */ + headersSize: number; + /** + * Size of the request body (POST data payload) in bytes. + * + * Set to `-1` if the info is not available. + */ + bodySize: number; + /** A comment provided by the user or the application */ + comment?: string | undefined; +} +/** + * This object contains detailed info about the response. + * + * http://www.softwareishard.com/blog/har-12-spec/#response + */ +export interface Response { + /** Response status. */ + status: number; + /** Response status description. */ + statusText: string; + /** Response HTTP Version. */ + httpVersion: string; + /** List of cookie objects. */ + cookies: Cookie[]; + /** List of header objects. */ + headers: Header[]; + /** Details about the response body. */ + content: Content; + /** Redirection target URL from the Location response header. */ + redirectURL: string; + /** + * Total number of bytes from the start of the HTTP response message until + * (and including) the double CRLF before the body. + * + * Set to `-1` if the info is not available. + * + * _The size of received response-headers is computed only from headers + * that are really received from the server. Additional headers appended by + * the browser are not included in this number, but they appear in the list + * of header objects._ + */ + headersSize: number; + /** + * Size of the received response body in bytes. + * + * - Set to zero in case of responses coming from the cache (`304`). + * - Set to `-1` if the info is not available. + */ + bodySize: number; + /** A comment provided by the user or the application */ + comment?: string | undefined; + + _transferSize?: number | null | undefined; +} +/** + * This object contains list of all cookies (used in `request` and `response` + * objects). + * + * http://www.softwareishard.com/blog/har-12-spec/#cookies + */ +export interface Cookie { + /** The name of the cookie. */ + name: string; + /** The cookie value. */ + value: string; + /** The path pertaining to the cookie. */ + path?: string | undefined; + /** The host of the cookie. */ + domain?: string | undefined; + /** + * Cookie expiration time. + * (ISO 8601 - `YYYY-MM-DDThh:mm:ss.sTZD`, + * e.g. `2009-07-24T19:20:30.123+02:00`). + */ + expires?: string | undefined; + /** Set to true if the cookie is HTTP only, false otherwise. */ + httpOnly?: boolean | undefined; + /** True if the cookie was transmitted over ssl, false otherwise. */ + secure?: boolean | undefined; + /** A comment provided by the user or the application */ + comment?: string | undefined; +} + +/** + * This object represents a headers (used in `request` and `response` objects). + * + * http://www.softwareishard.com/blog/har-12-spec/#headers + */ +export interface Header { + name: string; + value: string; + /** A comment provided by the user or the application */ + comment?: string | undefined; +} +/** + * This object represents a parameter & value parsed from a query string, + * if any (embedded in `request` object). + * + * http://www.softwareishard.com/blog/har-12-spec/#queryString + */ +export interface QueryString { + name: string; + value: string; + /** A comment provided by the user or the application */ + comment?: string | undefined; +} +/** + * This object describes posted data, if any (embedded in `request` object). + * + * http://www.softwareishard.com/blog/har-12-spec/#postData + */ +export type PostData = PostDataCommon & (PostDataParams | PostDataText); + +/** + * The common properties of PostData + */ +export interface PostDataCommon { + /** Mime type of posted data. */ + mimeType: string; + /** A comment provided by the user or the application */ + comment?: string | undefined; +} + +/** + * Post data with `params` specified. + */ +export interface PostDataParams { + /** + * List of posted parameters (in case of URL encoded parameters). + */ + params: Param[]; + + /** + * _`params` and `text` fields are mutually exclusive._ + */ + text?: never | undefined; +} + +/** + * Post data with `text` specified. + */ +export interface PostDataText { + /** + * Plain text posted data + */ + text: string; + + /** + * _`params` and `text` fields are mutually exclusive._ + */ + params?: never | undefined; +} + +/** + * List of posted parameters, if any (embedded in `postData` object). + * + * http://www.softwareishard.com/blog/har-12-spec/#params + */ +export interface Param { + /** name of a posted parameter. */ + name: string; + /** value of a posted parameter or content of a posted file */ + value?: string | undefined; + /** name of a posted file. */ + fileName?: string | undefined; + /** content type of a posted file. */ + contentType?: string | undefined; + /** A comment provided by the user or the application */ + comment?: string | undefined; +} + +/** + * This object describes details about response content + * (embedded in `response` object). + * + * http://www.softwareishard.com/blog/har-12-spec/#content + */ +export interface Content { + /** + * Length of the returned content in bytes. + * + * Should be equal to `response.bodySize` if there is no compression and + * bigger when the content has been compressed. + */ + size: number; + /** + * Number of bytes saved. Leave out this field if the information is not + * available. + */ + compression?: number | undefined; + /** + * MIME type of the response text (value of the Content-Type response + * header). + * + * The charset attribute of the MIME type is included (if available). + */ + mimeType: string; + /** + * Response body sent from the server or loaded from the browser cache. + * + * This field is populated with textual content only. + * + * The text field is either HTTP decoded text or a encoded (e.g. `base64`) + * representation of the response body. + * + * Leave out this field if the information is not available. + */ + text?: string | undefined; + /** + * Encoding used for response text field e.g `base64`. + * + * Leave out this field if the text field is HTTP decoded + * (decompressed & unchunked), than trans-coded from its original character + * set into UTF-8. + */ + encoding?: string | undefined; + /** A comment provided by the user or the application */ + comment?: string | undefined; +} +/** + * This objects contains info about a request coming from browser cache. + * + * http://www.softwareishard.com/blog/har-12-spec/#cache + */ +export interface Cache { + /** + * State of a cache entry before the request. + * + * Leave out this field if the information is not available. + */ + beforeRequest?: CacheDetails | null | undefined; + /** + * State of a cache entry after the request. + * + * Leave out this field if the information is not available. + */ + afterRequest?: CacheDetails | null | undefined; + /** A comment provided by the user or the application */ + comment?: string | undefined; +} +export interface CacheDetails { + /** + * Expiration time of the cache entry. + * + * _(Format not documente but assumingly ISO 8601 - + * `YYYY-MM-DDThh:mm:ss.sTZD`)_ + */ + expires?: string | undefined; + /** + * The last time the cache entry was opened. + * + * _(Format not documente but assumingly ISO 8601 - + * `YYYY-MM-DDThh:mm:ss.sTZD`)_ + */ + lastAccess: string; + /** Etag */ + eTag: string; + /** The number of times the cache entry has been opened. */ + hitCount: number; + /** A comment provided by the user or the application */ + comment?: string | undefined; +} +/** + * This object describes various phases within request-response round trip. + * + * All times are specified in milliseconds. + * + * http://www.softwareishard.com/blog/har-12-spec/#timings + */ +export interface Timings { + /** + * Time spent in a queue waiting for a network connection. + * + * Use `-1` if the timing does not apply to the current request. + */ + blocked?: number | undefined; + /** + * DNS resolution time. The time required to resolve a host name. + * + * Use `-1` if the timing does not apply to the current request. + */ + dns?: number | undefined; + /** + * Time required to create TCP connection. + * + * Use `-1` if the timing does not apply to the current request. + */ + connect?: number | undefined; + /** + * Time required to send HTTP request to the server. + * + * _Not optional and must have non-negative values._ + */ + send?: number | undefined; + /** + * Waiting for a response from the server. + * + * _Not optional and must have non-negative values._ + */ + wait: number; + /** + * Time required to read entire response from the server (or cache). + * + * _Not optional and must have non-negative values._ + */ + receive: number; + /** + * Time required for SSL/TLS negotiation. + * + * If this field is defined then the time is also included in the connect + * field (to ensure backward compatibility with HAR 1.1). + * + * Use `-1` if the timing does not apply to the current request. + */ + ssl?: number | undefined; + /** A comment provided by the user or the application */ + comment?: string | undefined; +} +``` + +- https://www.npmjs.com/package/@types/har-format diff --git a/notes/languages/languages-awesome.md b/notes/languages/languages-awesome.md index 8af2a2cba0d..e3b83e2414c 100644 --- a/notes/languages/languages-awesome.md +++ b/notes/languages/languages-awesome.md @@ -49,6 +49,15 @@ tags: - 文言文 - https://github.com/breck7/pldb +## IoT/Embeded + +- Javascript + - jerryscript +- Lua +- C +- [berry-lang/berry](https://github.com/berry-lang/berry) + - 类似 Lua、Python + ## Rank - https://www.tiobe.com/tiobe-index/ diff --git a/notes/os/linux/fs/zfs/zfs-version.md b/notes/os/linux/fs/zfs/zfs-version.md index abffb50bbae..c0fdb831923 100644 --- a/notes/os/linux/fs/zfs/zfs-version.md +++ b/notes/os/linux/fs/zfs/zfs-version.md @@ -7,7 +7,7 @@ tags: | version | date | Linux | FreeBSD | | ---------------- | ---------- | ----------------- | ------- | -| [OpenZFS 2.2] | +| [OpenZFS 2.2] | 2023-11-13 | | [OpenZFS 2.1] | 2021-07-03 | Kernel 3.10+ | 12.2 | | [OpenZFS 2.0] | 2020-10-01 | Kernel 3.10+ | 12.2 | | [ZfsOnLinux 0.8] | 2019-05-24 | Kernel 2.6.32-5.9 | @@ -24,7 +24,17 @@ tags: ## OpenZFS 2.2 -- 支持 overlay - RENAME2 +- renameat(2) + - 支持容器 - docker、containerd - 以前需要单独做 zvol + - 支持 overlay +- Block cloning + - file-level copy-on-write + - reflinks + - `cp --reflink=always` +- scrub error log - `zpool scrub -e` +- BLAKE3 checksum + - 比 sha256, sha512 更快 +- https://github.com/openzfs/zfs/releases/tag/zfs-2.2.0 ## OpenZFS 2.1 diff --git a/notes/os/os-awesome.md b/notes/os/os-awesome.md index efe2c9ca5ac..d70a43ea16a 100644 --- a/notes/os/os-awesome.md +++ b/notes/os/os-awesome.md @@ -53,20 +53,11 @@ tags: - [zriyansh/awesome-os](https://github.com/zriyansh/awesome-os) -## 不活跃 - -- [mit-pdos/biscuit](https://github.com/mit-pdos/biscuit) - -## Embedded - -- [tock/tock](https://github.com/tock/tock) - - MIT, Apache-2.0, Rust - - secure embedded os for microcontrollers -- [mudita/MuditaOS](https://github.com/mudita/MuditaOS) - - Mobile operating system based on FreeRTOS™ optimized for E Ink displays - ## Linux Distro +- openwrt +- [istoreos/istoreos](https://github.com/istoreos/istoreos) + - based on OpenWRT - [reactos](https://github.com/reactos/reactos) - 兼容 Windows™ NT - Windows NT4, 2000, XP, 2003, Vista, 7 - Media Center @@ -100,6 +91,18 @@ tags: - small statically-linked linux system - [HN](https://news.ycombinator.com/item?id=32458744) +## 不活跃 + +- [mit-pdos/biscuit](https://github.com/mit-pdos/biscuit) + +## Embedded + +- [tock/tock](https://github.com/tock/tock) + - MIT, Apache-2.0, Rust + - secure embedded os for microcontrollers +- [mudita/MuditaOS](https://github.com/mudita/MuditaOS) + - Mobile operating system based on FreeRTOS™ optimized for E Ink displays + ## Retro Game - [MiSTer-devel/Main_MiSTer](https://github.com/MiSTer-devel/Main_MiSTer) diff --git a/notes/platform/wecom/wecom-faq.md b/notes/platform/wecom/wecom-faq.md index f930bb8a5e5..126e730f963 100644 --- a/notes/platform/wecom/wecom-faq.md +++ b/notes/platform/wecom/wecom-faq.md @@ -1,17 +1,73 @@ --- tags: -- FAQ + - FAQ --- # 企业微信 常见问题 +- 上下游 -> 经销商、供应商等业务伙伴 + - 共享应用与客户 - 企业内部开发配置域名指引 - https://open.work.weixin.qq.com/wwopen/common/readDocument/40754 - 通讯录回调 - URL、Token、EncodingAESKey - https://developer.work.weixin.qq.com/document/path/90967 +- 访问频率 + - https://developer.work.weixin.qq.com/document/path/90312 + +| 限制 | 分钟 | 小时 | +| ------------- | ------ | -------- | +| 企业/API | 1 万次 | 15 万次 | +| IP/API | 2 万次 | 60 万次 | +| 第三方/IP/API | 4 万次 | 120 万次 | ## 侧边栏控制台 - Command+Shift+Control+D 开启 Debug 模式 - 帮助栏里可打开 webView 元素审查 + +## 已知 Agent/应用 + +- AgentID + - 1000000 - 自建应用 + - 2000000 - 系统应用 + - 3000000 - 内置应用 + +| AgentID | for | API | +| ------- | ------------------ | ------------------------------------------ | +| 2000003 | 客户联系 | +| 2000004 | 会话内容存档 | financial,[会话内容存档/API] | +| 3010168 | 上下游 | 密钥,事件接收 | +| 3010011 | 打卡 | +| 3010040 | 审批 | 密钥,事件接收,[审批/API] | +| 3010041 | 汇报 | +| 3010097 | 直播 | [直播/API] | +| 3010115 | 对外收款 | 密钥,事件接收,[对外收款/API] | +| 3010185 | 人事助手 | +| | 公费电话 | [公费电话/API] | +| | 微信客服 | 密钥,事件接收,[微信客服/API] | +| | 企业微信服务商助手 | +| | 会议室 | +| | 学习园地 | +| | 公告 | +| | 健康上报 | +| | 同事吧 | +| | 行业资讯 | +| | 投屏 | +| | 测温 | +| | 打印 | +| | 网络 | +| | 门禁 | +| | 通讯录同步 | contactsApi,密钥,事件接收,[通讯录管理/API] | +| | 员工服务 | intelligentServicer | +| | 奖励 | fuli | +| | 一周小结 | weeklySummary | +| | 素材库 | material | + +[会话内容存档/API]: https://developer.work.weixin.qq.com/document/path/91360 +[直播/API]: https://developer.work.weixin.qq.com/document/path/93633 +[公费电话/API]: https://work.weixin.qq.com/api/doc/14744 +[微信客服/API]: https://open.work.weixin.qq.com/api/doc/31106 +[对外收款/API]: https://open.work.weixin.qq.com/api/doc/24952 +[审批/API]: https://work.weixin.qq.com/api/doc/17893 +[通讯录管理/API]: https://developer.work.weixin.qq.com/document/path/90193 diff --git a/notes/queue/nats/nats-auth.md b/notes/queue/nats/nats-auth.md index 4f8e3090f21..ae2f86f1de2 100644 --- a/notes/queue/nats/nats-auth.md +++ b/notes/queue/nats/nats-auth.md @@ -9,3 +9,7 @@ title: Auth - url - https://github.com/nats-io/nats-account-server - 可以自己实现 + +## Auth callout + +- https://docs.nats.io/running-a-nats-service/configuration/securing_nats/auth_callout diff --git a/notes/queue/nats/nats-faq.md b/notes/queue/nats/nats-faq.md index c86f8ba69aa..187fa3c59b0 100644 --- a/notes/queue/nats/nats-faq.md +++ b/notes/queue/nats/nats-faq.md @@ -30,10 +30,12 @@ tags: ## Subjects -- `$SYS` +- `$SYS` - 系统功能 + - `$SYS.REQ.USER.AUTH` - auth callout + - `$SYS.REQ.SERVER.{server-id}.RELOAD` - 重新加载配置 - `$JS` - `$KV` -- `$G` +- `$G` - global account - `_INBOX` - `_R_` - leafnode diff --git a/notes/queue/nats/nats-version.md b/notes/queue/nats/nats-version.md index 7ac1ef3b7e9..cb900d9fc5e 100644 --- a/notes/queue/nats/nats-version.md +++ b/notes/queue/nats/nats-version.md @@ -39,6 +39,7 @@ tags: - https://github.com/nats-io/nats-architecture-and-design/tree/main/adr ## Nats 2.10 + - 确保先升级到了 2.9.22+ 再升级 2.10 - `$SYS.REQ.USER.INFO` - userinfo diff --git a/notes/reference/size.md b/notes/reference/size.md index 74319510c7f..de5fcea3789 100644 --- a/notes/reference/size.md +++ b/notes/reference/size.md @@ -12,6 +12,11 @@ title: Size - 72 - 普通 - PPI - Pixels Per Inch - 显示器 - > = 200 - 视网膜屏, HiDPI +- 银行卡/身份证 + - 8.56 cm × 5.398 cm + - 85.6 mm × 53.98 mm + - 3.37 inch × 2.125 inch × 0.0625 + - [ISO/IEC 7810](https://en.wikipedia.org/wiki/ISO/IEC_7810) - ID-1 | Social | Size | | --------------- | -----------: | diff --git a/notes/security/security-awesome.md b/notes/security/security-awesome.md index 0feecf883b8..1a71c0d54d6 100644 --- a/notes/security/security-awesome.md +++ b/notes/security/security-awesome.md @@ -105,6 +105,12 @@ tags: - [project-rainbowcrack](http://project-rainbowcrack.com/) +## Crack + +- Geetest + - [yanglbme/geetest-crack](https://github.com/yanglbme/geetest-crack) + - https://github.com/topics/geetest + ## Firewall - [shorewall](https://shorewall.org/) diff --git a/notes/security/security-faq.md b/notes/security/security-faq.md index 7c7225c9e50..f58bbfce31f 100644 --- a/notes/security/security-faq.md +++ b/notes/security/security-faq.md @@ -50,14 +50,29 @@ tags: ## AES-CBC vs. AES-GCM vs. AES-CTR -- CTR (Counter Mode) -- CBC (Cipher Block Chaining) -- GCM (Galois/Counter Mode) +- 并行计算 - 硬件优化 - CTR、GCM +- AES-CBC (Cipher Block Chaining) + - 需要前一块 - 性能差一点 + - 任何错误都会影响后续所有分组 + - 需要 padding +- AES-CTR (Counter Mode) + - 支持随机读写 +- AES-GCM (Galois/Counter Mode) + - 包含消息认证码(MAC),可以检查数据完整性 + - 需要对运算有硬件支持,实现相对复杂 +- AES-ECB (Electronic Code Book) +- CFB - Cipher Feedback Mode +- OFB - Output Feedback Mode +- EAX ```js const key = await window.crypto.subtle.generateKey({ name: 'AES-CBC', length: 256 }, true, ['encrypt', 'decrypt']); ``` +- https://crypto.stackexchange.com/questions/6029/aes-cbc-mode-or-aes-ctr-mode-recommended +- https://www.geeksforgeeks.org/block-cipher-modes-of-operation/ +- https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation + ## PKCS#7 Padding - 用于 AES diff --git a/notes/service/auth/authz/casl.md b/notes/service/auth/authz/casl.md index 8d9622699a1..a52bdf8c435 100644 --- a/notes/service/auth/authz/casl.md +++ b/notes/service/auth/authz/casl.md @@ -24,6 +24,10 @@ title: CASL - 支持前端 - 面向 Web +```bash +npm add @casl/react @casl/ability +``` + **序列化** ```ts diff --git a/notes/service/cms/nextra.md b/notes/service/cms/nextra.md new file mode 100644 index 00000000000..16ab25093f2 --- /dev/null +++ b/notes/service/cms/nextra.md @@ -0,0 +1,119 @@ +--- +title: nextra +--- + +# nextra + +:::tips + +- 支持 SSG, SSR, ISR + +::: + +- [shuding/nextra](https://github.com/shuding/nextra) + - Next.js Static Site Generator + - remark + - 高亮 [shikijs](https://github.com/shikijs/shiki) + - markdown 由 [nextra/loader](https://github.com/shuding/nextra/blob/core/packages/nextra/src/loader.ts) 处理 +- https://nextra.site/showcase +- templates + - https://github.com/shuding/nextra-docs-template +- 参考 + - [nextapps-de/flexsearch](https://github.com/nextapps-de/flexsearch) + - https://nextra.site/about#credits + +:::notes + +- 不支持 app layout [#2023](https://github.com/shuding/nextra/issues/2023) + - 但 app 和 pages 可以共存 +- 暂不支持 turbopack [#1054](https://github.com/shuding/nextra/issues/1054) +- Nextra 3 [#1421](https://github.com/shuding/nextra/issues/1421) + - ESM only + +::: + +- / + - theme.config.{jsx,tsx} + - pages/ + - index.{md,mdx} + - \_meta.json + - title 映射 + - 顺序 + +## markdown +**GFM** + +``` +## 标题 [#title] +``` + +- 高亮语言 + - VSCode TextMate Grammar + - https://github.com/shikijs/shiki/blob/main/docs/languages.md + + +## docs + +**theme.config.jsx** + +```jsx +// https://nextra.site/docs/docs-theme/theme-configuration +export default { + logo: My Nextra Documentation, + project: { + link: 'https://github.com/wenerme/wener', + }, +}; +``` + +**\_meta.json** + +```json +{ + "index": { + "title": "Home", + "type": "page", + "theme": { + "layout": "raw", + "typesetting": "article", + "breadcrumb": false, + "footer": true, + "sidebar": false, + "toc": true, + "pagination": false + } + }, + "contact": { + "display": "hidden" + }, + "about": "About Us", + "github_link": { + "title": "Wener Github", + "href": "https://github.com/wenerme", + "newWindow": true + }, + "company": { + "title": "Company", + "type": "menu", + "items": { + "about": { + "title": "About", + "href": "/about" + }, + "contact": { + "title": "Contact Us", + "href": "mailto:hi@example.com" + } + } + }, + "*": { + "type": "page" + }, + "---": { + "type": "separator" + } +} +``` + +- typesetting - default, article +- layout - raw, full diff --git a/notes/service/cn/cn-faq.md b/notes/service/cn/cn-faq.md index 9fd459dbd7c..406752ecb51 100644 --- a/notes/service/cn/cn-faq.md +++ b/notes/service/cn/cn-faq.md @@ -35,3 +35,27 @@ tags: - 社会信用代码 - [GB/T 36104-2018 法人和其他组织统一社会信用代码基础数据元](./gb/gbt-36104.md) - [GB 32100 法人和其他组织统一社会信用代码编码规则](./gb/gb-32100.md) + +## 公司类型 + +- 企业 - 包括个人独资企业、合伙企业和公司、非公司企业法人等组织形式 +- 公司 + - 公司只是企业组织形式的其中一种 +- 个体工商户 - 自然人范畴 + - 可以起字号,也可以不起字号,可以个人经营,也可以家庭经营 +- 个人独资企业 + - 属于非法人组织,需登记企业名称 +- 一人有限公司 +- 法人 -> 企业公司 -> 法定代表人 -> 自然人 +- 法人是一个组织 + +--- + +- 个体工商户 & 个人独资企业 + - 不是法人 + - 承担无限责任 + +--- + +- 个体工商户、个人独资企业、有限责任公司、股份有限公司、合伙企业 + diff --git a/notes/service/cn/cn-glossary.md b/notes/service/cn/cn-glossary.md index 1e5d25a4f34..7e9111106e9 100644 --- a/notes/service/cn/cn-glossary.md +++ b/notes/service/cn/cn-glossary.md @@ -11,6 +11,21 @@ tags: | | id card | 身份证 | | MCN | MultiChannelNetwork | +| zh | en | note | +| ------------ | ---------------------------------------------- | ---------------------------------- | +| 个体工商户 | privately or individually-owned business | +| 个体工商户 | Individual Industrial and Commercial Household | +| 个体工商户 | Individual business | 国务院法制办公室《民法通则》英译本 | +| 个体工商户 | sole proprietor business | 北大法宝《民法通则》英译本 | +| 个人独资企业 | Sole Proprietorship Enterprise | +| 个人独资企业 | wholly individually-owned enterprise | +| 个人独资企业 | Individual Proprietorship Enterprises | +| 有限责任公司 | Limited Liability Company (LLC) | +| 有限责任公司 | Limited company | =有限公司 | +| 股份有限公司 | Joint-stock company | Co., Ltd. | +| 合伙企业 | Partnership Enterprise | +| 合伙企业 | Partnership | + # 中国行政区划(administrative division) 分为几个级别(government level/level);宪法(Constitution)规定了三个级别(de jure level),但实际上有五个级别(de facto level/practical level)——33 个省级(province/province-level region/province-level division)、333 个地区级(prefecture/prefecture-level region/prefecture-level division/second-level division)【非宪法区划】、2862 个县级(county/county-level region/county-level division)、41636 个乡级(township/township-level region/township-level division)及无数村级(village/village-level region/village-level division)【非宪法区划】行政区。各个级别又有不同名称,下面加以详细讨论【具体数字以 2005 年统计数据为准】。 diff --git a/notes/service/cn/dataset/README.md b/notes/service/cn/dataset/README.md new file mode 100644 index 00000000000..fb191f0504e --- /dev/null +++ b/notes/service/cn/dataset/README.md @@ -0,0 +1,14 @@ +--- +tags: +- Metadata +--- + +# 数据集 + +- 国民经济行业分类 +- 行业代码 + - https://www.safe.gov.cn/shaanxi/file/file/20230110/2f2635f29a004452a5542d01f18d6b78.pdf + - http://www.stats.gov.cn/xxgk/tjbz/gjtjbz/201805/t20180509_1758925.html +- 参考 + - https://github.com/wanghaisheng/healthcaredatastandard + - https://github.com/ramwin/china-public-data diff --git a/notes/service/cn/sh-faq.md b/notes/service/cn/sh/sh-faq.md similarity index 100% rename from notes/service/cn/sh-faq.md rename to notes/service/cn/sh/sh-faq.md diff --git a/notes/service/cn/sh/zwdt.md b/notes/service/cn/sh/zwdt.md new file mode 100644 index 00000000000..f36babcbf08 --- /dev/null +++ b/notes/service/cn/sh/zwdt.md @@ -0,0 +1,49 @@ +--- +title: 一网通办 +--- + +# 一网通办 + +- https://zwdt.sh.gov.cn/ +- https://yct.sh.gov.cn/portal_yct/ + - 上海企业登记在线 + - ?itemCode,access_token + +## 上海企业登记 + +- https://fw.scjgj.sh.gov.cn/nameqry/toNameIndex.action + - 名称库查询 + +```bash +# 行业描述 +curl https://yct.sh.gov.cn/namedeclare/easy/selectDescIndustry -d key=科技 +``` + +**名称区划** + +``` +上海 +上海黄浦 +上海徐汇 +上海长宁 +上海静安 +上海普陀 +上海虹口 +上海杨浦 +上海闵行 +上海宝山 +上海嘉定 +上海浦东 +上海奉贤 +上海松江 +上海金山 +上海青浦 +上海崇明 +长三角一体化示范区(上海) +长三角一体化示范区(上海青浦) +``` + +**企业类型+组织形式** + +- 内资企业 >有限公司 | 股份公司 | 个人独资企业 | 非公司企业法人 | 普通合伙企业 | 特殊普通合伙企业 | 有限合伙企业 +- 外资企业 >有限公司 | 股份公司 | 有限合伙企业 | 特殊普通合伙企业 | 普通合伙企业 diff --git a/notes/service/data/data-faq.md b/notes/service/data/data-faq.md index d9ea8639c34..27271e5edbf 100644 --- a/notes/service/data/data-faq.md +++ b/notes/service/data/data-faq.md @@ -37,3 +37,25 @@ tags: | 数据目的 | 待定 | 在用 | | 使用场景 | 数据科学 | 商业分析 | | 可访问性 | 易于访问更新 | 访问更加复杂,更新结构会有成本 | + +## 国家数据标准 + +- Government data standards + 指由政府部门制定的数据标准,强调这些标准是由政府机构推出的。 +- Regulatory data standards + 法定的数据标准,强调这些数据标准具有监管性质或缘于法规要求。 +- Mandatory data standards + 强制性的数据标准,指在某 domain 或行业中具有强制执行力的数据标准规范。 +- Official data standards + 官方的数据标准,简单明确地表达这些标准是由官方机构发布的。 +- Industry data standards + 行业数据标准,用来表示在特定行业领域内通用或约定的数据标准。 +- Public sector data standards + 公共部门的数据标准,明确表示这些标准是为政府部门数据制定的。 +- Government-issued data standards + 政府颁布的数据标准,明确表达这些标准是由政府部门颁布的。 + +--- + +- https://resources.data.gov/standards/ +- https://github.com/GSA/resources.data.gov diff --git a/notes/service/erp/dynamic365.md b/notes/service/erp/dynamic365.md index 67650ba7054..8fde0c5a0d3 100644 --- a/notes/service/erp/dynamic365.md +++ b/notes/service/erp/dynamic365.md @@ -52,6 +52,11 @@ title: Dynamics 365 - Import/Export - Template +## Customer Engagement + +- 工作流 +- https://learn.microsoft.com/en-us/dynamics365/customerengagement/on-premises/developer/entities/workflow + ## Access - Read diff --git a/notes/service/erp/erp-glossary.md b/notes/service/erp/erp-glossary.md index df84731fc01..cb723d35a4c 100644 --- a/notes/service/erp/erp-glossary.md +++ b/notes/service/erp/erp-glossary.md @@ -180,7 +180,7 @@ tags: - 实物商品 - 虚拟商品 - 服务 - - 数字内容 + - 数字内容 - 电子书、音乐、视频、图片 - 软件 - 在线课程 - 电子礼品卡 @@ -189,4 +189,4 @@ tags: - 游戏内购 - 知识付费 - 竞猜 - - 数字资产 + - 数字资产 - 比特币、NFT diff --git a/notes/service/erp/salesforce.md b/notes/service/erp/salesforce.md new file mode 100644 index 00000000000..47248a0351d --- /dev/null +++ b/notes/service/erp/salesforce.md @@ -0,0 +1,9 @@ +--- +title: Salesforce +--- + +# Salesforce + +- [字段类型](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/field_types.htm) +- [标准对象列表](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_list.htm) +- Activities = Task+Event diff --git a/notes/service/service-awesome.md b/notes/service/service-awesome.md index 198ae3fceea..104b2014f36 100644 --- a/notes/service/service-awesome.md +++ b/notes/service/service-awesome.md @@ -178,6 +178,7 @@ tags: - [warp-tech/warpgate](https://github.com/warp-tech/warpgate) - Apache-2.0, Rust - 支持 SSH, HTTPS, MySQL + - Smart SSH, HTTPS and MySQL bastion that needs no client-side software - [lijiahangmax/orion-ops](https://github.com/lijiahangmax/orion-ops) - Apache-2.0, Java - WebSSH @@ -185,8 +186,14 @@ tags: - [huashengdun/webssh](https://github.com/huashengdun/webssh) - [nirui/sshwifty](https://github.com/nirui/sshwifty) - AGPLv3, Go - - [aker-gateway/Aker](https://github.com/aker-gateway/Aker) + - ~~[aker-gateway/Aker](https://github.com/aker-gateway/Aker)~~ + - Python + - SSH bastion/jump host/jumpserver + - [gravitational/teleport](https://github.com/gravitational/teleport) + - [pomerium/pomerium](https://github.com/pomerium/pomerium) + - Apache-2.0, Go - Apache Guacamole + - cloudflare zero trust - tailscale - https://tailscale.com/learn/access-remote-server-jump-host/ - ssh @@ -194,10 +201,6 @@ tags: - Eternal Terminal - stormssh - [moul/assh](https://github.com/moul/assh) -- access gateway/ssh jump server - - [gravitational/teleport](https://github.com/gravitational/teleport) - - [pomerium/pomerium](https://github.com/pomerium/pomerium) - - Apache-2.0, Go - WebAdmin/AdminAgent - [Ylianst/MeshCentral](https://github.com/Ylianst/MeshCentral) - Apache-2.0, JS diff --git a/notes/web/nodejs/fastify.md b/notes/web/nodejs/fastify.md index 59cf3859c14..1c54084b172 100644 --- a/notes/web/nodejs/fastify.md +++ b/notes/web/nodejs/fastify.md @@ -210,7 +210,7 @@ const app = Fastify({ app.register(import('./app')); // delay is the number of milliseconds for the graceful close to finish -const closeListeners = closeWithGrace({delay: 500}, async function ({signal, err, manual}) { +const closeListeners = closeWithGrace({ delay: 500 }, async function ({ signal, err, manual }) { if (err) { app.log.error(err); } @@ -223,7 +223,7 @@ app.addHook('onClose', async (instance, done) => { }); // Start listening. -app.listen({port: parseInt(process.env.PORT) || 3000}, (err: any) => { +app.listen({ port: parseInt(process.env.PORT) || 3000 }, (err: any) => { if (err) { app.log.error(err); process.exit(1); @@ -254,3 +254,10 @@ const defaultAjvOptions = { ## Request body is too large 默认 1MiB + +## FST_ERR_CTP_INVALID_MEDIA_TYPE + +- fastify-multipart +- https://fastify.dev/docs/latest/Reference/ContentTypeParser +- text/xml + - 需要做额外 middleware 处理 diff --git a/notes/web/script/lib/ajv.md b/notes/web/script/lib/ajv.md index 649681ec2c2..5f213fe4bb2 100644 --- a/notes/web/script/lib/ajv.md +++ b/notes/web/script/lib/ajv.md @@ -5,6 +5,9 @@ title: ajv # ajv - [ajv-validator/ajv](https://github.com/ajv-validator/ajv) + - JSON Schema 校验 + - 支持 JTD serialize/parse + - 类似于 [fastify/fast-json-stringify](https://github.com/fastify/fast-json-stringify) - 参考 - [ajv-validator/ajv-keywords](https://github.com/ajv-validator/ajv-keywords) 增加自定义关键字 @@ -24,12 +27,12 @@ npm add ajv ajv-formats ajv-keywords ajv-errors ```ts import addFormats from 'ajv-formats'; -import addKeyworks from 'ajv-keywords'; +import addKeywords from 'ajv-keywords'; import Ajv2020 from 'ajv/dist/2020'; const ajv = new Ajv2020(); addFormats(ajv); -addKeyworks(ajv); +addKeywords(ajv); // 添加自定义 keyword 避免失败 ajv.addKeyword('x-meta'); diff --git a/notes/web/style/tailwindcss/README.md b/notes/web/style/tailwindcss/README.md index 7308ebdfa41..5c8f7c09d66 100644 --- a/notes/web/style/tailwindcss/README.md +++ b/notes/web/style/tailwindcss/README.md @@ -245,6 +245,29 @@ module.exports = { | max-w-screen-xl | | 1280px | | max-w-screen-2xl | | 1536px | +## container query + +- 支持 Container Query - v3.2+ +- `@container`, `@lg:p-8` + - `@[17.5rem]:underline` +- `@container/main`, `@lg/main:underline` - 命名容器 +- [@tailwindcss/container-queries](https://github.com/tailwindlabs/tailwindcss-container-queries) + + +| Name | CSS | +| ------ | -------------------------------------------- | +| `@xs` | `@container (min-width: 20rem /* 320px */)` | +| `@sm` | `@container (min-width: 24rem /* 384px */)` | +| `@md` | `@container (min-width: 28rem /* 448px */)` | +| `@lg` | `@container (min-width: 32rem /* 512px */)` | +| `@xl` | `@container (min-width: 36rem /* 576px */)` | +| `@2xl` | `@container (min-width: 42rem /* 672px */)` | +| `@3xl` | `@container (min-width: 48rem /* 768px */)` | +| `@4xl` | `@container (min-width: 56rem /* 896px */)` | +| `@5xl` | `@container (min-width: 64rem /* 1024px */)` | +| `@6xl` | `@container (min-width: 72rem /* 1152px */)` | +| `@7xl` | `@container (min-width: 80rem /* 1280px */)` | + ## tailwind.css ```css