/\p{Han}+/u
非汉字
/\P{Han}+/u
curl http://sample.com/data.json | python -mjson.tool |
<?xml version="1.0"?> | |
<ruleset name="xxx" | |
xmlns="http://pmd.sf.net/ruleset/1.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd" | |
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd"> | |
<description>xxx</description> | |
<!-- @see http://phpmd.org/rules/codesize.html#cyclomaticcomplexity --> | |
<rule ref="rulesets/codesize.xml/CyclomaticComplexity"/> |
{ | |
"require": { | |
"composer/composer": "dev-master", | |
"phpmd/phpmd": "dev-master", | |
"fabpot/php-cs-fixer": "dev-master", | |
"phpunit/phpunit": "3.7.*", | |
"sebastian/phpcpd": "*", | |
"phpdocumentor/phpdocumentor": "2.*", | |
"sami/sami": "1.*", | |
"squizlabs/php_codesniffer": "dev-master" |
// rename local branch | |
git branch -m <old> <new> | |
git branch -m <new> |
$str = "0123ABCDFWS\",.?<>{}[]*&^%#@!~()+-|:;"; | |
echo "$str"; | |
echo "<br />"; | |
$str = preg_replace('/\xa3([\xa1-\xfe])/e', 'chr(ord(\1)-0x80)', $str); | |
echo $str; |
grant CREATE,INSERT,DELETE,UPDATE,SELECT on pauldb.* to paul@localhost identified by 'password' with grant option |
<?php | |
$finder = Symfony\CS\Finder\DefaultFinder::create() | |
->in('src') | |
->in('app/config') | |
->in('app/Resources') | |
; | |
return Symfony\CS\Config\Config::create() | |
->setUsingCache(true) |
/\p{Han}+/u
非汉字
/\P{Han}+/u
server { | |
server_name ~^(?<project>.*)\.localhost$; | |
root /var/www/repos/$project/web; | |
index app_dev.php; | |
location ~ \.php($|/) { | |
include fastcgi_params; | |
fastcgi_pass unix:/var/run/php5-fpm.sock; | |
} |
composer
http_proxy=http://127.0.0.1:8087 composer update
apt-get
http_proxy=http://127.0.0.1:8087 apt-get update