npm使用国内镜像安装Electron

shell:

ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/ npm install --registry=https://registry.npmmirror.com -g electron

如仍然无法运行,cdnode_modules/electron/,执行

ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/ node install.js

Windows cmd:

set ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/
npm install --registry=https://registry.npmmirror.com -g electron

如仍然无法运行,cdnode_modules/electron/,执行

set ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/
node install.js

CentOS 7无法为nginx自动续期Let’s Encript证书的解决办法

使用crontab来自动为nginx续期证书,但一直失败,命令为:

certbot --nginx renew

在 /var/log/letsencrypt/ 下的日志文件显示:
Could not find a usable ‘nginx’ binary

可能是在PATH中未找到nginx可执行程序,可以手动指定,最终命令如下:

certbot --nginx --nginx-ctl /usr/sbin/nginx renew

参考资料:
https://community.letsencrypt.org/t/certbot-cron-job-nginx-plugin-noinstallationerror/67572

在有CSS transform属性的元素内position fixed定位错误的解释

当容器元素具有CSS transform定义时,会隐式地生成定位容器,transform容器及其子元素都会相对于该隐式容器做transform变换,即便内部元素具有position:fixed也无法逃脱,其行为就好像设置了position:absolute,详见参考资料。

参考资料

https://stackoverflow.com/questions/9115880/css-transform-translate-moves-postionfixed-inner-div

https://meyerweb.com/eric/thoughts/2011/09/12/un-fixing-fixed-elements-with-css-transforms/

卸载ECS上阿里云盾程序

卸载套路云方法一

wget http://update.aegis.aliyun.com/download/uninstall.sh 
chmod +x uninstall.sh 
./uninstall.sh 

卸载套路云方法二

wget http://update.aegis.aliyun.com/download/quartz_uninstall.sh 
chmod +x quartz_uninstall.sh 
./quartz_uninstall.sh 

卸载残留

pkill aliyun-service 
rm -fr /etc/init.d/agentwatch /usr/sbin/aliyun-service 
rm -rf /usr/local/aegis* 
iptables -I INPUT -s 140.205.201.0/28 -j DROP 
iptables -I INPUT -s 140.205.201.16/29 -j DROP 
iptables -I INPUT -s 140.205.201.32/28 -j DROP 
iptables -I INPUT -s 140.205.225.192/29 -j DROP 
iptables -I INPUT -s 140.205.225.200/30 -j DROP 
iptables -I INPUT -s 140.205.225.184/29 -j DROP 
iptables -I INPUT -s 140.205.225.183/32 -j DROP 
iptables -I INPUT -s 140.205.225.206/32 -j DROP 
iptables -I INPUT -s 140.205.225.205/32 -j DROP 
iptables -I INPUT -s 140.205.225.195/32 -j DROP 
iptables -I INPUT -s 140.205.225.204/32 -j DROP 
屏蔽套路云盾 IP 

内容来源:https://www.v2ex.com/t/388454#r_4718005