本文转载自https://github.com/sxyx2008/DevArticles
Ubuntu 12.04.5
MySQL 5.5.47
master1 192.168.64.131
master2 192.168.64.132
| <?php | |
| 'modules' => [ | |
| 'debug' => [ | |
| 'class' => 'yii\debug\Module', | |
| 'traceLink' => function ($trace) { | |
| $path = str_replace('/srv/www/myproject/', 'D:\\www\\myproject\\', $trace['file']); | |
| return '<a href="phpstorm://open?url=file://' . $path . '&line=' . $trace['line'] . '">' . $path . ':' . $trace['line'] . '</a>'; | |
| }, | |
| ] | |
| ] |
| <?php | |
| setlocale(LC_ALL, "en_US.utf8"); | |
| $val = "á|â|à|å|ä ð|é|ê|è|ë í|î|ì|ï ó|ô|ò|ø|õ|ö ú|û|ù|ü ñ Æ æ ç ß Ä £ ŠŽšžŸÀÁÂÃÄÅÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖÙÚÛÜÝàáâãäåçèéêëìíîïðñòóôõöùúûüýÿ teléfonos-móviles Смартфоны Планшеты и аксессуары abc ABC 123 "; | |
| echo $val;echo "<br/>"; | |
| $c = mb_detect_encoding($val, mb_detect_order(), true); | |
| echo iconv($c, 'ASCII//TRANSLIT//IGNORE',$val);echo "<br/>"; | |
本文转载自https://github.com/sxyx2008/DevArticles
Ubuntu 12.04.5
MySQL 5.5.47
master1 192.168.64.131
master2 192.168.64.132
| #!/bin/sh | |
| REPOS="$1" | |
| REV="$2" | |
| # No environment is passed to svn hook scripts; set paths to external tools explicitly: | |
| WGET=/usr/bin/wget | |
| SVNLOOK=/usr/bin/svnlook | |
| # If your server requires authentication, it is recommended that you set up a .netrc file to store your username and password |
| find . -type d -name ".svn"|xargs rm -rf 删除当前目录及子目录下的svn文件 | |
| svn st | awk '{if ($1 == "?") {print $2} }' | xargs svn add svn添加所有新增文件 | |
| find . -type d -exec chmod 700 {} \; 修改所有目录访问权限 | |
| find . -type f -exec chmod 600 {} \; 修改所有文件访问权限 | |
| find . -name "*.php" -exec php {} \; 执行所有的php文件 | |
| grep -rli "helper('itags')" * | xargs -i@ sed -i "s/helper('itags')/helper('core')/g" @ 将所有文件中包含的某字符串替换成另一字符串 | |
| grep -rli --include=*.php.dec '?><?php' . | xargs -i@ sed -i "s/?><?php/<?php/g" @ | |
| pcregrep -MHrin --color "addOrder.*\n.*1442470135100001" . 多行搜索(跨行) | |
| set quote="'" ; phpgrep -i '\(select\|update\|delete\|insert\).*;\("\|${quote}\)' . 搜索以分号;结尾的SQL语句 |
| // ==UserScript== | |
| // @name Direct Links in Google Search | |
| // @namespace https://github.com/astanin | |
| // @description Remove indirections from Google search results on all TLDs. | |
| // @include https://www.google.tld/*output=search* | |
| // @include http://www.google.tld/*output=search* | |
| // @include https://www.google.tld/search* | |
| // @include http://www.google.tld/search* | |
| // @include https://www.google.tld/#* | |
| // @include http://www.google.tld/#* |