Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
wenerme committed Apr 27, 2024
1 parent 8f0c32b commit 7ff784e
Show file tree
Hide file tree
Showing 36 changed files with 914 additions and 94 deletions.
56 changes: 56 additions & 0 deletions notes/culture/game/baccarat.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,59 @@ tags:
- 大桌
- 14人参与
- 限红

| en | for |
| ----------- | ---- |
| player | 闲家 |
| banker | 庄家 |
| tie | 和局 |
| player pair | 闲对 |
| banker pair | 庄对 |
| big ||
| small ||
| big pair | 大对 |
| small pair | 小对 |

**胜负规则**

1. 闲家和庄家的牌点数相加,以个位数为准
1. 谁最接近9点即为胜方
1. 相同点数即和局

**游戏规则**

1. 8副牌,每副52张,共416张 - 一靴牌
1. 闲家和庄家各发两张牌
1. 如第一轮未分出胜负需再按"牌例"发第二轮的牌,每方最多再发1张牌
1. 牌面为0至6将依照补牌规则多发一张牌
1. 没有任何一手牌获得超过三张牌
1. Ace 为 1 点
1. J, Q, K, 10 为 0 点
1. 一靴牌
- 第21局+,不得投注 大小
- 第26局+,不得投注 超和
- 第46局+,不得投注 庄龙宝、闲龙宝、完美对子、任意对子、庄对、闲对
- 第51局+,不得投注 闲例牌/庄例牌

**投注项目**

| bet | rate |
| -------- | ---- |
| 闲家 |1
| 庄家 |0.95
| 和局 |8
| 闲对 |11
| 庄对 |11
| 大 |0.5
| 小 |1.5
| 任意对子 |5
| 完美对子 |25
| 闲例牌 |4
| 庄例牌 |4
超和 N|

- 大小 - 4张牌为小,5张牌或6张牌为大
- 完美对子 - 庄或闲的前两张牌的牌面,必须同花同色同数字或同英文字母
- 例牌 - 庄或闲的前两张牌点数总和为8或9点并胜出
- 超和 - 指庄和闲为和局时,押中和局点数
- 超级六 - 庄家点数为 6 而且赢闲家
1 change: 1 addition & 0 deletions notes/db/search/search-awesome.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ tags:
- AGPLv3, Rust
- Like Elasticsearch, but highly reliable & cost-efficient for log management.
- [lnx-search/lnx](https://github.com/lnx-search/lnx)
- MIT, Rust
- [valeriansaliou/sonic](https://github.com/valeriansaliou/sonic)
- MPL-2.0, Rust
- schema-less search backend
Expand Down
26 changes: 22 additions & 4 deletions notes/dev/design/design-form-service.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ title: Design Form Service
- 只关系结果
- 能提交验证数据
- 能显示页面
- 确定校验和验证框架逻辑
- 动态后段 + 前端 Builder
- 逻辑
- 复杂、高级表单通常存在内部关联逻辑

Expand All @@ -25,14 +27,30 @@ title: Design Form Service
- 参考
- 字段设计
- https://github.com/gitana/alpaca/tree/master/src/js/fields
- generate interactive HTML5 forms for web and mobile applications
- FormBuilder
- https://github.com/formio/formio.js/blob/master/src/builders/Builders.js

# 参考实现
# 参考实现 {#reference}

- [matheins/dorf](https://github.com/matheins/dorf)
- AGPLv3, TS, React, PG, Drizzle, NextJS
- form builder
- [formbricks/formbricks](https://github.com/formbricks/formbricks)
- AGPLv3, TS
- Survey Platform
- snoopforms -> formbricks
- [Ryczko/FormsLab](https://github.com/Ryczko/FormsLab)
- MIT, TS, MongoDB, React, Prisma, NextJS
- Form builder for anonymous surveys, polls, and collecting feedback

## heyform

- [heyform](https://github.com/heyform/heyform)

## ohmyform

- ~~[ohmyform/ohmyform](https://github.com/ohmyform/ohmyform)~~
- [ohmyform](https://github.com/ohmyform/ohmyform)
- AGPL, TS, typeorm
- entities
- form
Expand All @@ -59,8 +77,8 @@ title: Design Form Service

## formio

- [formio/formio](https://github.com/formio/formio)
- OSL-3.0, JS
- [formio](https://github.com/formio/formio)
- MIT, JS
- mongoose
- https://github.com/formio/formio/blob/master/src/models/models.js
- Models
Expand Down
8 changes: 8 additions & 0 deletions notes/dev/format/format-date.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: Date Format
---

# Date format

- https://en.wikipedia.org/wiki/List_of_date_formats_by_country
- mdn [Intl.DateTimeFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat)
7 changes: 7 additions & 0 deletions notes/dev/format/har.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,14 @@ title: HTTP Archive format
- OWASP ZAP
- k6 - 记录 HTTP 请求
- http://www.softwareishard.com/blog/har-adopters/
- Chrome
- 支持导入 - Chrome62+
- 支持导出
- https://developer.chrome.com/docs/devtools/network/reference
- [chrome.devtools.network](https://developer.chrome.com/docs/extensions/reference/api/devtools/network)
- 参考
- https://gitgrimbo.github.io/harviewer/master/
- [janodvarko/harviewer](https://github.com/janodvarko/harviewer)
- https://toolbox.googleapps.com/apps/har_analyzer/
- 不会显示 _initiator, _webSocketMessages
- _resourceType=websocket
Expand Down
46 changes: 46 additions & 0 deletions notes/dev/format/zlib.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
tags:
- Compression
- RFC
---

# zlib

- https://www.rfc-editor.org/rfc/rfc1950

**Header**

| L | ZLIB | GZIP | Notes |
| --- | ----- | ----- | ------------------- |
| 1 | 78 01 | 1F 8B | No Compression/low |
| 2 | 78 5E | 1F 8B | Fast Compression |
| 3 | 78 5E | 1F 8B |
| 4 | 78 5E | 1F 8B |
| 5 | 78 5E | 1F 8B |
| 6 | 78 9C | 1F 8B | Default Compression |
| 7 | 78 DA | 1F 8B | Best Compression |
| 8 | 78 DA | 1F 8B |
| 9 | 78 DA | 1F 8B |

- CMF -Compression Method and flags

```
bits 0 to 3 CM Compression method
bits 4 to 7 CINFO Compression info
```

- CM = 8
- Deflate
- window size up to 32K
- used by gzip and PNG
- CINFO - base-2 logarithm of the LZ77 window size, minus eight
- CINFO=7 indicates a 32K window size
- 因此大多前缀都是 78
- CM = 15
- reserved

```
bits 0 to 4 FCHECK (check bits for CMF and FLG)
bit 5 FDICT (preset dictionary)
bits 6 to 7 FLEVEL (compression level)
```
1 change: 1 addition & 0 deletions notes/devops/kubernetes/distro/k3s/k3s-faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -496,3 +496,4 @@ iptables -L | wc -l -c
```
- https://github.com/k3s-io/k3s/issues/294
36 changes: 17 additions & 19 deletions notes/os/linux/fs/zfs/zfs-faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ tags:
- renameat2/overlayfs ZFS v2.2+
- [zfs_rename: support RENAME\_ flags](https://github.com/openzfs/zfs/commit/dbf6108b4df92341eea40d0b41792ac16eabc514)
- feature zilsaxattr
- 不要用 `/dev/z0`, 用 `/dev/zvol/data/db` - zd0 可能会变

:::

Expand Down Expand Up @@ -90,12 +91,6 @@ du --apparent-size -h .

尝试关闭 atime

## cannot create '/data/db': pool must be upgraded to set this property or value

```bash
sudo zpool upgrade -a
```

## 计算使用空间

- compressratio - 压缩率
Expand Down Expand Up @@ -386,7 +381,6 @@ mount -o remount,rw /data/docker
- cache 异常后导致 zvol 被重新挂载为 ro
- clear cache 的 error 后还是无法挂载,因为 fs 损坏


```ansi
EXT4-fs warning (device zd0): ext4_end_bio:343: I/O error 3 writing to inode 5767264 starting block 14909936)
Buffer I/O error on device zd0, logical block 14909936
Expand Down Expand Up @@ -530,16 +524,20 @@ device_rebuild (read-only compatible)
Support for sequential mirror/dRAID device rebuilds
zstd_compress
zstd compression algorithm support.
draid
Support for distributed spare RAID
zilsaxattr (read-only compatible)
Support for xattr=sa extended attribute logging in ZIL.
head_errlog
Support for per-dataset on-disk error logs.
blake3
BLAKE3 hash algorithm.
block_cloning (read-only compatible)
Support for block cloning via Block Reference Table.
vdev_zaps_v2
Support for root vdev ZAP.
```

| flag | ver | for |
| ------------: | ---- | ------------------------------------- |
| zstd_compress | v2.1 | zstd 压缩算法 |
| draid | v2.1 | 支持分布式备用 RAID |
| zilsaxattr | v2.2 | ZIL 支持 xattr=sa 扩展属性日志 |
| head_errlog | v2.2 | per-dataset on-disk error logs |
| blake3 | v2.2 | BLAKE3 哈希算法 |
| block_cloning | v2.2 | 通过 Block Reference Table 支持块克隆 |
| vdev_zaps_v2 | v2.2 | 支持 root vdev ZAP |

## cannot create '/data/db': pool must be upgraded to set this property or value

```bash
sudo zpool upgrade -a
```
26 changes: 26 additions & 0 deletions notes/os/linux/network/arp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
title: ARP
---

# ARP

- arpd
- 管理 ARP 缓存 - 避免在网络上因为频繁的 ARP 广播请求而导致的性能问题
- 网络优化
- 安全 - 检测和防御 ARP 欺骗攻击
- 参考
- [royhills/arp-scan](https://github.com/royhills/arp-scan)

```bash
# 所有 hosts
arp -a

# /etc/arp-scan/mac-vendor.txt
# /usr/share/arp-scan/ieee-oui.txt
# arp-fingerprint arp-scan get-iab get-oui
apk add arp-scan

# IP -> MAC
sudo arp-scan 192.168.1.1
sudo arp-scan 192.168.1.0/24
```
23 changes: 23 additions & 0 deletions notes/os/linux/network/ifupdown-ng.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,29 @@ title: ifupdown-ng
- bond-arp-validate
- bond-arp-all-targets

## interfaces

| Syntax | Description |
| ------------------------------ | ------------------------------------ |
| **address** _address_ | 配置 IP 地址,自动补充适当的子网掩码 |
| **netmask** _netmask_ | 设置后备子网掩码 |
| **point-to-point** _address_ | 设置点对点网络配置的对端 IP 地址 |
| **gateway** _address_ | 设置默认网关地址 |
| **link-type** _link-type_ | 定义接口的链路类型 |
| **veth-peer-name** _peer-name_ | 指定 veth 对端接口的名称 |
| **alias** _alias_ | 设置接口别名 |
| **requires** _interfaces_... | 定义启动前需先启动的接口 |
| **inherit** _object_ | 接口继承其它配置对象的设置 |
| **use** _executor_ | 指定使用的执行器 |
| **pre-down** _command_ | 在接口关闭前执行的命令 |
| **down** _command_ | 关闭接口时执行的命令 |
| **post-down** _command_ | 接口关闭后执行的命令 |
| **pre-up** _command_ | 在接口启动前执行的命令 |
| **up** _command_ | 启动接口时执行的命令 |
| **post-up** _command_ | 接口启动后执行的命令 |

- https://github.com/ifupdown-ng/ifupdown-ng/blob/main/doc/interfaces.scd

## executor

- wifi - AlpineLinux 3.15+
Expand Down
3 changes: 2 additions & 1 deletion notes/platform/google/drive.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
---
title: 谷歌云端硬盘
tags:
- Drive
---

# 谷歌云端硬盘


- [可存储在 Google 云端硬盘中的文件](https://support.google.com/drive/answer/37603?hl=zh-Hans)
- Word
- 50 MB
Expand Down
4 changes: 4 additions & 0 deletions notes/service/dns/dns-awesome.md
Original file line number Diff line number Diff line change
Expand Up @@ -334,3 +334,7 @@ bard.google.com
- https://github.com/gfwlist/gfwlist
- [中华人民共和国被封锁网站列表](https://zh.wikipedia.org/wiki/中华人民共和国被封锁网站列表)
- https://github.com/paulmillr/encrypted-dns

## CDN

- ghcr.io -> pkg-containers.githubusercontent.com
Loading

0 comments on commit 7ff784e

Please sign in to comment.