September 20th, 2011 By 7m Categories: wordpress

1.WordPress Importer

这个就不说了,直接第一次Tools–>Impor/Export就会让你装的

2.WP-CodeBox

代码用这个来显是很美观的,用法

1
2
<pre lang="bash" line="1" file="JustAFileName" colla="+">
Some Codes

lang 表示你代码的语言
line 表示从第几行开始显示
file 表示别人点击之后生成的下载文件名
colla 如果为减号,表示代码折叠

我遇到的唯一一个问题是,Export的时候要混乱,必须关闭Wp-Codebox才行,不知道是不是个例。

3.Math Comment Spam Protection

防垃圾必备,简单易用。
装好之后到Plugins中去看,插件说明会给一段示例代码。
复制,到Appearance-->comments.php,找个合适的位置粘贴上。
比如我的主题提交评论的按钮是"Submit Comment",我就搜索这两个词,然后在它上面粘贴。

4.Exec-PHP

这个是为了方便在post的时候直接使用php代码,比如如下的代码:

1
2
3
4
5
You can see the effect, just <a href=<?php
echo "http://";
echo $_SERVER['SERVER_NAME'];
echo "/notexist.doc";
?>>CLICK THIS LINK:</a>

这段代码获取自己所在空间的域名,生成链接,可移植性不错。

5.WP-Mail-SMTP

比如我用邮箱: allang@163.com,填写方式如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Advanced Email Options
 
From Email : allang@163.com
From Name : 这个随便写
Mailer   Send all WordPress emails via SMTP.
Return Path  不要勾选
 
SMTP Options
 
SMTP Host  smtp.163.com
SMTP Port  25
Encryption   No encryption.
Authentication  Yes: Use SMTP authentication.
Username  allang
Password  填写自己的邮箱密码
September 20th, 2011 By 7m Categories: wordpress

1. tags cloud

我使用的是deep mix,似乎sidebar并不带tags cloud,所以自己手动解决

Appearance–>Editor–>sidebar.php

找到

1
2
<div class="sidebar-box">
<h3>Recent Posts</h3>

在它上面添加如下几句:

?Download mess.txt
1
2
3
4
5
6
<div class="sidebar-box">
<h3>Tags</h3>
<ul>
<?php wp_tag_cloud('smallest=8&largest=22&unit=pt&number=45&format=flat&orderby=name&order=ASC'); ?>
</ul>
</div>

参数说明:
smallest: 设定tag cloud输出的最小字号,默认值为’8′。
largest: 设定tag cloud输出的最大字号,默认值为’22′。
unit : 设定tag cloud输出字号的单位,默认值为’pt’。
number : 设定tag cloud输出tag的数量,默认值为’45′。
format: 参数’Flat’将会以平铺的形式输出tag并且用空格将tag分隔开;参数’List’将会输出一组无序的tag列表;参数’Array’将允许你定义一组tag排列;默认值为’Flat’。
orderby: 将会以’name’或’count’对tag进行排列,默认值为’name’。
order: 定义tag以’ASC’升序或’DESC’除序进行排列,默认值为’ASC’。

以上各参数以“&”符号连接,不必都填,不填的参数以缺省值为准。另外有“exclude”和“include”两个参数用法不明,应该是排除以上某些参数时使用的。

2.favicon

Appearance——>Editor——->Header(header.php)
类似这样

1
<link rel="shortcut icon" href="http://taoofye.look.in/favicon.ico" />

这里是一个在线favicon生成:
http://www.bitbug.net/

3.Permalink

Settings–>Permalink

常用:

* /%year%/%monthnum%/%day%/%postname%/

  * /%year%/%monthnum%/%postname%/

  * /%year%/%monthnum%/%day%/%postname%.html

  * /%year%/%monthnum%/%postname%.html

  * /%category%/%postname%.html

  */%postname%.html

  * /%post_id%.html

4.个性化404

Appearance–>Editor–>404.php
输入类似的代码:

?Download 404.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Nothing found</title>
<style type="text/css">
<!--body {background-color: #0402a4;font-size: 18px;font-family: Courier, Consolas;color: #FFFFFF;}-->
</style>
</head>
<body>
<script type="text/javascript">
//<!--
function isIFrameSelf(){try{if(window.top ==window){return false;}else{return true;}}catch(e){return true;}}
function toHome(){ if(!isIFrameSelf()){ window.location.href="javascript:history.back(-1)";}}window.setTimeout("toHome()",5000);
//-->
</script>
<p>A problem has been detected and Browser has been shut down to prevent damage to your computer. </p><p>404_NOT_FOUND</p><p>If this is the first time you've seen this stop error screen, refresh your browser. If this screen appears again, follow these steps: </p>
<p>Check to be sure you have adequate disk space, if a driver is identified in the stop message, disable the driver or check with the manufacturer for driver updates. Try changing video adapters. </p>
 
<p>Check with your hardware vendor for any BIOS updates. Disable BIOS memory options such as caching or shadowing. If you need to use safe Mode to try again, restart your browser, press Ctrl+Shift+Delete to access Clear recent History, and then beside Time range to clear, click Everything, and then select clear now. </p>
<p>Technical information:</p>
<p>*** STOP:0×00000001( 0×00000000,0×00000001, 0×00000002,0×00000003 )</p>
<p>Beginning dump of physical memory</p>
<p>physical memory dump complete</p>
<p>Contact your system administrator or technical support group for further assistance. </p>
</body>
</html>

5.那个德国空间的去光糕

kkiilluu..ddee的去广告方式

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
    应该将以下代码
 
    </body>
    </html>
 
    改为
<?php
$lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 4);
if (!preg_match("/de/i", $lang))
printf(__('<noscript>'));
?>
</body>
</html>
<?php
$lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 4);
if (!preg_match("/de/i", $lang))
printf(__('<noscript>'));
?>

wordpress 应该到footer.php中设置。

Referenced:
http://www.zrblog.net/1331.html
http://pigmod.com/archives/no-ad-for-kilu-170.html
PHP判断浏览器类型和浏览器语言
为WordPress主题添加Tag云页
WordPress修改固定链接的方法

September 18th, 2011 By 7m Categories: GNU/Linux

From : http://blogs.gnome.org/shaunm/2009/12/05/urlencode-and-urldecode-in-sh/

?Download urlende.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Source : http://blogs.gnome.org/shaunm/2009/12/05/urlencode-and-urldecode-in-sh/
##################################################################################
# This is important to make sure string manipulation is handled
# byte-by-byte.
export LANG=C
 
urlencode() {
  arg="$1"
  i="0"
  while [ "$i" -lt ${#arg} ]; do
    c=${arg:$i:1}
    if echo "$c" | grep -q '[a-zA-Z/:_.-]'; then
     echo -n "$c"
    else
     echo -n "%"
     printf "%X" "'$c'"
    fi
    i=$((i+1))
  done
}
 
urldecode() {
  arg="$1"
  i="0"
  while [ "$i" -lt ${#arg} ]; do
    c0=${arg:$i:1}
    if [ "x$c0" = "x%" ]; then
     c1=${arg:$((i+1)):1}
     c2=${arg:$((i+2)):1}
     printf "x$c1$c2"
     i=$((i+3))
    else
     echo -n "$c0"
     i=$((i+1))
   fi
  done
}
September 18th, 2011 By 7m Categories: Tech
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Source : http://blogs.gnome.org/shaunm/2009/12/05/urlencode-and-urldecode-in-sh/
##################################################################################
# This is important to make sure string manipulation is handled
# byte-by-byte.
export LANG=C
 
urlencode() {
  arg="$1"
  i="0"
  while [ "$i" -lt ${#arg} ]; do
    c=${arg:$i:1}
    if echo "$c" | grep -q '[a-zA-Z/:_.-]'; then
     echo -n "$c"
    else
     echo -n "%"
     printf "%X" "'$c'"
    fi
    i=$((i+1))
  done
}
 
urldecode() {
  arg="$1"
  i="0"
  while [ "$i" -lt ${#arg} ]; do
    c0=${arg:$i:1}
    if [ "x$c0" = "x%" ]; then
     c1=${arg:$((i+1)):1}
     c2=${arg:$((i+2)):1}
     printf "x$c1$c2"
     i=$((i+3))
    else
     echo -n "$c0"
     i=$((i+1))
   fi
  done
}
September 15th, 2011 By 7m Categories: MS

http://hi.baidu.com/zwzcat/blog/item/975e7d86c2667bba0df4d23c.html

 

一、怎么看visual studio 2008 是试用版还是正式版?
打开vs2008 –> 帮助 –> 关于 Micorsoft VS 2008 版本号,后面有个括号写着 (RTM.XXXXX-XXX) ,RTM版就是我们说的正式版。

Visual Studio 2008正式版安装序列号为:PYHYP-WXB3B-B2CCM-V9DX9-VDY8T

二、已安装VS2008试用版如何升级?
如果先前已经安装好180天的版本,则用正式版的Key升级为正式版。
方法为:在控制面板中的添加删除程序,选择VS2008,点击“更改/删除“按钮,加载VS2008的维护模式,选择升级选项,将序列号输入正式版的序列号,PYHYP-WXB3B-B2CCM-V9DX9-VDY8T,进行升级。

三、WIN7及以上系统如何输入序列号并激活成正式版? 
注意:在WIN7,WIN2008 SERVER等系统中,卸载界面是没有显示出输入序列号的地方,微软将输入的位置隐藏起来了。
那么在WIN7或WIN2008系统中,如何升级输入序列号呢?我们需要借助这个工具,将隐藏的输入框找回来。

http://www.cnblogs.com/liyejun/archive/2010/03/07/1680259.html

 

 

 

四、修改安装程序中的Setupsetup.sdb文件,直接安装正式版本

 另一种升级正式版的方法是把Setupsetup.sdb文件中的[Product Key],由T2CRQGDKBVW7KJR8C6CKXMW3D修改为PYHYPWXB3BB2CCMV9DX9VDY8T。因为九十天试用版本已经是 rtm版本。所以改变序列号以后的升级或者安装,就会变成正式版。不再有使用期限。。(已经安装了SP1这个方法就不行了)

 附:PS:RTM(release.to.manufacturing) 简介
正 式在零售商店上架前,需要一段时间来压片,包装、配销,所以程序代码必须在正式发行前一段时间就要完成,这个完成的程序代码叫做final.code,这 次windows.xp开发完成,外国媒体用windows xp.goes.gold来称呼。程序代码开发完成之后,要将母片送到工厂大量压片,这个版本就叫做rtm版。所以说,rtm版的程序码一定和正式版一 样。但是和正式版也有不一样的地方:例如正式版中的oem不能升级安装,升级版要全新安装的话会检查旧版操作系统光盘等,这些就是rtm和正式版不同的地 方,但是它们的主要程序代码都是一样的。 严格的说这种版本还是属于fpp零售版,需要激活的那种。

Microsoft Visual Studio 2008 破解试用版 win7 zz

本文来自CSDN博客:http://blog.csdn.net/xw_hit/archive/2009/12/01/4915042.aspx

因为是试用版快要到期了,结果今天重装vs两遍,大家都是说更改/卸载下vs,输入cdkey就可以用了,由于用的是win7,结果遇到若干问题,一般破解:

1.进入控制面板,添加删除程序,找到Visual Studio 2008 Team Suite,点击更改/卸载;

2.如果出现卸载界面,点击Next,跳过第三步,如果出现了“加载安装组件时遇到问题,取消安装”的提示;

3.出现这种提示是因为sp1的原因,点击控制面板上方的“查看已安装的更新”,卸载Visual Studio 2008 Team Suite的所有的更新;

4.输入下面的序列号VS2008正式版序列号CDKEY:PYHYP-WXB3B-B2CCM-V9DX9-VDY8T,出现成功画面即可完美将试用版升级为正式版,win7我没找着输入cdkey框,百度才知道win7没有,结果我已经卸载了…

win7破解:

1.卸载vs2008,首先先卸载已经安装的更新,然后再卸载主程序

2.打开安装文件,把setup下的Setupsetup.sdb文件中的[[Product Key]中的T2CRQ-GDKBV-W7KJR-8C6CK-XMW3D改成 PYHYP-WXB3B-B2CCM-V9DX9-VDY8T ,保存以后正常安装就行了…

ps:网上都是说两种方法都可行,但是win7貌似只有第二种方法可行…

下面是下载到的序列号,Team   Suite和Professional通用:

Visual   Studio   2008   Professional   Edition: XMQ2Y-4T3V6-XJ48Y-D3K2V-6C4WT

Visual   Studio   2008   Team   Test   Load   Agent: WPX3J-BXC3W-BPYWP-PJ8CM-F7M8T  

Visual   Studio   2008   Team   System: PYHYP-WXB3B-B2CCM-V9DX9-VDY8T

Visual   Studio   2008   Team   Foundation   Server: WPDW8-M962C-VJX9M-HQB4Q-JVTDM

下载,官方地址:

Visual Studio Team System 2008 Team Suite
http://www.microsoft.com/downloads/details.aspx?displaylang=zh-cn&FamilyID=d95598d7-aa6e-4f24-82e3-81570c5384cb

MSDN Library for Visual Studio 2008
http://www.microsoft.com/downloads/details.aspx?FamilyID=6ff3bc60-32c8-4c22-8591-a20bf8dff1a2&DisplayLang=zh-cn

 

Win7下Visual Studio 2008安装失败的解决办法(Visual Studio Web组件安装失败)

http://hi.baidu.com/gezi419439610/blog/item/3faaff08eb5dda0895ca6ba8.html

http://hi.baidu.com/candery_bd/blog/item/85c75ddda32f26aecc11665e.html

September 8th, 2011 By 7m Categories: MS

我上一篇才说到迅雷是很垃圾的。

早期的版本可用,后期的版本带的垃圾很多,占资源姑且不说,最严重的无法使用,各种overrun错误。

7.1.0.1960这个版本还行,我觉得不是很垃圾。今天打开virtualbox,开虚拟机下载。

迅雷打开,年会员的红色图标刚刷出来,弹出更新提示。前车之鉴,我当然是点取消。

好了,迅雷他妈的开始威胁人,不升级将无法继续使用。

卧槽,花钱买个会员,最后本来该是上帝的我一下子成孙子了,这个叫什么,绑架?

解决办法很简单,删掉Thunder NetworkProgramThunderLiveUD.exe,新建一个文件,命名为ThunderLiveUD.exe,右键,只读,解决。

迅雷这个流氓真的是在找死。

September 1st, 2011 By 7m Categories: MS

先说我的环境:虚拟机(Virtualbox),xp sp2

晚上打开虚拟机下东西,迅雷又弹出软件更新已经下载完毕,要不要更新,烦,顺手点了是,然后就升级了,然后就不断弹标题中那个错误
我以为是它自动下载的那个版本有问题,于是我去官网下载最新的版本:7.2.2.3118

问题依旧,而且发现界面相当烦人,整个软件臃肿,fuck,我他喵的也是年会员好吧?迅雷你要闹哪样?fuck!

于是我想我的win7系统下边用的是 7.1.8.2302这个版本,下载了一个,问题依旧

 

于是七爷怒了,直接找个非常老的版本,于是找到了7.1.0.1960,下载,安装,一切又都河蟹了
顺便给个官网链接 : http://down.sandai.net/thunder7/Thunder7.1.0.1960.exe

fuck 迅雷!!!

 

Referenced:迅雷7历史版本下载

August 31st, 2011 By 7m Categories: GNU/Linux

昨天装好了fcitx并且弄好了搜狗词库,当时很好用。今天开机登录,无法调用ctrl+space,然后就很蛋疼的折腾了几个小时。

先说解法,我自然是根据手册办事的好孩子,fcitx 3.6.3源码目录的data/fcitx3.pdf讲到的步骤:

1.编辑~/.bashrc

文档说的是添加一句,那就按照文档来:

export XMODIFIERS="@im=fcitx"

2.编辑/etc/X11/xinit/xinput.d/zh_CN

XIM=fcitx
XIM_PROGRAM=/usr/local/bin/fcitx
XIM_ARGS=""
GTK_IM_MODULE=XIM
QT_IM_MODULE=XIM
DEPENDS="fcitx"

文档讲完了,现在你重启一下X,发现fcitx的图标在边栏上出现了,但是敲ctrl+space没有任何反应。

下面就是解决方法,其间查了很多资料,包括ubuntu中国的

终于搞定了FCITX(Kubuntu 10.10) 

Ubuntu11.04 小企鹅fcitx输入法不能ctrl+space调出来 

综合我自己的解法,最后的解法是这样的

1.首先编辑: /usr/lib/gtk-2.0/2.10.0/immodule-files.d/libgtk2.0-0.immodules

将最后一行,由原来的:

"xim" "X Input Method" "gtk20" "/usr/share/locale" "ko:ja:th:zh"

修改为:

"xim" "X Input Method" "gtk20" "/usr/share/locale" "en:ko:ja:th:zh"

 2.修改/home/xsh/.xinput.d下面的文件

cd ~/.xinput.d
rm *

然后开始做一个链接:

 

ln -s /etc/X11/xinit/xinput.d/zh_CN en_US

 

重启X应该可以使用了。
后面的话:

1./etc/X11/xinit/xinput.d/下面的那个zh_CN文件可以是任何名字,你可以取名为fcitx,也可以taoofye,只是注意在~/.xinput.d下面做链接的时候自己修改一下就对了,比如:

 

ln -s /etc/X11/xinit/xinput.d/taoofye en_US

 

2.不知道为什么一定是要en_US,其实我的locale是这样的:

 

LANG=zh_CN.UTF-8
LANGUAGE=zh_CN.UTF-8
LC_CTYPE="zh_CN.UTF-8"
LC_NUMERIC="zh_CN.UTF-8"
LC_TIME="zh_CN.UTF-8"
LC_COLLATE="zh_CN.UTF-8"
LC_MONETARY="zh_CN.UTF-8"
LC_MESSAGES="zh_CN.UTF-8"
LC_PAPER="zh_CN.UTF-8"
LC_NAME="zh_CN.UTF-8"
LC_ADDRESS="zh_CN.UTF-8"
LC_TELEPHONE="zh_CN.UTF-8"
LC_MEASUREMENT="zh_CN.UTF-8"
LC_IDENTIFICATION="zh_CN.UTF-8"
LC_ALL=

应该是因为启动的时候环境是en_US的?我试着在/etc/profile之类的各种地方修改LANG,LANGUAGE这些东西为zh_CN.UTF-8,均无效,那就让他en_US启动吧,我们在~/.xinput.d下面做链接记得做名字为en_US的链接即可。

August 30th, 2011 By 7m Categories: GNU/Linux

主要是要把搜狗的词库用起来,花了几个小时的冤枉时间,得记录一下。

词库的信息我是从linuxsir上面看到的: 搜狗词库 for fcitx-utf8

因为我是从源码包安装的fcitx。

解压源码包,进入/data目录,发现两个org文件gbkpy.org,pyPhrase.org

用我们下载的sougou文件替换掉,回到上层菜单:

./configure;make;sudo make install

fcitx -c 生成配置文件,

fcitx启动,结果发现错误。

纯粹是乱搞,输入的拼音表现的完全一团乱。

思考许久,sudo make uninstall,将fcitx卸载

重新解压源码包,一路下来,装好是正常的,那么问题就出在替换的那两个文件上

 

什么问题?

我试着查看了原文件和下载的sougou文件的编码

enca pyPhrase.org

Universal transformation format 8 bits; UTF-8

  Surrounded by/intermixed with non-text data

源码包里的文件

enca pyPhrase.org

Simplified Chinese National Standard; GB2312

事情很清楚了,就是这个问题了,很简单。

 

enca -x GB2312 pyPhrase.org

小插曲:

gbkpy.org我始终用enca -x无法正常转码,最后想到一个损招

gedit打开原版的gbkpy.org,再开一个gedit打开下载的sougou版本的gbkpy.org

 

<C-c> <C-v>,保存,竟然成功了。

现在就把两个原版的文件替换掉,重新make;make install

搞定

August 25th, 2011 By 7m Categories: wordpress

You can see the effect, just CLICK THIS LINK:

How to use it if you are a user of kilu.de?Quite simple,just follow me:
step 1. upload your personal 404 page to /www/errorfiles,anywhere else in /www is OK,but i placed it here.
Here is my 404.html page source:

?Download 404.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Nothing found</title>
<style type="text/css">
<!--body {background-color: #0402a4;font-size: 18px;font-family: Courier, Consolas;color: #FFFFFF;}-->
</style>
</head>
<body>
<script type="text/javascript">
//<!--
function isIFrameSelf(){try{if(window.top ==window){return false;}else{return true;}}catch(e){return true;}}
function toHome(){ if(!isIFrameSelf()){ window.location.href="javascript:history.back(-1)";}}window.setTimeout("toHome()",5000);
//-->
</script>
<p>A problem has been detected and Browser has been shut down to prevent damage to your computer. </p>
<p>404_NOT_FOUND</p>
<p>If this is the first time you've seen this stop error screen, refresh your browser. If this screen appears again, follow these steps: </p>
<p>Check to be sure you have adequate disk space, if a driver is identified in the stop message, disable the driver or check with the manufacturer for driver updates. Try changing video adapters. </p>
<p>Check with your hardware vendor for any BIOS updates. Disable BIOS memory options such as caching or shadowing. If you need to use safe Mode to try again, restart your browser, press Ctrl+Shift+Delete to access Clear recent History, and then beside Time range to clear, click Everything, and then select clear now. </p>
<p>Technical information:</p>
<p>*** STOP:0×00000001( 0×00000000,0×00000001, 0×00000002,0×00000003 )</p>
<p>Beginning dump of physical memory</p>
<p>physical memory dump complete</p>
<p>Contact your system administrator or technical support group for further assistance. </p>
</body>
</html>

step 2. create a file named .htaccess,upload it to /www.

?Download .htaccess
1
2
3
4
5
<Files .htaccess>
order allow,deny
deny from all
</Files>
ErrorDocument 404 /errorfiles/404.html

Replace the string /errorfiles/404.html with the full path of your own 404 page.
May be you just put a page named error.htm in /www,so :

1
ErrorDocument 404 /error.htm

Referenced:
蓝屏404页面代码,艺术哦(附带跳转到上一页面)
搞笑实用的蓝屏404页面
kilu德国空间修改404错误页的方法