其实ssldocker的效率并不高,而且网上几乎没有啥文档
膘叔的简单人生
其实ssldocker的效率并不高,而且网上几乎没有啥文档
关闭中国移动的高频防骚扰功能了(当初开通是:KTFSR发到10086,取消是QXFSR到10086),电话确实少接了不少,但问题是,我也不知道哪些电话确实是骚扰电话了。更可恨的是,微信的客户验证那边的电话,个个都在高频骚扰电话里。
尝试使用laravel的时候,看到有推荐且指定要用Homestead,其实我一直用MAMP,看博客的人都知道。用了N年了。但从更早的博客看的话,应该是会发现我是用虚拟机+NFS来进行代码和虚拟域名管理的。
那时候只要装一个hosts管理软件,然后指定127.0.0.1 为host,同时将虚拟机的端口映射出来就行了。所有的apache/nginx配置都在虚拟机里完成。好处当然有,在那个没有vagrant的年代,vmware+虚拟机文件,团队里就有统一的开发环境了,这时候不用担心他们用windows还是用mac又或者用linux。环境统统一样。
现在homestead,其实也是做了同样的事情。各种东西帮你装好(嗯,以前装虚拟机还要自己折腾)
之前弄好的时候,vagrant ssh都可以直接免密登录的(毕竟读Homestead.yaml,其实是Homestead下有一个Vagrantfile,里面的脚本让他可以读到Homestead.yaml)。
刚才修改了一下Homestead.yaml,结果登录的时候就需要输入密码了,密码当然没啥问题,不就是vagrant么。但为什么呢?报错信息是:Guest-specific operations were attempted on a machine that is not ready for guest communication. This should not happen and a bug should be reported.网上查了查,很多人出现过这个情况:有人说,删了~/.vagrant.d目录就行了。但我不行啊。这个目录下有6G,而且我下的box是支持parallels desktop的。如果重下,代价太大了。(网速太慢)
我尝试vagrant halt再vagrant up,发现一个问题,提示我有一个port从8025没法映射到mac 的8025,而改成2200了。我想了想,好象我在mac安装了mailhog,难道是因为这个原因?于是我brew services stop mailhog,再vagrant up,果然 没有报错
再回到之前的google搜索,在这里:https://github.com/hashicorp/vagrant/issues/8499,有个人也有提出:
The fix for this issue was released in the plugin. The root cause is due to the network reset after applying port forwards. It causes DHCP configured devices to drop their address and re-acquire a new lease which leads to the "Guest-specific operations..." error. The fix adds a pause after applying the forwards before continuing. If you find that the pause is not long enough, it can be configured using a provider configuration option: https://www.vagrantup.com/docs/vmware/configuration.html#port_forward_network_pause
Cheers!
---EOF---
好了,问题解决。安心 睡觉
直接git clone weui小程序的项目,然后wepy build会出错。即使之前你运行npm install。
npm WARN wepy-compiler-less@1.3.14 requires a peer of less@^3.8.1 but none is installed. You must install peer dependencies yourself.
npm WARN wepy-weui-demo@1.0.0 No repository field.
使用laravel的人,好象一直都推荐使用homestead,所以我也就尝试了一下。由于默认的vagrant都是用的virtual box,而我一直是嫌弃他繁,而且几年前耗的资源让我心有余悸,再加上我本地本来就有Parallels Desktop,所以我就找找资料,看看能不能使用parallels。
结果是出人意料的好,官方也支持,只是需要安装个插件,戳这里看一下:https://parallels.github.io/vagrant-parallels/docs/getting-started.html,几行命令行可:vagrant plugin install vagrant-parallels,
然后就是初始化了,vagrant init laravel/homestead,这时候会跳出个选择,就象这样:
==> box: Loading metadata for box 'laravel/homestead'
box: URL: https://vagrantcloud.com/laravel/homestead
This box can work with multiple providers! The providers that it
can work with are listed below. Please review the list and choose
the provider you will be working with.
1) hyperv
2) parallels
3) virtualbox
4) vmware_desktop
Enter your choice: 2
==> box: Adding box 'laravel/homestead' (v8.0.0) for provider: parallels
选择2 就行了。然后就会开始下载。由于下载地址在github上面,然后实际 是在aws的S3上,痛苦的事情就这样来了。。。不爬梯子动也不动。番了墙也只有400多K,所幸,1个多小时就下载下来了。
然后vagrant up --provider=parallels,这样就好了
vagrant up --provider=parallels
/opt/vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/util/which.rb:37: warning: Insecure world writable dir /server in PATH, mode 040777
Bringing machine 'default' up with 'parallels' provider...
==> default: Registering VM image from the base box 'laravel/homestead'...
==> default: Creating new virtual machine as a linked clone of the box image...
==> default: Unregistering the box VM image...
==> default: Setting the default configuration for VM...
==> default: Checking if box 'laravel/homestead' version '8.0.0' is up to date...
==> default: Setting the name of the VM: blessappyzhancom_default_1563640904299_97304
==> default: Preparing network interfaces based on configuration...
default: Adapter 0: shared
==> default: Clearing any previously set network interfaces...
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 10.211.55.9:22
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Connection refused. Retrying...
default:
default: Vagrant insecure key detected. Vagrant will automatically replace
default: this with a newly generated keypair for better security.
default:
default: Inserting generated public key within guest...
default: Removing insecure key from the guest if it's present...
default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
==> default: Checking for Parallels Tools installed on the VM...
==> default: Parallels Tools installed on this VM are outdated! In most cases
==> default: this is fine but in rare cases it can cause things such as shared
==> default: folders to not work properly. If you see shared folder errors,
==> default: please update Parallels Tools within the virtual machine and
==> default: reload your VM.
==> default: Installing the proper version of Parallels Tools. This may take a few minutes...
==> default: Parallels Tools have been installed. Rebooting the VM...
==> default: Attempting graceful shutdown of VM...
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
==> default: Machine booted and ready!
==> default: Mounting shared folders...
default: /vagrant => /server/wwwroot/yzhan/test.com
运行一下vagrant ssh ,顺利登录,而且看到 当前项目目录下有一个 .vagrant的目录,里面都是一些配置文件等。
到此,安装结束,看了下进程,占CPU0.x,内存400多M。ssh进去后php-fpm的进程超级多。从5.6~7.3的都有。安心的用了
本地采用mamp pro进行开发,这意味着,我可以使用 163.com给本地项目,但其实这个域名是被mamp pro 写到了/etc/hosts中,定义为127.0.0.1
OK,现在说正事,线上域名,我采用了类似test.app.yzhan.com,给mamp的项目也是这样定义。所以,在极端情况下,我可能分不清哪个是线上,哪个是线下。问题就这样发生了。因为我test.app.yzhan.com为了装逼,引入了https。但本地没有启用。这个好处是啥?打开http的时候,我就知道,这肯定是本地,打开https的时候这肯定是线上。
然而新版的chrome却不管这些。如果你先打开test.app.yzhan.com再打开https://test.app.yzhan.com,神奇的效果就这样发生了。无论你怎么输入http://test.app.yzhan.com,chrome都会帮你跳转到https://test.app.yzhan.com。这可不是我想要的。。。
找了下资料,问了下google,找到:chrome://net-internals/#hsts,在最下面的 Delete domain security policies, 将域名输入进去,点击删除,世界清静 了
自从 laravel-china他们发了牢骚,说是镜像被人恶意引用,自己找不住了。果然这两天国内又增加了两个
1、https://mirrors.cloud.tencent.com/composer/ ,用法:
composer config -g repos.packagist composer https://mirrors.cloud.tencent.com/composer/
2、https://mirrors.aliyun.com/composer/index.html,用法:
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
还没有测试,之前腾讯的我试过不行,所以继续 在用laravel-china的。不知道阿里怎么样。
#更新
腾讯云的还是不要用吧,我用composer update的时候,报错:https://mirrors.cloud.tencent.com/composer/p/provider-2013%2487216f389bc25a4f5d03d0cfb1a56cff043b3b3d9cb8faf4
1214c3001d51cb37.json 说是这个文件签名不符:The contents of https://mirrors.cloud.tencent.com/composer/p/provider-2013%2487216f389bc25a4f5d03d0cfb1a56cff043b3b3d9cb8faf4
1214c3001d51cb37.json do not match its signature.用浏览器打开一看,我靠,文件404,也不知道他是怎么做镜像的。哎。(放弃吧)
看了下laravel-china,他们申请不再提供了(即将)。然后他们也提供了一些镜像地址(网址是:https://learnku.com/composer/wikis/30594),比如:
镜像类型:全量镜像
更新时间:1 分钟
镜像地址:https://php.cnpkg.org
官方地址:https://php.cnpkg.org/
镜像说明:此 Composer 镜像由安畅网络赞助,目前支持元数据、下载包全量代理。
镜像类型:非全量镜像
镜像地址:https://packagist.mirrors.sjtug.sjtu.edu.c...\
官方地址:https://mirrors.sjtug.sjtu.edu.cn/packagis...\
镜像说明:上海交通大学提供的 composer 镜像,稳定、快速、现代的镜像服务,推荐使用。
---EOF--
感谢这些平台为PHP开源世界做的贡献,就是不知道PHP还能走多远,或许下一步就是GO或者PYthon了。如果PHP只是用来做API(做CRUD),那么go和python短时间内肯定还不如php好用,但如果是做其他,比如爬虫类的,PHP就远远不行了(不是不能做,而且总差那么一口气,虽然我们在最早实现了PHP的工业化采集器,但真要用来做大型的,还是不够),其实这些年已经尝试半工业化了,比如实现PHP采集Server,队列,远程扔个规则上来,接下来就自动处理,多台机器读取队列等等。总还是没有象其他语言那样(我看情况是不是整理整理放出来,代码很垃圾)
google搜索一下:0B47189 mac 中键,会有不少答案。
如题,发现已经90%以上的友链都消失了。这年头还在坚持写博客的,大概也就剩我了吧(笑cry)
话说回来。14年的时候就想着要用Yii2将它重写。结果到19年了,连原作者都被抓了,我还没有重写。只是为它做了几个优化
1、支持PHP7,嗯,数据库连接库也换成PDO的了。正则也换掉了。。。。基本上会报错的地方都处理了
2、优化了一下非本地数据库(原来批量删除评论有BUG,也处理了)
现在最烦的就是编辑器,所以当时才有想法要换,但看看现在的编辑器,又感觉没有什么编辑器是好的,所以就扔在那里。。。。等闲着的时候真的好好写了换掉吧(主要是没钱,哈哈)
不知道从什么时候,华为的M3青春版不再内置GMS Core了,通过华为自带的市场安装 google play(早期这样安装后,会自动触发GMS安装和google play service的安装),然而现在不行了,打开google play store会提示你。缺少gms core。
肿么办?网上有文件,还有不少地方有教程,比如B站。还提示你,要下载52M的gms安装包,不是44M的之类的,我这里提供一下:http://a8.pc6.com/dp7/GMSanzhuangqi.apk,和 http://data.coderhuo.tech/blog/google_service_tool/gms.apk,自行下载一下即可
然后安装时你会遇到一个大问题:系统提示此软件不安装,不允许安装。这时候,打开设置-》安全和隐私-》允许安装第三方应用【外部来源应用安装】(如果原来选中的,先取消再选中,会有个弹窗提示你,是否在线检测包体安装,临时取消一下。安装完后再选中就行)
如果你原来系统里安装了GMS或者其他google工具,GMS安装器会提示你,并让你全部删除。系统会自动重启。重启后可以继续 安装。
安装完后,再回到华为市场,重新安装google play store。就一切都OK了。
对了。如果允许安装第三方应用那个功能无效,请参考 :http://blog.coderhuo.tech/2018/12/30/google_service_for_huawei/
--------
其实旧安卓的最大作用(对我来说),就是可以安装一系列的套件,如PHP、Mongo、MariaDB,甚至还有apache。
这时候再配合一下文件传输工具和termux的工具。你就是想怎么弄就都可以了。
再嫩个电信卡(几乎都无限流量的),弄个redis server,HOHO就是一台小型服务器(如果能够安装 frpc ,,,,那就是真的一台可对外的服务器了)。当然,如果要这么折腾。还是弄一台树莓吧。还更便宜。。。