正在茫然地时候,突然脑海中蹦出来一个词:ChromeOS 。我原来对 ChromeOS 了解还停留于:它所有的应用都是基于 Web 运行于 Chrome 之上的,简而言之,他只能运行 Web 应用和浏览网页;同时他的轻量级使得 Chromebook 很便宜且性价比很高。经过一番调研之后,我惊讶地发现 ChromeOS 已经进化了很多,他的功能性和易用性早已今非昔比,最终我入了一台。当然我并没有打算在本文介绍 ChromeOS 和 Chromebook 的功能和特性,毕竟这些东西官方网站都有。我更想分享的是,在整个初体验过程中,所看到的意料之外的惊喜。
三系统深度集成
现在的 ChromeOS 不光仅仅支持网页、Web 应用和渐进性网络应用(PWA:Progressive Web Apps),同时也兼容 Android 应用和 Linux 应用。它并不是简简单单地在 ChromeOS 里面运行了 Android 虚拟机和 Debian 虚拟机。整体上体验非常类似于 Parallels Desktop 的融合模式。Chrome 浏览器、Web 应用、PWA、Android 应用和 Linux 应用,可以如同原生应用一样无缝平铺在桌面上。
如上图,我们能看到左上角的 Google Play 和右下角的 Kodi,这两个都是 Android 应用。我们也能看到左下角 Linux 版本的 LibfreOffice,右上角和右侧中间的分别是 ChromeOS 内置 Chrome 浏览器和 Outlook 的 PWA。虽然三种系统工具集的区别引起了少许外观上的差异以及沙盒隔离造成权限上的差异,但是整体使用体感上没有明显地差异。
在中国的时候,即时聊天工具(后面以 IM – Instant Messaging 代替)方面,基本上是微信走天下。安装一个微信几乎就能和所有朋友保持联系了。
到了新加坡,IM 真的是百花齐放,再加之不同人出于不同的原因,对于 IM 也有不同的偏爱,导致你需要安装多个 IM 才能和所有新朋友保持联系。简单数了一下,我现在手机上,除了微信,还安装了 WhatsApp、Telegram、Signal、Line、Google Chat、Linkedin 等等。虽然我个人更偏爱 Telegram,但我还不得频繁地在不同的 IM 之间切换,着实让人头疼。
市场上,也不乏出现过一些多合一的IM,但其实都不怎么理想,无非就是下面两种:
通过 Frame 将这些 IM 的网页版集合起来。这种在桌面上体验还勉勉强强;在手机上,面对这些其实是更适配大屏的 UI 简直是噩梦。
通过抓包或者分析网页版将内容提取出来后,重新组装一个集成度更高更美观的 UI 出来。坦白说,这种方式让我很担心数据安全问题,毕竟它会破坏掉这些 IM 原本端对端加密的可靠性。
# Configuration file for Synapse.## This is a YAML file: see [1] for a quick introduction. Note in particular# that *indentation is important*: all the elements of a list or dictionary# should have the same indentation.## [1] https://docs.ansible.com/ansible/latest/reference_appendices/YAMLSyntax.html## For more information on how to configure Synapse, including a complete accounting of# each option, go to docs/usage/configuration/config_documentation.md or# https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.htmlserver_name:"homeserver.mymatrixhost.com"pid_file:/data/homeserver.pidlisteners:-port:8008tls:falsetype:httpx_forwarded:trueresources:-names:[client,federation]compress:falsedatabase:name:sqlite3args:database:/data/homeserver.dblog_config:"/data/homeserver.mymatrixhost.com.log.config"media_store_path:/data/media_storeregistration_shared_secret:"bzxSPVVwhHMiSs6b6YRBKreN-i^W^2tCUmS^4r~Hr:_ew,Alkb"report_stats:falsemacaroon_secret_key:"J1kYVZ~+fixo*RI@K5,~W-LoL#lMr0ZVJg.nFN,=MT_bYpk@JJ"form_secret:"2zXL_q~hI1nF^m#yBumaIvY9dFU~j9uiFO0bGR5Rgc-U5gf6@2"signing_key_path:"/data/homeserver.mymatrixhost.com.signing.key"trusted_key_servers:-server_name:"matrix.org"# vim:ft=yamlCode language:YAML(yaml)
AH01144: No protocol handler was valid for the URL /_matrix/static (scheme 'http'). If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule.Code language:JavaScript(javascript)
先使用此命令 mkdir mautrix-whatsapp && cd mautrix-whatsapp 创建一个用来维护配置的目录,接下来执行 docker run --rm -v `pwd`:/data:z dock.mau.dev/mautrix/whatsapp:latest 以初始化配置。然后,你会在 mautrix-whatsapp 目录中看到 config.yaml 这个文件。
大多数配置可以直接使用默认值,简单介绍一些需要修改和关注的配置项。
homeserver:# The address that this appservice can use to connect to the homeserver.address:http://synapse:8008# The domain of the homeserver (also known as server_name, used for MXIDs, etc).domain:homeserver.mymatrixhost.com# What software is the homeserver running?# Standard Matrix homeservers like Synapse, Dendrite and Conduit should just use "standard" here.software:standard# The URL to push real-time bridge status to.# If set, the bridge will make POST requests to this URL whenever a user's whatsapp connection state changes.# The bridge will use the appservice as_token to authorize requests.status_endpoint:null# Endpoint for reporting per-message status.message_send_checkpoint_endpoint:null# Does the homeserver support https://github.com/matrix-org/matrix-spec-proposals/pull/2246?async_media:false# Application service host/registration related details.# Changing these values requires regeneration of the registration.appservice:# The address that the homeserver can use to connect to this appservice.address:http://mautrix-whatsapp:29318Code language:YAML(yaml)
# Database config.database:# The database type. "sqlite3-fk-wal" and "postgres" are supported.type:sqlite3-fk-wal# The database URI.# SQLite: A raw file path is supported, but `file:<path>?_txlock=immediate` is recommended.# https://github.com/mattn/go-sqlite3#connection-string# Postgres: Connection string. For example, postgres://user:password@host/database?sslmode=disable# To connect via Unix socket, use something like postgres:///dbname?host=/var/run/postgresqluri:file:///data/db.db?_txlock=immediateCode language:YAML(yaml)
一样的道理。虽然 WhatsApp 桥接组件也支持 PostgreSQL,但自用服务且图方便,我选择 SQLite。如果启动的时候,遇到初始化 DB 失败的报错,可以直接用 touch db.db 来创建一个空数据库文件。
# End-to-bridge encryption support options.## See https://docs.mau.fi/bridges/general/end-to-bridge-encryption.html for more info.encryption:# Allow encryption, work in group chat rooms with e2ee enabledallow:true# Default to encryption, force-enable encryption in all portals the bridge creates# This will cause the bridge bot to be in private chats for the encryption to work properly.default:trueCode language:YAML(yaml)
mkdir mautrix-telegram && cd mautrix-telegram.
docker run --rm -v `pwd`:/data:z dock.mau.dev/mautrix/telegram:latestCode language:Bash(bash)
同样需要注意 Matrix 和 Telegram 桥接应用服务的地址
# Homeserver detailshomeserver:# The address that this appservice can use to connect to the homeserver.address:http://synapse:8008# The domain of the homeserver (for MXIDs, etc).domain:homeserver.mymatrixhost.com# Whether or not to verify the SSL certificate of the homeserver.# Only applies if address starts with https://verify_ssl:false# What software is the homeserver running?# Standard Matrix homeservers like Synapse, Dendrite and Conduit should just use "standard" here.software:standard# Number of retries for all HTTP requests if the homeserver isn't reachable.http_retry_count:4# The URL to push real-time bridge status to.# If set, the bridge will make POST requests to this URL whenever a user's Telegram connection state changes.# The bridge will use the appservice as_token to authorize requests.status_endpoint:# Endpoint for reporting per-message status.message_send_checkpoint_endpoint:# Whether asynchronous uploads via MSC2246 should be enabled for media.# Requires a media repo that supports MSC2246.async_media:false# Application service host/registration related details# Changing these values requires regeneration of the registration.appservice:# The address that the homeserver can use to connect to this appservice.address:http://mautrix-telegram:29317Code language:YAML(yaml)
同样选择 SQLite 作为数据库
# The full URI to the database. SQLite and Postgres are supported.# Format examples:# SQLite: sqlite:///filename.db# Postgres: postgres://username:password@hostname/dbnamedatabase:sqlite://db.dbCode language:YAML(yaml)
端对端加密配置
# End-to-bridge encryption support options.## See https://docs.mau.fi/bridges/general/end-to-bridge-encryption.html for more info.encryption:# Allow encryption, work in group chat rooms with e2ee enabledallow:true# Default to encryption, force-enable encryption in all portals the bridge creates# This will cause the bridge bot to be in private chats for the encryption to work properly.default:trueCode language:YAML(yaml)
除此之外,还需要配置 Telegram 的 API Key。我相信 Telegram 桥接应用服务是对一系列 Telegram API 操作的封装。
telegram:
# Get your own API keys at https://my.telegram.org/apps
api_id: 10000001
api_hash: 123abcdefghijklmnopqrstuvwxyz123
# (Optional) Create your own bot at https://t.me/BotFather
bot_token: disabledCode language:PHP(php)
印象中,应该是 2008 年,我还在攻读硕士学位的时候。那个时候我是彻彻底底的微软粉,正用着我人生的第一部触摸屏手机,操作系统是 Windows Mobile 系统。有事没事刷个机,有时候还会用 C# 手搓一个自己需要的手机软件(那个年代,我们还不管手机应用软件叫 App),非常有意思。但是也不得不承认,那个时候触摸屏的体验很一般。而且手机系统的交互对触摸屏的支持还没有进化到很完美,大多数操作都是要通过一只触摸笔。
Calibre Web 其实并非是 Calibre 的官方出品,在 GitHub 也有不止一个 fork。我个人比较推荐 linuxserver.io 的镜像。假如你在部署 Calibre Web 之前没有使用过 Calibre,那你会需要一个初始的书库文件 metadata.db 。你可以安装 Calibre 来初始化一个,或者直接从这里下载。
Calibre Web 除了给用户提供了对 Calibre 的书库基于 Web 的管理能力,还支持 OPDS 目录。
The Open Publication Distribution System (OPDS) Catalog format is a syndication format for electronic publications based on Atom and HTTP. OPDS Catalogs enable the aggregation, distribution, discovery, and acquisition of electronic publications.
OPDS Catalogs use existing or emergent open standards and conventions, with a priority on simplicity.
<?xml version="1.0" encoding="UTF-8"?><feedxmlns="http://www.w3.org/2005/Atom"xmlns:dc="http://purl.org/dc/terms/"xmlns:dcterms="http://purl.org/dc/terms/"><id>urn:uuid:2853dacf-ed79-42f5-8e8a-a7bb3d1ae6a2</id><updated>2022-12-29T16:23:55+00:00</updated><linkrel="self"href="/opds/search/root cause?"type="application/atom+xml;profile=opds-catalog;type=feed;kind=navigation"/><linkrel="start"href="/opds"type="application/atom+xml;profile=opds-catalog;type=feed;kind=navigation"/><linkrel="up"href="/opds"type="application/atom+xml;profile=opds-catalog;type=feed;kind=navigation"/><linkrel="search"href="/opds/osd"type="application/opensearchdescription+xml"/><linktype="application/atom+xml"rel="search"title="Search"href="/opds/search/{searchTerms}" /><title>Calibre-Web</title><author><name>Calibre-Web</name><uri>https://github.com/janeczku/calibre-web</uri></author><entry><title>Root Cause Analysis Handbook</title><id>urn:uuid:06a66a9a-59d4-415b-a472-a413b8cf923d</id><updated>2022-12-22T07:56:20+00:00</updated><author><name>ABS Consulting</name></author><publisher><name>Rothstein Publishing</name></publisher><dcterms:language>eng</dcterms:language><categoryscheme="http://www.bisg.org/standards/bisac_subject/index.html"term="Business & Economics"label="Business & Economics"/><summary>Are you trying to improve performance, but find that the same problems keep getting in the way? Safety, health, environmental quality, reliability, production, and security are at stake. You need the long-term planning that will keep the same issues from recurring. Root Cause Analysis Handbook: A Guide to Effective Incident Investigation is a powerful tool that gives you a detailed step-by-step process for learning from experience. Reach for this handbook any time you need field-tested advice for investigating, categorizing, reporting and trending, and ultimately eliminating the root causes of incidents. It includes step-by-step instructions, checklists, and forms for performing an analysis and enables users to effectively incorporate the methodology and apply it to a variety of situations. Using the structured techniques in the Root Cause Analysis Handbook, you will: Understand why root causes are important. Identify and define inherent problems. Collect data for problem-solving. Analyze data for root causes. Generate practical recommendations. The third edition of this global classic is the most comprehensive, all-in-one package of book, downloadable resources, color-coded RCA map, and licensed access to online resources currently available for Root Cause Analysis (RCA). Called by users "the best resource on the subject" and "in a league of its own." Based on globally successful, proprietary methodology developed by ABS Consulting, an international firm with 50 years' experience in 35 countries. Root Cause Analysis Handbook is widely used in corporate training programs and college courses all over the world. If you are responsible for quality, reliability, safety, and/or risk management, you'll want this comprehensive and practical resource at your fingertips. The book has also been selected by the American Society for Quality (ASQ) and the Risk and Insurance Society (RIMS) as a "must have" for their members.</summary><linktype="image/jpeg"href="/opds/cover/30"rel="http://opds-spec.org/image"/><linktype="image/jpeg"href="/opds/cover/30"rel="http://opds-spec.org/image/thumbnail"/><linkrel="http://opds-spec.org/acquisition"href="/opds/download/30/pdf/"length="24812876"mtime="2022-12-22T07:56:20+00:00"type="application/pdf"/></entry></feed>Code language:HTML, XML(xml)
有了对 OPDS 目录的支持,我创建了如下工作流来实现对出版物的搜索并将所有搜索文档都上传至 Google Drive。
将书籍从 Calibre 书库搜索出来并上传至 Google Drive
我通过 Webhook 将搜索字符串传递给 OPDS 来搜索出版物。
其他
reMarkable 2 还有很多值得探索的地方,例如模板方面。reMarkable 2 对 PDF 格式支持的完成度惊到了我,尤其是对 PDF 内链的支持。很多电纸书,对 PDF 文档内的链接几乎是不支持的。即便是像目录这种非常必要的内链,也是通过调出目录列表来实现点击跳转,并不能直接在阅读过程中点击跳转。
Multi-factor authentication (MFA; encompassing authentication, or 2FA, along with similar terms) is an electronic authentication method in which a user is granted access to a website or application only after successfully presenting two or more pieces of evidence (or factors) to an authentication mechanism: knowledge (something only the user knows), possession (something only the user has), and inherence (something only the user is). MFA protects user data—which may include personal identification or financial assets—from being accessed by an unauthorised third party that may have been able to discover, for example, a single password.
Wikipedia
根据 Wikipedia 结合上文,简而言之,你需要通过设置保证除了提供用户名和密码以外,你还要提供至少多一个的认证信息,才能登录你的账号,比如说:
我很幸运地发现了一个叫 Have Fun English Club 的英语角,结识了一些有意思的朋友。在这我衷心感谢这几位朋友,是他们给了我很多动力,帮助我熬过了人生中极其灰暗的一段日子。刚开始的时候,我是典型的轻度哑巴英语。平时说中文的时候,不带打嗝的,一切到英语就立马变得小声,而且磕磕巴巴的。不过好在我这个人脸皮够厚,很快就和大家打成一片,当时我给自己的要求是可以错,但是不能怂。🤣 为了能够更多地结交朋友,我申请成为了 HFEC 的志愿者,去担任他们活动的 Group Leader,帮助他们一起起草 Topic。久而久之,我便喜欢上了练习英语(改天我会再写一篇日志,介绍一下我们英语角的活动模式。这个模式比较独特在当地英语角圈还是挺受欢迎的)
没多久,HFEC 因为一些内部原因解散了。突然之间没有英语角可以唠嗑了,大家觉得很无聊。为了能够继续磨练自己的口语和结交更多的朋友,我们几个在 HFEC 认识的老朋友就创立了 Whatever English Club,模式更多的是借鉴 HFEC 的模式,但增加了更多游戏元素,整体效果非常棒,在当地也小有名气了。
我个人先从看剧只开英文字幕开始,即便初期很多都听不懂,但是英文字幕也能提升阅读速度。我虽然也很喜欢看电影,但是我看的电视剧远多于电影,因为电视剧的对白更贴近日常,更能让我自己沉浸的更真实。如果因为字幕难度太高,依然跟不上的话,可以从英文动画片开始。因为大多数的英文动画片,语速比较慢,而且相对用词比较简单。为什么我用的是大多数,因为有例外,比方说 Rick and Morty,那语速和词汇量简直是噩梦。很长一段时间之后,在看片的时候,我会刷手机。如果发现自己跟不上了,就倒回去看。我承认这样子看片很费时间,但是这样子才能慢慢让自己听英语可以和听汉语一样。比方说,我现在就在边写日志边看少年谢尔顿。因为我们在听别人用汉语唠嗑的时候,并不需要多集中精神。多亏了这个练习,我现在可以在午饭点边吃盒饭边和其他时区的同事开会了。除此之外,我在做其他一些不需要集中精神的事情,例如:通勤、做饭、刷网页等等,也会听英语播客、新闻、电视剧对白等等。顺便吐槽一下,我一直觉得听新闻非常难。因为新闻很短,而且大多数情况下上一条和下一条完全没有上下文关系。
obj.menubar:setTitle("⌨️")
obj.menubar:setTooltip("Hot Key Info")
local hotkeys = hs.hotkey.getHotkeys()
local menuItem = {}
for key, value inpairs(hotkeys) dolocal item = { title = value["msg"] }
table.insert(menuItem, item)
end
obj.menubar:setMenu(menuItem)Code language:Lua(lua)
根据 Wikipedia 中,SVG 中的矢量图信息是以 XML 格式保存的,所以本质上 SVG 是一个 XML 文件。这样子一切就说得通了。
Scalable Vector Graphics (SVG) is an XML-based vector image format for two-dimensional graphics with support for interactivity and animation. The SVG specification is an open standard developed by the World Wide Web Consortium (W3C) since 1999.
SVG images are defined in a vector graphics format and stored in XML text files. SVG images can thus be scaled in size without loss of quality, and SVG files can be searched, indexed, scripted, and compressed. The XML text files can be created and edited with text editors or vector graphics editors, and are rendered by the most-used web browsers.