Posted by gaston on 2011 年 12 月 23 日
sublime-text-2在linux下是个很帅的编辑器
但是ubuntu netbook默认安装启动后,不会显示菜单,需要特殊指定,方法如下:
env UBUNTU_MENUPROXY= sublime-text-2
为了以后方便可以加入alias.
——————
另附ubuntu下使用apt的安装方法:
sudo add-apt-repository ppa:webupd8team/sublime-text-2
sudo apt-get update
sudo apt-get install sublime-text-2
Posted by gaston on 2010 年 10 月 18 日
1>让screen分屏: ctl-a-S
2>切换screen分屏: ctl-a-TAB
Posted by gaston on 2010 年 09 月 25 日
#include <signal.h>
#include <unistd.h>
#include <stdio.h>
void sig_usr(int);
int main(void)
{
if(signal(SIGUSR1,sig_usr) == SIG_ERR)
printf("can't catch sigusr1\n");
if(signal(SIGUSR2,sig_usr) == SIG_ERR)
printf("can't catch sigusr2\n");
for(;;)
pause();
}
void sig_usr(int signo)
{
if(signo == SIGUSR1)
{
printf("::siguser1\n");
}
else if(signo == SIGUSR2)
{
printf("::siguser2\n");
}
else
{
printf("::rece sig %d\n",signo);
}
return;
}
/siguser1 &
[1] 2652
kill -USR1 2652
kill -USR2 2652
Posted by gaston on 2010 年 09 月 20 日
使用语法如:
<syntaxhighlight lang=”php”>
<?php
echo “hello”;
?>
</syntaxhighlight>
安装方法,参照这就可以了:
http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi#Installation
大概过了下,这个类也可以php单独来call:
GeSHi的项目主页:http://sourceforge.net/projects/geshi 未来也许有的着
顺手也给wordpress也装了个wp-syntax,上面样子有点丑:(
Posted by gaston on 2010 年 09 月 18 日
forward: http://vim.wikia.com/wiki/Ignore_white_space_in_vimdiff
1>
set diffopt+=iwhite
2>
vimdiff -c 'set diffopt+=iwhite'
Posted by gaston on 2010 年 09 月 13 日
与同事观察一个下线的项目数据发现 2个意外:
1>Mysql中一个2千万的主表,没有使用分表,仍然跑的稳定
2>Mysql使用的是innodb, 该ibdata一个16G文件,系统是linux 32位,仍跑的挺好,没有传闻说的那样32位系统,file size超过2G就慢很多
有机会还是要多灌些数据跑跑边界值.
Posted by gaston on 2010 年 09 月 10 日
用show processlist很多年,一直恨于不能看全运行中的sql…
今日发现,原来还可以show full processlist 哈哈..
这样就可以全部在列表中显示全部sql了.
Posted by gaston on 2010 年 08 月 28 日
在某网站上看到,这款Tiki Wiki CMS Groupware
乍一看名字,因该还不错..心想是不是期望的那款
进入Tiki Wiki CMS Groupware站点(http://info.tikiwiki.org/tiki-index.php)看这个feature list
Wikis (like in Wikipedia)
Forums (like in phpBB)
Blogs (like in WordPress)
Articles (like in Yahoo News)
Image Gallery (like in Flickr)
Map Server (like in Google Maps)
Link Directory (like in DMOZ)
Multilingual (like in Babel Fish)
Bug Tracker (like in Bugzilla)
RSS Feeds (like in Digg)
Free Open Source software (LGPL)
便down下install后,试用过wiki/forum/blog,结果还是比较失望的..
功能点是有,但不够纯正
除非对功能/页面都非常的不介意
截屏上来
Posted by gaston on 2010 年 08 月 28 日
Posted by gaston on 2010 年 08 月 24 日
最近打算弄一个小网站玩玩..
觉得还是拿一个流行的php framework…不打算自已写或无框架去run.
最终选定使用ci..
主要理由是:
尽量简单:包括代码结构,安装,扩展。主要是不想未来debug累死
有脚本生成的,也都尽量不考虑,生成了太多文件,不知道他到底做了什么。也是为了接入svn方便.
下载ci,简单配置后就可以run了
关于url rewirte
1>参考这里:
http://codeigniter.org.cn/user_guide/general/urls.html
2>取不到GET值时,参考这里
http://www.ctochina.net/forum/show/15
用了GET提交表单,但发现CI给出错误显示.
提示为:
The page you requested was not found.
后来查了资料才发现,CI默认过滤了$_GET.但可以通过配置来实现.
1) 在config.php 中,将'uri_protocol' 设置为 'PATH_INFO'.
$config['uri_protocol'] = "PATH_INFO";
2) 在config.php 中,将'enable_query_strings' 设置为 TRUE.
$config['enable_query_strings'] = TRUE;
OK,现在可以通过
$this->input->get('参数名');