- 服务对象为 onevcat:资深 iOS 开发者,技术力爆炸,所以不需要废话。重视 “Slow is Fast”、推理质量、抽象与长期可维护性。github.com/onevcat, onevcat.com, onev.cat, onev.dev, x.com/onevcat 等都视为用户相关
- 代码、注释、标识符、提交信息及代码块内容用标准/简洁/明确的 English。技术文档优先使用 English;若文档现有中文语境,则正文中文、代码块 English。English 遵守 ASD-STE100 Simplified Technical English (STE)。
- 对需要说明结论、方案或决策的任务,按“直接结论 → 简要推理 → 可选方案 → 可执行下一步”组织,不要长篇大论,不要事无巨细;简单确认、闲聊或一行答案直接回答。
- 在修改文件时,使用待修改文件中使用的语言,切忌中英文混杂。
- 处理 GitHub 相关操作优先使用
ghCLI。 - 目标:作为强推理、强规划的编码助手,首要目标是完成任务。尽量一次到位,减少无谓澄清,只在明确被提问时才解释技术细节。
Tool: draw.io
Animate the connectors
Animating your connectors is great for demonstrating directional flow charts, electrical circuits and more. To animate your connectors:
- Click on the connector you wish to animate. Hold Ctrl or Cmd and click to select multiple connectors
- On the right-hand side go to Style > Property and click on the arrow to expand the field
- Scroll down to Flow Animation and check the box
This is a living document. Everything in this document is made in good faith of being accurate, but like I just said; we don't yet know everything about what's going on.
Update: I've disabled comments as of 2025-01-26 to avoid everyone having notifications for something a year on if someone wants to suggest a correction. Folks are free to email to suggest corrections still, of course.
| from requests.adapters import HTTPAdapter, Retry | |
| from requests import Session | |
| retries = Retry( | |
| total=5, backoff_factor=1, status_forcelist=[502, 503, 504] | |
| ) | |
| session = Session() # reuse tcp connection | |
| session.mount("http://", HTTPAdapter(max_retries=retries)) | |
| session.mount("https://", HTTPAdapter(max_retries=retries)) |
| #!/bin/zsh | |
| ### Added by Zinit's installer | |
| if [[ ! -f $HOME/.zinit/bin/zinit.zsh ]]; then | |
| print -P "%F{33}▓▒░ %F{220}Installing %F{33}DHARMA%F{220} Initiative Plugin Manager (%F{33}zdharma/zinit%F{220})…%f" | |
| command mkdir -p "$HOME/.zinit" && command chmod g-rwX "$HOME/.zinit" | |
| command git clone https://github.com/zdharma/zinit "$HOME/.zinit/bin" && \ | |
| print -P "%F{33}▓▒░ %F{34}Installation successful.%f%b" || \ | |
| print -P "%F{160}▓▒░ The clone has failed.%f%b" | |
| fi |
My Synology DS218+ runs with a single SSD disk that has an operating temperature range of 0–70 °C, which is common for SSDs. Synology, however, has a default shutdown temperature of 61 °C, probably due to HDDs and some lazy programming.
I'm a very light user of NAS – all I want is a network attached storage and silence. My DS218+ has one 2 TB SSD disk in it and I've changed the system fan for a quieter / slower one.
Everything runs fine but about once in a month, I get this notification:
[Synology DS218+]Synology shut down due to disk overheating. >
| #EXTM3U name="bj-telecom-iptv" | |
| #EXTINF:-1 group-title="CCTV",CCTV-1 综合 高清 | |
| http://tew823dru.lan:4022/udp/225.1.8.1:8008 | |
| #EXTINF:-1 group-title="CCTV",CCTV-2 财经 高清 | |
| http://tew823dru.lan:4022/udp/225.1.8.2:8084 | |
| #EXTINF:-1 group-title="CCTV",CCTV-3 综艺 高清 | |
| http://tew823dru.lan:4022/udp/225.1.8.88:8000 | |
| #EXTINF:-1 group-title="CCTV",CCTV-4 中文国际 高清 | |
| http://tew823dru.lan:4022/udp/225.1.8.4:8092 | |
| #EXTINF:-1 group-title="CCTV",CCTV-5 体育 高清 |
Scripts to confgire a group of hosts on a LAN to use VXLAN over Wireguard.
| #!/bin/bash | |
| # Install Shadowsocks on CentOS 7 | |
| echo "Installing Shadowsocks..." | |
| random-string() | |
| { | |
| cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w ${1:-32} | head -n 1 | |
| } |
| ### No longer needed as of nginx-1.13.6-1.el7_4.ngx.x86_64.rpm from nginx.org | |
| ### it was compiled against OpenSSL 1.0.2 from CentoOS 7.4 so it supports ALPN (HTTP2 works) | |
| yum -y groupinstall 'Development Tools' | |
| yum -y install wget openssl-devel libxml2-devel libxslt-devel gd-devel perl-ExtUtils-Embed GeoIP-devel rpmdevtools | |
| OPENSSL="openssl-1.0.2l" | |
| NGINX_VERSION="1.13.5-1" | |
| NJS_VERSION="1.13.5.0.1.13-1" |