This file contains 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
xcache 是中国人自己写的php加速器.据各种评测资料,xcache是个相当不错的php加速器了: | |
现在eAccelerator 半死不活的样子,PHPA则需要专利授权,而 APC 又 bug 一大堆,基本上需要完全重写。现在,唯一象样的 PHP 编译/加速器就属 Xcache 了. | |
它稳定、快速、具有很强的可移植性,并且是开放源代码的,还可以缓存对象。 | |
于是打算试试看,freebsd下最方便的软件安装方式就是ports了. | |
在/usr/ports/www下没有找到xcache.于是.单独升级www ports树. | |
caicai# cvsup -L 2 -h cvsup.cn.FreeBSD.org /usr/share/examples/cvsup/ports-supfile |
This file contains 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
apt-get install git |
This file contains 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
#新增用户并设置home目录 | |
useradd -r -m -s /bin/bash username | |
#设置密码 | |
passwd username |
This file contains 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
#先切换到root用户,然后按照下面的步骤来: | |
vim /etc/sudoers | |
#找到这一行:"root ALL=(ALL)ALL"在其后面添加:(username为你的用户名) | |
username ALL=(ALL) ALL |
This file contains 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
vi /etc/ssh/sshd_config | |
#把 PermitRootLogin yes 改为 PermitRootLogin no | |
#重启sshd服务 | |
service sshd restart |
This file contains 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
#删除sth目录下文件 | |
git rm sth/* -r | |
#然后commit | |
git commit -a -m 'remove sth' | |
#再次push就可以了 | |
git push -u origin master | |
#可以增加忽略文件: | |
vim .gitignore | |
#在文件中添加 | |
sth/**/* |
This file contains 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的一般默认安装目录是: | |
/usr/local/php/ | |
#我们用php-fpm来进行重新加载配置文件 | |
/usr/local/php/sbin/php-fpm reload | |
#注:/usr/local/php/sbin/php-fpm还有其他参数,包括:start|stop|quit|restart|reload|logrotate | |
#使用PHP-FPM来控制PHP-CGI的FastCGI进程 |
This file contains 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
1) 禁止右键 | |
在开发 Web 应用的时候,有些情况需要禁用右键单击功能。使用此代码,jQuery 开发人员可以在网页上禁用鼠标右键点击。代码如下: | |
$(document).ready(function() { | |
//catch the right-click context menu | |
$(document).bind("contextmenu",function(e) { | |
//warning prompt - optional | |
alert("No right-clicking!"); | |
This file contains 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 | |
/* | |
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP) | |
Author: _ck_ (with contributions by GK, stasilok) | |
Version: 0.1.6 | |
Free for any kind of use or modification, I am not responsible for anything, please share your improvements | |
* revision history | |
0.1.6 2013-04-12 moved meta to footer so graphs can be higher and reduce clutter | |
0.1.5 2013-04-12 added graphs to visualize cache state, please report any browser/style bugs |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> | |
<script type="text/javascript" src="http://api.map.baidu.com/api?type=quick&ak=22RNa2l6NSorv9rDTbtfp80P&v=1.0"></script> | |
<title>百度地图的Hello, World</title> | |
<style type="text/css"> | |
body, html,#allmap {width: 100%;height: 100%;overflow: hidden;margin:0;} @media (max-device-width: 780px){#golist{display: block!important;}}#golist {display: none;} | |
</style> |
OlderNewer