手机浏览 RSS 2.0 订阅 膘叔的简单人生 , 腾讯云RDS购买 | 超便宜Qcloud , 注册 | 登陆
浏览模式: 标准 | 列表2019年09月的文章

yzhan.com 居然只能做个人站

 不是不想转成公司,但实在太麻烦了。还好几乎所有的业务都是朋友介绍的。所以个人不个人感觉也无所谓

 
如果域名在个人,不能做公司站。如果是个人备案,不能放介绍性的东西。不能留固定电话,只能转成公司型的才可以。转成公司 型的吧。备案号就要注销重来。不知道这算是怎么个折腾法。苦逼
 
怪不得别人说:我给你讲个笑话,网站备案。现在公司的话还要公安备案。上次有个域名,我想备个案吧,结果 被退回来,说是。。。没有Www的网站不能备案。当时我就纳闷了。我只是用来给我自己的CSS和JS加速。。这怎么破
 
算了,先这样吧。反正也没啥业务。

laravel mix extract之后.scss编译出来是空文件

 应该不算是我姿势不对吧,网上不少人有这个问题:https://github.com/JeffreyWay/laravel-mix/issues/1914

其实代码非常简单,如果是这样:
JavaScript代码
  1. mix  
  2.   .js('resources/front/visitors/visitors.js''public/js')  
  3.   .sass('resources/front/visitors/sass/visitors.scss''public/css')  
那就一切正常。如果加了这么一行:
JavaScript代码
  1. mix  
  2.   .js('resources/front/visitors/visitors.js''public/js')  
  3.   .sass('resources/front/visitors/sass/visitors.scss''public/css')  
  4.   .extract([....])  
则生成出来的visitors.css为空文件。生成空文件的时候,还认为自己是从几个vue文件里做了提取。但事实上scss这个文件是孤立的。不含在vue里(确实是有一个提取vuestyle的参数,但我没设置),laravel-mix的作者居然说:No, answer is don't upgrade if you're using dynamic imports. See the Mix 4 release notes.
 
评论里有人说实在不行就分成两个js文件来处理吧。嗯,事实上我也这样做了,比如我我因为前后台分开,就这么折腾的,但也会带来问题,比如,后一个生成的manifest.json会覆盖前面的(如果你不用{{mix()}}函数,那不会遇到这个问题,因为你不用它。。。但如果你用了,就会遇到各种不同的小问题,除非你放在一个mix.js文件里,只是用路由来解决)
 
最后我确实是分拆了,利用了concurrently,直接加了一个scripts:
JavaScript代码
  1. {  
  2.     "start":"concurrently \"npm:watch*\""  
  3. }  
执行npm run start,就OK了。如果你不想看完整的输出。上面的scripts中可以改成:
JavaScript代码
  1. {  
  2.     "start":"concurrently -r \"npm:watch*\""  
  3. }  
 
是的,你没有看错,就加了一个-r的参数
 

brew 切换为交大源

 之前用中科大的,但好象中科大有缺失源,或者有时候在update的时候会卡。所以换到了 上海交大的源

一句话的命令:
 
cd "$(brew --repo)" && git remote set-url origin https://mirrors.sjtug.sjtu.edu.cn/git/brew.git && cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core" && git remote set-url origin https://mirrors.sjtug.sjtu.edu.cn/git/homebrew-core.git && cd "$(brew --repo)"/Library/Taps/homebrew/homebrew-cask && git remote set-url origin https://mirrors.sjtug.sjtu.edu.cn/git/homebrew-cask.git && echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.sjtug.sjtu.edu.cn/homebrew-bottles' >> ~/.bash_profile
 
说白了,就是改了:brew,brew-core,brew-cask,和brew-bottles的信息其他没啥
速度是真快了很多。
 
当然话说回来。中科大的源,说明文件是最详细的。。。。交大的,就一句话。

Pentaho data integration(kettle) 在mac上无法运行

Pentaho data integration ,从官方下载下来最新的安装包,解压之后,双击Data Integration,报安全问题,询问是否打开,同意并输入自己的开机密码。然后,等了几秒,发现没有任何反应,再次双击Data Integration,依然没有任何相应。

以为程序不兼容。但想想不应该,搜了一下,发现可能是权限的问题,说是直接运行 spoon.sh 可以运行。试了一下,确实OK。但不可能一直这样执行。继续找解决方案,最后居然是这么简单,运行一下:

XML/HTML代码
  1. sudo xattr -dr com.apple.quarantine ~/Downloads/data-integration/Data\ Integration.app  

这个问题在2017年就有人遇到了,看这里:https://edpflager.com/?p=3571,参考 一下即可。

现在,程序终于可以运行了

最后附上一堆教程:

1、https://www.staroon.dev/2018/07/18/KettleDoc-1/

 

 

我可能错怪layerstack了

 上一篇博客说了。我用vsc的ssh-remote的时候,30秒或者1分钟必断。错误信息一直就类似:

[04:30:38.608] "install" terminal command done
[04:30:38.609] Install terminal quit with output:
[04:31:18.258] SSH Resolver called for "ssh-remote+neatstudio.com", attempt 2
[04:31:18.258] SSH Resolver called for host: neatstudio.com
[04:31:18.259] Setting up SSH remote "neatstudio.com"
[04:31:18.259] Using commit id "f06011ac164ae4dc8e753a3fe7f9549844d15e35" and quality "stable" for server
[04:31:18.263] Running script with connection command: ssh -o ClearAllForwardings=true -o ConnectTimeout=15 neatstudio.com bash
[04:31:18.263] Install and start server if needed
[04:31:35.269] Connecting with SSH timed out
[04:31:35.269] TELEMETRY: {"eventName":"resolver","properties":{"outcome":"failure","reason":"Timeout"},"measures":{"resolveAttempts":2,"retries":1}}
[04:31:35.269] ------

重连后也是

[04:37:06.477] SSH Resolver called for "ssh-remote+neatstudio.com", attempt 12
[04:37:06.477] SSH Resolver called for host: neatstudio.com
[04:37:06.477] Setting up SSH remote "neatstudio.com"
[04:37:06.478] Using commit id "f06011ac164ae4dc8e753a3fe7f9549844d15e35" and quality "stable" for server
[04:37:06.479] Running script with connection command: ssh -o ClearAllForwardings=true -o ConnectTimeout=15 neatstudio.com bash
[04:37:06.480] Install and start server if needed
[04:37:21.515] > ssh: connect to host 123.176.103.247 port 22: Operation timed out
[04:37:21.515] Got some output, clearing connection timeout
[04:37:21.776] "install" terminal command done
[04:37:21.776] Install terminal quit with output: ssh: connect to host 123.176.103.247 port 22: Operation timed out
[04:37:21.776] Received install output: ssh: connect to host 123.176.103.247 port 22: Operation timed out
[04:37:21.777] The operation timed out
[04:37:21.777] TELEMETRY: {"eventName":"resolver","properties":{"outcome":"failure","reason":"OfflineError"},"measures":{"resolveAttempts":12,"retries":1}}
[04:37:21.777] ------

发了ticket给layerstack。他们测试也来没有这个问题。我开始以为是什么openfiles limit的问题。也打开到最大了。

期间调整了一下这个:echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p,因为开始有报inotify max error

直到他们给我发了一个ticket:

Thank you for your patience in this matter.

We have investigated the issue in detail and we are not able to recreate the issue from our end. We have checked the same from multiple locations and find out its working fine.

The reported issue seems to be related to your local ISP, so we suggest you to change the standard port (22) of SSH to some other non standard port like 2222 or 2244, in server and recheck the issue.

Please do have a check on our above suggestion and let us know if you still face any issues in accessing.

所以我就想了一下,直接把PORT改成了2222,2223,2244,然而仍然 失败,最后我用了一个超大端口,居然正常了