看起来这个标题好象没啥,今天被折腾了好久
Submitted by gouki on 2020, July 16, 11:19 PM
看起来这个标题好象没啥,今天被折腾了好久
Submitted by gouki on 2020, July 16, 11:31 AM
这是一篇引用文章,原文来自:https://derflounder.wordpress.com/2020/01/18/creating-root-level-directories-and-symbolic-links-on-macos-catalina/,可能部分用户打不开,毕竟是wordpress.com。。。
One of the changes which came with macOS Catalina was the introduction of a read-only root volume for the OS. For users or environments which were used to using adding directories to the root level of the boot drive, this change meant they could no longer do that.
To address this need, Apple added a new method for creating directories at the root level which leverages Apple File System’s new firmlink functionality. Firmlinks are new in macOS Catalina and are similar in function to Unix symbolic links, but instead of only allowing travel one way (from source to destination) firmlinks allow bi-directional travel.
The use of firmlinks is exclusively reserved for the OS’s own use, but Apple has also made available what are called synthetic firmlinks. These synthetic firmlinks are how the OS enables folks to create directories and symbolic links on the read-only boot volume. For more details, please see below the jump.
To create a synthetic firmlink, you need to do the following:
1. Create a file in the /etc directory named synthetic.conf.
2. Make sure /etc/synthetic.conf has the following permissions:
3. In /etc/synthetic.conf, define the name(s) of the empty directory or symbolic link you want to have appear at the root level.
4. After all desired entries have been made, save the /etc/synthetic.conf file.
5. Restart the Mac to apply the changes.
For example, /etc/synthetic.conf may look like this:
Note: In those cases where you’re creating a symbolic link and are including a path, the start point for the directory path is not /. Instead, it is the next directory level down.
To show how this works, I’ve created a directory containing installer packages located at /Users/Shared/installers.
To create a symbolic link at the root level named installers which points to /Users/Shared/installers, I would do the following:
1. Create the /etc/synthetic.conf file if it didn’t already exist.
2. Add the following entry to the /etc/synthetic.conf file:
1
|
installers Users/Shared/installers |
3. Reboot the Mac.
Note: Whomever designed this came down on the “tabs” side of the “tabs vs. spaces” debate. When creating the separation between installers and Users/Shared/installers in the /etc/synthetic.conf file, you need to use tabs. If you use spaces instead, the synthetic firmlink won’t be created.
After the reboot, you should see a symbolic link named installers at the root level of the boot volume. When you navigate to it, you should see the contents of /Users/Shared/installers.
To remove the symbolic link, remove the relevant entry from /etc/synthetic.conf and then restart. After the reboot, the installers symbolic link should be missing from the root level of the boot volume.
For more information, please see the synthetic.conf man page. This is available by entering the following command in Terminal on macOS Catalina:
man synthetic.conf,可以看到内容大致这样:
Submitted by gouki on 2020, July 7, 2:39 PM
我只是做个记录。。虽然我没有用到。现在想想还是正版好。
https://shipengliang.com/download/switch/switch-firmware-%E5%9B%BA%E4%BB%B6%E4%B8%8B%E8%BD%BD.html
嗯。还是不要破解的好,只是健身环就有点扎实。从600多涨到1800多。这完全不让人活啊
----
国行增加了一个在线跳绳。。。汗
Submitted by gouki on 2020, July 7, 2:37 PM
有时候编译的时候会出现这个错误,提示是说:Use the `--scripts-prepend-node-path` option to include the path 。然后会告诉你有两个路径的存在
有个简单的办法,在项目根目录下面增加一个文件.npmrc,加入:
scripts-prepend-node-path=true
问题解决
Submitted by gouki on 2020, June 7, 2:54 PM
在nginx下配置Websocket的proxy_pass还是很方便的。几乎和默认的proxy_pass一致,只要加两行代码:
如果对http_upgrade和$connection_upgrade的变量有自定义,可以这样写:
如果不熟悉map的用法,这里有一篇中文的说明:https://blog.51cto.com/tchuairen/2175525,
至此,一个websocket 就配置好了,但偶尔你可能还是会发现ws会断开,所以最好设置一下超时时间。比如5分钟?
毕竟网络不好的时候。。30s或者60s是真有可能会数据发出去收不到的。干脆延长一点吧。
参考:
1、https://www.xncoding.com/2018/03/12/fullstack/nginx-websocket.html
2、https://blog.51cto.com/tchuairen/2175525