Submitted by gouki on 2022, October 20, 2:02 AM
在很久很久以前,我其实一直是使用阿里云的,直到后面腾讯也出了云。当然使用量明显没有阿里大,而且我还一直是推荐阿里的。
由于国内的一些原因,有些网站没法备案(比如个人网站,还不能介绍自己做的项目,只能用公司网站。。),所以,部分网站采用了香港的服务器。
在早些年吧,用aws的lightsail,便宜,但没有香港区,只有:日本、韩国、新加坡,这些地区吧,白天访问都挺正常,一到晚上就开始抽风,于是几乎全部撤出,采用阿里云香港。
前两年都挺OK。好象从21年起,阿里云香港也开始逐步抽风了,最高的时候丢包率达到了25%左右,白天也是一切正常。
因此只能想办法再尝试尝试换了。这次就换到腾讯去了,看看效果如何。
--
话说从03年到现在,也算是用了不少服务器了。
04~05,自己买AMD的芯片组装的windows服务器,托管在上海漕河泾,后因为那边经常断电烧坏了
08年开始,买了朋友的一台dell的2U,托管在edong,也是因为他们迁机房的问题,导致我整个断网2个月,alexa排名从1万掉到10万开外,就再也没有恢复过
11年开始使用linode,然后就是各种其他的大大小小的、知名的不知名的服务器都在尝试,感觉就是在不停踩坑
用过GCP、AWS,还有盛大云、DO,OVH的等。后面因为开始做外包,慢慢全部不再使用,直接用国内的阿里云,这两年在慢慢切回腾讯云。
有几个小原因,比如备案,你在A站备案,到腾讯还是不能使用2级域名。必须要在他那边备案,所以才不得不使用香港主机,先用起来,后面备案再切。所幸现在的网站都是git来git去的。基本上部署一个网站也就半小时就行了。
没用docker,PHP用docker感觉没啥大意义。之前用过,因为要跑不同的PHP版本,从5.6~8都有,那时候不得不用docker。现在基本上都以7.4为主,即使上8也不会有大问题,所以不再使用Docker了。
废话说的太多了,睡觉~
Misc | 评论:0
| 阅读:747
Submitted by gouki on 2022, October 19, 9:43 AM
突然发现uniapp好象无法分类。
用uniapp的时候突然发现使用背景图的时候打包无法打进去。本来这也没多大事,毕竟所有的图片几乎都是从网上拉过来的。但只是一个背景色也要从网上下载就有点麻烦了。所以就看了一下
1、如果不是变量的,得用相对路径,比如 /static/background.png,要写成 ../../static,注意当前文件和static的相对路径
2、如果是变量的,得一一require进来。然后用变量与require的对量对应
3、或者你还是用image标签,但是这个image标签外用view做好对应,如果上面有堆叠其他内容,会相对比较麻烦一点
4、还是用网上的地址吧,尽量使用云存储,不然如果是小水管网站,这么一拉取,其他内容可能变被卡住了。
基本上就这么些方法。
Javascript | 评论:0
| 阅读:756
Submitted by gouki on 2022, October 14, 9:49 PM
其实我一直在想,这个功能什么时候会被关掉。
开始:
用cloudflare tunnel的时候,从没想过会在macos上出问题,如果你直接cloudflared service install,不会运行,即使你sudo了也不会,因为这个运行的只是cloudflared,并不带任何参数。
需要在相应的plist下面加上<string>tunnel</string><string>run</string>才OK。
加之前需要先unload,然后再load。否则无效。
其他都与官方一致。
---
如果用sudo了。需要将~/.cloudflared/下的内容copy到/etc/cloudflared下面。如果不放心或者担心没权限,可以修改uuid.json,将路径改为/etc/cloudflared/。其他照旧
记得配合一下valet,因为valet tld之后,子域名的映射会比较方便。
而且valet也支持multi php version。
---EOF
苹果相关 | 评论:0
| 阅读:866
Submitted by gouki on 2022, October 14, 11:25 AM
远程操作家里的mac mini进行更新的时候,突然报错:
XML/HTML代码
- mini:Homebrew mini$ brew update
- Warning: No available formula with the name "ca-certificates".
- ==> Searching for similarly named formulae...
- Error: No similarly named formulae found.
- ==> Searching for a previously deleted formula (in the last month)...
- Warning: homebrew/core is shallow clone. To get its complete history, run:
- git -C "$(brew --repo homebrew/core)" fetch --unshallow
-
- Error: No previously deleted formula found.
- ==> Searching taps on GitHub...
- Error: No formulae found in taps.
- Error:
- homebrew-core is a shallow clone.
- To `brew update`, first run:
- git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow
- This command may take a few minutes to run due to the large size of the repository.
- This restriction has been made on GitHub's request because updating shallow
- clones is an extremely expensive operation due to the tree layout and traffic of
- Homebrew/homebrew-core and Homebrew/homebrew-cask. We don't do this for you
- automatically to avoid repeatedly performing an expensive unshallow operation in
- CI systems (which should instead be fixed to not use shallow clones). Sorry for
- the inconvenience!
于是执行
git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow ,然而执行下来还是:
XML/HTML代码
- error: RPC failed; HTTP 504 curl 22 The requested URL returned error: 504 Gateway Time-out
- fatal: the remote end hung up unexpectedly
然后我就用打开git trace进行查看:
XML/HTML代码
- GIT_TRACE=2 git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow
- 10:29:28.798061 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Applications/Xcode.app/Contents/Developer/usr/bin/git
- 10:29:28.798668 exec-cmd.c:236 trace: resolved executable dir: /Applications/Xcode.app/Contents/Developer/usr/bin
- 10:29:28.799328 git.c:418 trace: built-in: git fetch --unshallow
- 10:29:28.801482 run-command.c:643 trace: run_command: GIT_DIR=.git git-remote-https origin https://mirrors.ustc.edu.cn/homebrew-core.git
- 10:29:28.812513 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Applications/Xcode.app/Contents/Developer/usr/libexec/git-core/git-remote-https
- 10:29:28.813122 exec-cmd.c:236 trace: resolved executable dir: /Applications/Xcode.app/Contents/Developer/usr/libexec/git-core
- 10:29:28.929816 run-command.c:643 trace: run_command: git fetch-pack --stateless-rpc --stdin --lock-pack --include-tag --thin --depth=2147483647 https://mirrors.ustc.edu.cn/homebrew-core.git/
- 10:29:28.935164 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Applications/Xcode.app/Contents/Developer/usr/libexec/git-core/git
- 10:29:28.935863 exec-cmd.c:236 trace: resolved executable dir: /Applications/Xcode.app/Contents/Developer/usr/libexec/git-core
- 10:29:28.936585 git.c:418 trace: built-in: git fetch-pack --stateless-rpc --stdin --lock-pack --include-tag --thin --depth=2147483647 https://mirrors.ustc.edu.cn/homebrew-core.git/
- error: RPC failed; HTTP 504 curl 22 The requested URL returned error: 504 Gateway Time-out
- fatal: the remote end hung up unexpectedly
这个。。--depth=2147483647,居然这么深?
---
在非正常之前,做了不少操作,比如用官方的uninstall脚本清除了系统,然而也没有什么用。所幸,现在正常了。
苹果相关 | 评论:0
| 阅读:829
Submitted by gouki on 2022, October 13, 10:55 PM
在我的页面中第一行,其实以前一直有一行:<!--<!DOCTYPE html><head></head><body></body></html>-->
看起来好象没什么用,但其实他在http时代防止了不少运营商的页面劫持。那时候在没有https的时代,很多运营商会在网页的html里嵌入一个iframe,用来显示他们的广告或者其他内容。大部分都是往<head>里插入一个js或者在<body>里扔一个iframe,而我上面的代码,其实就在页面上有了两个head和body,但因为是注释的,所以即使这些运营商劫持了,他注入的内容往往都被注释掉了。
逃过一劫,但到了https的时代后,其实就比较难了。所以刚才在看到模板的时候,还是忍不住删除了。
看看以前的记录:
Misc | 评论:0
| 阅读:783