代码改变世界

vs中的正则替换

2014-12-22 21:09 by 萧 云, 194 阅读, 0 推荐, 收藏, 编辑
摘要:老版本:String {\w+}=>Public String \12012中:String (\w+)=>Public String $1 阅读全文

sublime text 3 上安装xdebug

2014-12-22 16:33 by 萧 云, 522 阅读, 0 推荐, 收藏, 编辑
摘要:安装完成之后启动xdebug,缺省设置下会显示warning等信息,很不方便。可以参考https://github.com/martomo/SublimeTextXdebug/blob/master/Xdebug.sublime-settings屏蔽相关信息:{ // Break on ex... 阅读全文

ssh 免密码登入远程服务器

2014-07-17 16:00 by 萧 云, 220 阅读, 0 推荐, 收藏, 编辑
摘要:生成ssh密钥,将公钥上传至远程服务器~/.ssh目录下面(没有的话就建一个):ssh-keygen -t rsascp ~/.ssh/id_rsa.pub root@yourserver.com:/root/.ssh/登录到远程服务器,导入公钥到authorized_keys(没有建一个):cd ... 阅读全文

sphinx with discuz

2014-06-25 13:03 by 萧 云, 280 阅读, 0 推荐, 收藏, 编辑
摘要:安装sphinx:sudo apt-get install sphinxsearch配置:source discuz{ type = mysql sql_host = xx.xx.xx.xx sql_user ... 阅读全文

smarty 3 + codeigniter 2 + hmvc

2014-06-25 13:02 by 萧 云, 261 阅读, 0 推荐, 收藏, 编辑
摘要:参考资料https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc/src/fecd39ccdf56?at=defaulthttp://ilikekillnerds.com/2010/11/using-smarty-3-... 阅读全文

mac 下安装 mariadb

2014-05-15 13:47 by 萧 云, 1175 阅读, 0 推荐, 收藏, 编辑
摘要:通过brew 安装:brew install mariadb初始化数据库cd /usr/local/Cellar/mariadb/10.0.10/scriptsmysql_install_db --user=`root` --basedir="$(brew --prefix mariadb)" --... 阅读全文

ubuntu下svn up 出现 Can't convert string from 'UTF-8' to native encoding

2014-05-13 11:29 by 萧 云, 580 阅读, 0 推荐, 收藏, 编辑
摘要:root@ubuntu:/data/www# svn upsvn: warning: cannot set LC_CTYPE localesvn: warning: environment variable LC_CTYPE is UTF-8svn: warning: please check th... 阅读全文

ubuntu下安装 nginx + php + memcached + mariadb

2014-05-12 15:19 by 萧 云, 701 阅读, 0 推荐, 收藏, 编辑
摘要:一,apt-get 安装1,安装nginxsudo apt-get install nginx所有的配置文件都在/etc/nginx下,虚拟主机配置在/etc/nginx/sites-available下程序文件在/usr/sbin/nginx日志放在了/var/log/nginx中并已经在/etc... 阅读全文

iis 7.5 ftp site用户名不能是 'ftp'?

2014-02-26 10:32 by 萧 云, 342 阅读, 0 推荐, 收藏, 编辑
摘要:在windows server 2008 r2上配置一个iis ftp site,创建了一个名为 ftp 的账号,并添加到允许规则中,可总是出现:Connected to ***.***.***.***220 Microsoft FTP ServiceName (***.***.***.***:***): ftp331 Password required for ftp.Password: 530 User cannot log in.ftp: Login failed两个账号一模一样的配置,另外一个可以登录。创建其他名称的账号,没问题。有规定用户名不能是ftp? 阅读全文

CodeIgniter + smarty 实现widget功能

2014-02-25 13:09 by 萧 云, 912 阅读, 0 推荐, 收藏, 编辑
摘要:在开发过程中,经常需要widget功能,一可以隔离页面逻辑,二可以重用代码。结合smarty的plugin功能,可以方便的实现该功能。譬如,我们的页面中可以这样写:{{extends file='_layout.html'}} {{block name='content'}} {{widgets path='widgets/carousel'}} {{widgets path='widgets/news'}} {{widgets path='widgets/hots'}} {{widgets path='w 阅读全文