原文:http://imweb.io/topic/56172ddc5d6f37745e8f4982
- 网站主机上添加文件夹
$ mkdir ~/git-dir.git // 代码仓库
$ mkdir ~/dep-dir-1 // 测试目录
$ mkdir ~/dep-dir-2 // 正式上线目录
- 远程repository初始化
原文:http://imweb.io/topic/56172ddc5d6f37745e8f4982
$ mkdir ~/git-dir.git // 代码仓库
$ mkdir ~/dep-dir-1 // 测试目录
$ mkdir ~/dep-dir-2 // 正式上线目录
修改 Mac 终端, 隐藏主机名和用户名
让你的 Terminal 变得干净,简洁。
vim ~/.bash_profile
export PS1="\W \$ "
查看 MacOS 自带 Apache2 版本
$ apachectl -v
启动 Apache2 后,浏览器打开http://localhost ,显示It works!
说明Apache已经启动。
$ apachectl start
Apache的默认根目录/Library/WebServer/Documents
EPEL源
$ sudo rpm -Uvh http://www.gtlib.gatech.edu/pub/fedora-epel/6/i386/epel-release-6-8.noarch.rpm
Install
$ sudo yum -y install docker-io
// 😎 JS闭包: 定义在函数内的子函数,子函数作为函数返回值返回。 | |
// 效果:在函数外面通过子函数,可以访问函数的内部变量。 | |
// 运行效果 http://runjs.cn/detail/mvhnvgsq | |
function test1() { | |
var name = "The Window"; | |
var object = { | |
name: "My Object", | |
getNameFunc: function () { | |
return function () { |
If you use Storybook with Next.js and have components using next/link
you'll have to mock next/router
the same you would for testing with Jest or others. Simply create a file with the mock router as shown below and import it in your Storybook config.
This is based on some information from an issue on Next.js:
// XSS 对应 | |
function escapeHtml(value) { | |
if (typeof value !== 'string') { | |
return value | |
} | |
return value.replace(/[&<>`"'\/]/g, function(result) { | |
return { | |
'&': '&', | |
'<': '<', | |
'>': '>', |