易栈网-膘叔

浏览模式: 标准 | 列表 | 图文
yzhan.com 居然只能做个人站

yzhan.com 居然只能做个人站

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

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

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

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

其实代码非常简单,如果是这样:
mix
.js('resources/front/visitors/visitors.js', 'public/js')
.sass('resources/front/visitors/sass/visitors.scss', 'public/css')
那就一切正常。如果加了这么一行:
mix
.js('resources/front/visitors/visitors.js', 'public/js')
.sass('resources/front/visitors/sass/visitors.scss', 'public/css')
.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:
{
"start":"concurrently \"npm:watch*\""
}
执行npm run start,就OK了。如果你不想看完整的输出。上面的scripts中可以改成:
{
"start":"concurrently -r \"npm:watch*\""
}
是的,你没有看错,就加了一个-r的参数
brew 切换为交大源

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(kettle) 在mac上无法运行

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

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

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了

我可能错怪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,然而仍然 失败,最后我用了一个超大端口,居然正常了

layerstack好象不支持VSC的远程编辑

layerstack好象不支持VSC的远程编辑

如题。之前还OK的。最近是只要一使用virtual studio code的远程编辑功能。1分钟内就会被拒绝连接。

怀疑可能是被对方的网络当成UDP攻击而自动产生的屏蔽。因为之前在使用v2ray的时候,用了KCP协议,结果就被断开了,所以只能使用TCP。象这个vsc的远程编辑,理论上也是UDP的(如果是TCP这样一直握手连接着,流量会飞起来吧?)
而UDP又容易 被攻击,所以 layerstack 才会有自动屏蔽机制 ?但这个对 VSC remote太不友好了。
如果是这个问题,那就只能不用喽(不过我已经发了ticket,希望他们能够针对VSC的协议有调整吧)
有意思的悟饭游戏厅

有意思的悟饭游戏厅

这两天在闲逛的时候,突然看到有人提及了《寄生前夜》,说是今天史克威尔突然注册了什么寄生前夜吧啦吧啦 的。然后我就想起来,好象20年前,我的寄生前夜还没有打完。

寄生前夜我是在98还是99年玩的?那时候的游戏机房,PS每小时要4元(比网吧贵多了),然而我仍然坚持了一把。之所以说没打完,这个就比较尴尬了,因为BOSS在给别人存档的时候,把我的记录给清了。那个年代,PS的记录存储卡容量有限,只能存有限的几个。如果过多了就需要删除其中一个。而我的记录就是那不幸的一个。

之后过了N年,随着模拟器的发展,其实我中间有玩过一次,在PSP1000上,用PS模拟器玩了一下。但最后卡在“换第二张盘”这个问题上。这个问题,网上很多人都遇到过,后面实在玩不下去就只能放弃。

最近在听到寄生前夜后,又搜了一下。发现NS上也有模拟器了:RetroArch,居然跨平台。但mac装了还是需要外接蓝牙手柄(没有看到有keyboard的设置)。最后找到了安卓上有模拟器,网上有人推荐了两个:小鸡模拟器和悟饭游戏厅。我都装了,但刚装完,google play说,小鸡里可能有损害系统的软件,于是我在没有测试的情况就将删除了小鸡。

打开悟饭,搜索寄生前夜,直接下载包然后就能够运行了。虚拟按钮一直在屏幕上,存档也是随时,感觉又回到了20年前。玩了一会感觉这样操作还是不太爽,突然想起来5年前买小米电视的时候,还买了两个蓝牙手柄,轻松的连接上去后,完全不用设置就直接能够玩了。

最后。。。晚上测试一下,mac是不是能够连接小米的手柄,如果OK,就不需要在手机上玩了。毕竟手机分辨率好象有点糊,当然最关键的是,屏幕太小了,毕竟20年也是在大电视上玩的,现在不能到退啊。

-----

悟饭的菜单点了好几下,发现有不少游戏都支持,还有DC的,看来现在手机的机能都不错啊,至少在玩大部分游戏的时候都没有感觉到卡顿。如果念旧的,可以试一下,因为我发现上面居然还有:重装机兵。或者你也可以玩玩当年FC的金庸群侠传。也是一个经典的游戏

VNC远程连上MAC后,安全隐私中的"允许"无法点击

VNC远程连上MAC后,安全隐私中的"允许"无法点击

如题。

在远程的mac mini上安装了proxifier,结果启动的时候需要权限,明明点了:ALLOW,但死活无效,查了下资料,好象是苹果的安全策略的问题,v2ex上也有很多人遇到,有人说,可以用键盘来按。(即使用TAB键,将光标移动到allow上,然后按空格,),但我试了。无效
很多人遇到了这个问题,大意是说,苹果为了安全,不允许远程桌面来按这些影响到系统的功能键。不过还是有人有办法,比如这个答案:
For those still struggling with this issue:

IF YOU ARE CONNECTING VIA REMOTE DESKTOP OR SCREEN SHARING or have any other mouse emulation running: It is not possible to actually click the Allow button in this mode!!

So do the following:

1、Run the installer until the location prompt
2、open System Preferences
3、Take a screenshot (CMD+SHIFT+3)
4、Open the screenshot with Preview, and select from top left to the button, and note down the coordinates
5、Then open Script Editor, and run the following line of code:
tell application "System Events" to click at {890, 460}
Use the coordinates from step 4. and make sure you don't move the Preferences window, and that no other window is overlaying the button. (It could be you need to give Script Editor Accessibility permission, but it will prompt you)
Now the button is actually clicked, and you can allow "Oracle America, Inc." to install. You might be prompted for a reboot. Then run the installer again and everything should work as expected!
因为这之前的例子,都是说virtualbox安装不上,但原理其实是一样的。
上面的意思是,你先触发这个窗口。然后利用cmd+shift+3这个系统快捷键截屏。然后用预览软件打开这个图片,在上面进行选择:从左上角往下。最后那个选择框定位点在哪里,那个坐标值就是步骤5要填写的
然后打开script editor(在实用工具里),输入tell application "System Events" to click at {890, 460},这个坐标就是用预览所看到的。
将窗口拖开,让 system preference 在最上层,点击script editor的运行。你会发现 allow已经点掉了。。。(前提是先解开锁,不然还是没有权限点)
感觉用了HTTPS,垃圾评论都比以前少了好多

感觉用了HTTPS,垃圾评论都比以前少了好多

如题,只是感觉而已。

ssldocker不能直接从http跳到https。纠结。最后还是用了nginx,不过nginx只用来跑80.
真是脱裤子放屁。直接nginx不就OK了吗?也算是偷懒吧,因为nginx只配置了一个rewrite 和error_page,加return 。就是不管3721,http的强跳https。然后https用ssldocker处理
没装acme和certbot。因为dns用了lightsail。。。感觉各种不顺便,反而ssldocker倒是能自动签名(除了泛域名)
ssldocker还是不稳定

ssldocker还是不稳定

如题。本来想切caddy的。caddy已经更新。但因为我用的是lightsail,结果又不能自动更新。而当前域名,我切到了aws 的lightsail。因为lightsail属于aws旗下,必须得由IAM等管理工具来配权限,然而lightsail却只有action没有policy。不知道怎么配了

但奇怪的是,ssldocker却可以申请证书。caddy一直报没有权限(caddy我还配置了aws_app_key.....反而不行,而ssldocker啥也不要)

再坚持几天。如果ssldocker继续 不稳定(systemd 重启失败多次),还是恢复成nginx + acme.sh (或者certbot)。。或者。。。实在不行,切回dnspod!!!NND