需要将 PHP 各版本安装到 /usr/local/php$VER/ 目录下
保存 php-switch 到 /usr/local/bin目录下
执行以下命令
chmod +x /usr/local/bin/php-switch| import requests | |
| import datetime | |
| ES_HOST = 'http://localhost:9200' | |
| lifecycle_rules = [ | |
| { | |
| 'days': 0, | |
| 'format': '%Y.%m.%d', | |
| 'indices': [ |
| function FindProxyForURL(url, host) { | |
| var PROXY = "SOCKS5 10.1.2.79:8600; DIRECT;"; | |
| var DIRECT = "DIRECT"; | |
| var list = [ | |
| '*t.co*', | |
| '*twitter.com*', | |
| '*twimg.com*', | |
| '*tinypic.com*', | |
| '*twitpic.com*', |
| [client] | |
| host=localhost | |
| port=3306 | |
| user=root | |
| password=root |
| # 使用 ssh 下载远程服务器上的 mysql 数据库 | |
| SSH_HOST=remote_ssh_host | |
| SSH_USER=root | |
| SSH_BIN="ssh $SSH_USER@$SSH_HOST" | |
| REMOTE_DATABASE=remote_db_name | |
| REMOTE_HOST=remote_host_ip | |
| REMOTE_PORT=3306 | |
| REMOTE_USER=root |
| #!/usr/bin/env bash | |
| REDIS_CLUSTER_HOME=/usr/local/redis-cluster | |
| cd $REDIS_CLUSTER_HOME | |
| CLUSTERS=(7000 7001 7002 7003 7004 7005) | |
| start() { |
| <?php | |
| if (!function_exists('pcntl_fork')) { | |
| exit('请重新安装编译 PHP,开启 --enable-pcntl 扩展!'); | |
| } | |
| if (!class_exists('Redis')) { | |
| exit('请安装扩展: pecl install redis'); | |
| } |
| { | |
| "datacenter": "oms-java", | |
| "data_dir": "/data/consul/data/", | |
| "pid_file": "/data/consul/consul.pid", | |
| "log_file": "/data/consul/logs/", | |
| "log_rotate_bytes": 500000000, | |
| "log_level": "INFO", | |
| "node_name": "node1", | |
| "server": true, | |
| "bootstrap": true, |
| #!/bin/bash | |
| # Author: Remigijus Jarmalavičius <remigijus@jarmalavicius.lt> | |
| # Author: Vytautas Povilaitis <php-checker@vytux.lt> | |
| # | |
| # XDebug check added by William Clemens <http://github.com/wesclemens> | |
| # Handle spaces in filenames Dave Barnwell <https://github.com/freshsauce> | |
| ROOT_DIR="$(pwd)/" | |
| LIST=$(git diff-index --cached --name-only --diff-filter=ACMR HEAD) | |
| ERRORS_BUFFER="" |
| <?php | |
| $fixers = [ | |
| '@PSR1' => true, | |
| '@PSR2' => true, | |
| '@Symfony' => true, | |
| 'align_multiline_comment' => true, | |
| 'array_indentation' => true, | |
| 'array_syntax' => [ | |
| 'syntax' => 'short', |