Skip to content

Instantly share code, notes, and snippets.

View chrisyue's full-sized avatar
:octocat:
=。=

chris yue chrisyue

:octocat:
=。=
View GitHub Profile
@chrisyue
chrisyue / nginx-symfony-dev-502.conf
Last active January 1, 2016 16:29
symfony在开发环境nginx报错502可能是因为header太大造成
http {
fastcgi_buffer_size 32k;
fastcgi_buffers 8 16k;
}
@chrisyue
chrisyue / 淡墨秋山.md
Last active January 1, 2016 16:29
米芾(米南宫) - 淡墨秋山

淡墨秋山尽远天

暮霞还照紫添烟

故人好在重携手

不到平山谩五年

@chrisyue
chrisyue / sed.md
Last active January 1, 2016 04:29
sed 多文件替换内容

sed -i s/old/new/g `grep old -lr dir`

@chrisyue
chrisyue / find.md
Created December 23, 2013 05:18
find命令查找文件

find [dir] -name [pattern]

@chrisyue
chrisyue / diff.md
Created December 12, 2013 13:24
diff工具

vimdiff

vi -d file1 file2

meld(gui)

使用diff工具查看git本地与前版本不同之处

git difftool

@chrisyue
chrisyue / ubuntu-ppa.md
Last active December 30, 2015 18:59
ubuntu 常用 ppa

command

sudo apt-add-repository [--remove] ppa:xx/xx
  • ppa:ondrej/php5
  • ppa:chris-lea/redis-server
  • ppa:git-core/ppa
  • vim ppa:fcwu-tw/ppa
  • ppa:chris-lea/node.js

composer

http_proxy=http://127.0.0.1:8087 composer update

apt-get

http_proxy=http://127.0.0.1:8087 apt-get update

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;
}
@chrisyue
chrisyue / han.md
Last active December 28, 2015 02:19
匹配UTF-8中文正则,php测试可用
/\p{Han}+/u

非汉字

/\P{Han}+/u

@chrisyue
chrisyue / .php_cs.php
Last active August 29, 2015 14:05
php-cs-fixer config for Symfony2 project
<?php
$finder = Symfony\CS\Finder\DefaultFinder::create()
->in('src')
->in('app/config')
->in('app/Resources')
;
return Symfony\CS\Config\Config::create()
->setUsingCache(true)