This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 字体 | |
| ------------------------------------------------------------------------------------ | |
| http://damieng.com/blog/2008/05/26/envy-code-r-preview-7-coding-font-released | |
| https://github.com/adobe/source-code-pro | |
| ---------------------------------------------------------------------------------------- | |
| vim 插件: emmet-vim c-p | |
| ---------------------------------------------------------------------------------------- | |
| vimrc 配置 | |
| 可参考 https://github.com/fisadev/fisa-vim-config/blob/master/.vimrc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| server { | |
| listen 80; | |
| root /var/www/slim; | |
| index index.html index.htm index.php; | |
| # Make site accessible from http://localhost/ | |
| # | |
| server_name test.com; | |
| if (!-f $request_filename) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| php 可以连接 mysql , 但 cli 下 不能使用密码登录 ,空密码可登录,应该是权限在作怪. | |
| skip-grant-tables下 不能 分配mysql 用户权限 . | |
| 只能这样 : mysql_query(GRANT ALL ON mydb.* TO 'someuser'@'somehost';); | |
| 通常以下就可解决: | |
| Follow steps below | |
| 1.Start the mysql server instance or daemon with the --skip-grant-tables option. (security setting) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/php | |
| <?php | |
| $files = scandir(dirname(__FILE__) . "/conf.d/"); | |
| foreach($files as $key => $file) { | |
| if($file != "." && $file != ".." && preg_match('/.conf$/iU', $file) ) { | |
| include(dirname(__FILE__) . "/conf.d/$file"); | |
| } | |
| } | |
| ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo add-apt-repository ppa:ondrej/php5 | |
| sudo apt-get update | |
| sudo apt-get install php5 | |
| upgrading PHP to 5.4 gives 502 Bad Gateway errors. | |
| fix: | |
| # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| client_max_body_size 20m; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 更改admin 密码 | |
| --------------------------------------------- | |
| ./manage.py changepassword admin | |
| --------------------------------------------- | |
| django-admin.py changepassword admin | |
| You can also change a password programmatically: | |
| --------------------------------------------- | |
| from django.contrib.auth.models import User | |
| admin = User.objects.get(username='admin') | |
| admin.set_password('mynewpassword') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| server { | |
| listen 8089; ## listen for ipv4; this line is default and implied | |
| #listen [::]:80 default ipv6only=on; ## listen for ipv6 | |
| root /var/www/; | |
| index index.php index.html index.htm; | |
| # Make site accessible from http://localhost/ | |
| server_name localhost; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "stdio.h" | |
| #include "time.h" | |
| #include "string.h" | |
| void main(){ | |
| int * month; | |
| int no; | |
| time_t timer; | |
| char timebuf[128]; | |
| struct tm * current; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| python:python-webkit2png | |
| 已编译好:http://code.google.com/p/wkhtmltopdf/downloads/list | |
| http://phantomjs.org/ |