macOS 升级到 14.0 Sonoma 之后,发现 brew 安装的 nginx 无法启动了。

sudo brew services list 查看状态:

nginx error  256 root /Library/LaunchDaemons/homebrew.mxcl.nginx.plist

手动启动之:

$ sudo brew services start nginx 
Warning: Taking root:admin ownership of some nginx paths:
  /opt/homebrew/Cellar/nginx/1.25.2/bin
  /opt/homebrew/Cellar/nginx/1.25.2/bin/nginx
  /opt/homebrew/opt/nginx
  /opt/homebrew/opt/nginx/bin
  /opt/homebrew/var/homebrew/linked/nginx
This will require manual removal of these paths using `sudo rm` on
brew upgrade/reinstall/uninstall.
Warning: nginx must be run as non-root to start at user login!
Bootstrap failed: 5: Input/output error
Error: Failure while executing; `/bin/launchctl bootstrap system /Library/LaunchDaemons/homebrew.mxcl.nginx.plist` exited with 5.

- 阅读剩余部分 -

macOS 升级到了新版本的 14.0 Sonoma,多了很多个视频壁纸,试了一下还是不太喜欢。

据说视频壁纸占用不少空间,macOS 的存储空间太金贵,既然不喜欢用不到,还是要清理一下视频壁纸的。

研究了一下,视频壁纸在 /Library/Application Support/com.apple.idleassetsd/Customer/4KSDR240FPS/ 这个目录,当然要想在访达(Finder) 里打开最好还是用终端程序。

- 阅读剩余部分 -

从某些角度讲,我是一个保守派。

就比如各种家用小电器,电动剃须刀、电动冲牙器,还有玩具之类的,我就非常不喜欢内置锂电池款的。

虽说内置电池可以省下买 5 号 7 号电池的钱,但真正使用的时候就就会发现这几个问题:

- 阅读剩余部分 -

今天为了本地编译一个开源软件,用 homebrew 安装了 rustc,结果后来发现导致 php 命令报错。

dyld[16856]: Library not loaded: /opt/homebrew/opt/libavif/lib/libavif.15.dylib
  Referenced from: <87C1A268-34E4-396F-8BBC-D5591064E333> /opt/homebrew/Cellar/gd/2.3.3_5/lib/libgd.3.dylib
  Reason: tried: '/opt/homebrew/opt/libavif/lib/libavif.15.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/libavif/lib/libavif.15.dylib' (no such file), '/opt/homebrew/opt/libavif/lib/libavif.15.dylib' (no such file), '/usr/local/lib/libavif.15.dylib' (no such file), '/usr/lib/libavif.15.dylib' (no such file, not in dyld cache), '/opt/homebrew/Cellar/libavif/1.0.1/lib/libavif.15.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/libavif/1.0.1/lib/libavif.15.dylib' (no such file), '/opt/homebrew/Cellar/libavif/1.0.1/lib/libavif.15.dylib' (no such file), '/usr/local/lib/libavif.15.dylib' (no such file), '/usr/lib/libavif.15.dylib' (no such file, not in dyld cache)
Abort trap: 6

- 阅读剩余部分 -

国内大厂的 APP 如微信、支付宝、抖音、京东等等都搞了自己平台的小程序,本质上其实都是一种集成了各自平台能力的 Web 应用。国外没有这种东西是因为行业更加规范,没必要多此一举,因为 PWA 完全满足需求了。

PWA 简介

渐进式 Web 应用(Progressive Web App,PWA)是一个使用 web 平台技术构建的应用程序,但它提供的用户体验就像一个特定平台的应用程序。

它像网站一样,PWA 可以通过一个代码库在多个平台和设备上运行。它也像一个特定平台的应用程序一样,可以安装在设备上,可以离线和在后台运行,并且可以与设备和其他已安装的应用程序集成。

- 阅读剩余部分 -

以前收藏了很多 txt 书籍小说,今天整理的发现在 macOS 下 GBK 编码的 txt 文件无法使用预览功能。

熟悉终端(Terminal)的用户可以使用 iconv 命令转换一下文本文件的编码格式。

不熟悉的话,可以使用 Sublime/VSCode 之类的编辑器(程序员常用)打开 TXT 文件,编辑器会自动适配编码展示中文,注意此时不要保存,要复制,然后打开一个新的窗口粘贴进去保存为新文件。

下面来说一下使用终端程序怎么处理。

命令参考:

- 阅读剩余部分 -