Skip to content

Instantly share code, notes, and snippets.

@ufans
ufans / d
Created December 11, 2012 14:18
tet
/*这是演示代码*/
/*copyright haodar.com*/
RewriteRule ^category/list-([0-9]+)\.html$ /plus/list.php?tid=$1
RewriteRule ^category/list-([0-9]+)-([0-9]+)-([0-9]+)\.html$ /plus/list.php?tid=$1&totalresult=$2&ageNo=$3
RewriteRule ^archives/view-([0-9]+)-([0-9]+)\.html$ /plus/view.php?arcID=$1&pageno=$2
@ufans
ufans / d
Created December 11, 2012 14:14
tet
RewriteRule ^category/list-([0-9]+)\.html$ /plus/list.php?tid=$1
RewriteRule ^category/list-([0-9]+)-([0-9]+)-([0-9]+)\.html$ /plus/list.php?tid=$1&totalresult=$2&ageNo=$3
RewriteRule ^archives/view-([0-9]+)-([0-9]+)\.html$ /plus/view.php?arcID=$1&pageno=$2
@ufans
ufans / dfddf
Created December 9, 2012 07:37
gdg
location / {
rewrite ^/show-([0-9]+)-([0-9]+)\.html$ /index.php?action=show&id=$1&page=$2 last;
rewrite ^/category-([0-9]+)-([0-9]+)\.html$ /index.php?action=index&cid=$1&page=$2 last;
rewrite ^/archives-([0-9]+)-([0-9]+)\.html$ /index.php?action=index&setdate=$1&page=$2 last;
rewrite ^/(archives|search|reg|login|index|links)\.html$ /index.php?action=$1 last;
rewrite ^/(comments|tagslist|trackbacks|index)-([0-9]+)\.html$ /index.php?action=$1&page=$2 last;
}
@ufans
ufans / df
Created December 9, 2012 07:36
bd
# BEGIN Sablog-X
RewriteEngine On
RewriteBase /
# 文章
RewriteRule ^show-([0-9]+)-([0-9]+)\.html$ index.php?action=show&id=$1&page=$2
# 分类
RewriteRule ^category-([0-9]+)-([0-9]+)\.html$ index.php?action=index&cid=$1&page=$2
# 只带月份的归档
RewriteRule ^archives-([0-9]+)-([0-9]+)\.html$ index.php?action=index&setdate=$1&page=$2
# 用户列表、高级搜索、注册、登陆
echo PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin>>/etc/profile
@ufans
ufans / tt
Created December 8, 2012 23:48
ty
<?php if($this->slug=="tags"): ?>
<?php Typecho_Widget::widget('Widget_Metas_Tag_Cloud')->to($tags); ?>
<?php if($tags->have()): ?>
<?php while ($tags->next()): ?>
<a style="color:rgb(<?php echo(rand(0,255)); ?>,<?php echo(rand(0,255)); ?>,
<?php echo(rand(0,255)); ?>)" href="<?php $tags->permalink();?>">
<?php $tags->name(); ?></a>
<?php endwhile; ?>
<?php endif; ?>
<?php else: ?>
@ufans
ufans / fdf
Created December 8, 2012 10:12
fd
# Conky sample configuration<br />
#<br />
# the list of variables has been removed from this file in favour<br />
# of keeping the documentation more maintainable.<br />
# Check http://conky.sf.net for an up-to-date-list.<br />
<br />
# set to yes if you want Conky to be forked in the background<br />
background yes<br />
<br />
# X font when Xft is disabled, you can pick one with program xfontsel<br />
@ufans
ufans / g
Created December 7, 2012 12:41
g
<!--
CODE: FCKConfig.CustomConfigurationsPath = '' ; // 自定义配置文件路径和名称
FCKConfig.EditorAreaCSS = FCKConfig.BasePath + 'css/fck_editorarea.css'; // 编辑区的样式表文件
FCKConfig.BaseHref = ''; // 相对链接的基地址
FCKConfig.Debug = true/false; // 是否开启调试功能,当调用FCKDebug.Output()时,会在调试窗中输出内容
FCKConfig.SkinPath = FCKConfig.BasePath + 'skins/default/'; // 设置皮肤
FCKConfig.AutoDetectLanguage = true/false ; // 是否自动检测语言
FCKConfig.DefaultLanguage = 'zh-cn' ; // 设置默认语言
FCKConfig.ContentLangDirection = 'ltr/rtr'; // 默认文字方向,ltr左,rtr右
FCKConfig.FillEmptyBlocks = true/false ; // 使用这个功能,可以将空的块级元素用空格来替代
@ufans
ufans / bb
Created December 6, 2012 13:43
b
rewrite ^/n-([0-9]+)(-([0-9]*))?$ /nodepage.php?cid=$1&page=$3 last;
rewrite ^/t-([0-9]+)(-([0-9]*))?$ /topicpage.php?tid=$1&page=$3 last;
rewrite ^/notifications$ /notifications.php last;
rewrite ^/feed$ /feed.php last;
rewrite ^/forgot$ /forgot.php last;
rewrite ^/upload-(650|590)$ /upload.php?mw=$1 last;
rewrite ^/viewat-(desktop|mobile)$ /viewat.php?via=$1 last;
rewrite ^/goto-t-([0-9]+)$ /gototopic.php?tid=$1 last;
rewrite ^/member/(.+)$ /member.php?mid=$1 last;
rewrite ^/newpost/([0-9]+)$ /newpost.php?cid=$1 last;