将 npm 源设置为国内源的方法
因为一些众所周知的原因,我们有时用默认源会出错或者下载速度太慢,解决方法很简单,用国内的 npm 源就好了。
方法也很简单,只要一句命令:
npm config set registry http://registry.cnpmjs.org
Write the code, change the world.
因为一些众所周知的原因,我们有时用默认源会出错或者下载速度太慢,解决方法很简单,用国内的 npm 源就好了。
方法也很简单,只要一句命令:
npm config set registry http://registry.cnpmjs.org
今天看一个视频教程,看到视频中的老师用 subl .
命令,来用 Sublime Text 打开当前目录,还有用 Chrome index.html
命令,来用 Chrome 打开 index.html,真是酷炫!一开始没查到资料,上 Segmentfault 提问,别人给了个关键词 alias
,自行查了下资料,将这酷炫的方法实现了。
Linux官方内置Bash中新发现一个非常严重安全漏洞(点击查看漏洞参考),黑客可以利用该Bash漏洞完全控制目标系统并发起攻击。建议各位Linux使用者尽快修复这个漏洞!
使用此命令:
env x='() { :;}; echo vulnerable' bash -c "echo this is a test"
若输出
vulnerable
this is a test
则表示存在此漏洞。
修复后则会输出
bash: warning: x: ignoring function definition attempt
bash: error importing function definition for `x'
this is a test
可通过更新 bash 并重启系统来解决这个问题:
yum update bash
更新后需要重启。
apt-get update
apt-get install bash
Ubuntu 无需重启。