mac下安装php-cgi有多种方法,这里只介绍比较简单的两个方法;
- 用brew安装
- 直接下载安装XAMPP
如果安装了xcode,那么推荐使用brew来安装php。详细使用方法见官网,这里只说明如何装php-cgi;
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
若地址栏URL为:abc.html?m=tomms&c=allsearchlist&pageNo=1&pageNum=20&text=1 | |
```js | |
//JavaScript获取url,并把url中的参数变成数组的方法,arr数组的值就是各参数值 | |
var url = window.document.location.href.toString(); | |
var u = url.split("?"); | |
var arr = []; | |
if(typeof(u[1]) == "string"){ | |
u = u[1].split("&"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
假设你有3个commit如下: | |
commit 3 | |
commit 2 | |
commit 1 | |
其中最后一次提交commit 3是错误的,那么可以执行: | |
git reset --hard HEAD~1 | |
你会发现,HEAD is now at commit 2。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yum -y update | |
yum -y install wget | |
wget --no-check-certificate https://raw.githubusercontent.com/teddysun/shadowsocks_install/master/shadowsocks.sh | |
chmod +x shadowsocks.sh | |
./shadowsocks.sh 2>&1 | tee shadowsocks.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--360浏览器--> | |
<meta name="renderer" content="webkit"> | |
<!--其它双核浏览器--> | |
<meta name="force-rendering" content="webkit"> | |
<!--如果安装了GCF,则使用GCF来渲染页面,如果没有安装GCF,则使用最高版本的IE内核进行渲染。--> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 提取淘宝地址库 | |
* | |
* 用法: | |
* 1. 打开淘宝 https://www.taobao.com/ | |
* 2. 将下面代码复制到控制台 | |
* 3. 按回车 | |
* 4. 复制输出的 json 数据保存到你的文件 | |
* | |
* 仅支持: chrome 48+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm set registry https://registry.npm.taobao.org # 注册模块镜像 | |
npm set disturl https://npm.taobao.org/dist # node-gyp 编译依赖的 node 源码镜像 | |
## 以下选择添加 | |
npm set chromedriver_cdnurl http://cdn.npm.taobao.org/dist/chromedriver # chromedriver 二进制包镜像 | |
npm set operadriver_cdnurl http://cdn.npm.taobao.org/dist/operadriver # operadriver 二进制包镜像 | |
npm set phantomjs_cdnurl http://cdn.npm.taobao.org/dist/phantomjs # phantomjs 二进制包镜像 | |
npm set sass_binary_site http://cdn.npm.taobao.org/dist/node-sass # node-sass 二进制包镜像 | |
npm set electron_mirror http://cdn.npm.taobao.org/dist/electron/ # electron 二进制包镜像 |