composer国内镜像源

使用方法:

修改项目根目录中的composer.json,修改或添加以下内容:

 

镜像源地址:

https://packagist.laravel-china.org/

Scrapy爬取内容去重

使用以下pipeline即可:

 

【摘自:】https://docs.scrapy.org/en/latest/topics/item-pipeline.html#duplicates-filter

 

安装swoole

若使用pecl或编译安装swoole时,出现如下类似错误,

则需要升级下gcc(达到5.0以上版本):

【摘自:】https://forum.phalconphp.com/discussion/17595/problem-with-compiled-phalcon-with-php-721

安装swoole时可能出现的错误

错误内容类似如下:

解决方式:

【摘自:】https://github.com/swoole/swoole-src/issues/2119

PS, 用 pecl install swoole 时,使用默认安装配置项比较容易成功

CentOS 7安装Shadowsocks客户端实现联网

链接:

1. https://i.jakeyu.top/2017/03/16/centos使用SS翻墙/

2. https://xeylon.com/server/140.html

 

备注:

1. 如果删除了privoxy,提示无法联网,可执行以下命令取消网络代理设置

【摘自】:http://blog.sina.com.cn/s/blog_5f54f0be0102v4tu.html

2. 运行以下命令查看SS服务器的IP地址:

【摘自:】https://xeylon.com/server/140.html

3. What’s the difference between /usr/lib/systemd/system and /etc/systemd/system?

4. 使用 service privoxy start 或  service sslocal start  失败或无法开机自启:https://www.cnblogs.com/liuxuzzz/p/5329536.html

yum安装PHP7

The CentOS 7 official software repositories have PHP 5.4 which has reached the end of life and no longer actively maintained by the developers.

To keep up with the latest features and security updates, you need a newer (probably the latest) version of PHP on your CentOS 7 system.

For the purpose of this guide, we will be operating the system as root, if that is not the case for you, make use of the sudo command to acquire root privileges.

Installing PHP 7 on CentOS 7

1. To install PHP 7, you have to install and enable EPEL and Remi repository on your CentOS 7 system with the commands below.

2. Next, you need to install yum-utils, a collection of useful programs for managing yum repositories and packages. It has tools that basically extend yum’s default features.

It can be used for managing (enabling or disabling) yum repositories as well as packages without any manual configuration and so much more.

3. One of the programs provided by yum-utils is yum-config-manager, which you can use to enable Remirepository as the default repository for installing different PHP versions as shown.

If you want to install PHP 7.1PHP 7.2 or PHP 7.3 on CentOS 7, just enable it as shown.

4. Now install PHP 7 with all necessary modules with the command below.

Afterwards, double check the installed version of PHP on your system.

Check PHP Version in CentOS 7

Check PHP Version in CentOS 7

 

【原文:】https://www.tecmint.com/install-php-7-in-centos-7/

PhpStorm中terminal修改为git bash后git log中文显示问题修复

找到GitBash安装目录,找到Git\etc\bash.bashrc文件(如:D:\Program Files\Git\etc\bash.bashrc),在文件末尾添加:

在PhpStorm设置 Tools->Terminal->Shell path 为如: D:\Program Files\Git\bin\bash.exe 这样的路径。
重新打开Terminal即可生效。

【原文:】https://xeylon.com/tools/136.html