Thursday, December 31, 2009

Happy New Year! 2010

Happy New Year!

I wish...

Wednesday, December 9, 2009

authinfo.gpg caused Emacs error "Args out of range: "", 0

You may encounter the followinf error if you follow the instructions in
Emacs *info* auth-source, and generate an .authinfo.gpg file in your
home directory.

Passphrase for symmetric encryption: error in process filter: Args out
of range: "", 0

This didn't happen until recently when I ran gnus in daemon mode, and it
only happened if I start it with a sh script like this:

#! /bin/sh

# run gnus in background

gnus_server()
{
emacs --daemon=gnus \
-eval "(gnus)"
}

Everthing would work well if I start the Emacs daemon first, and M-x
gnus then.

The solution is simple, yet cost me over hours to find it out:

mv .authinfo.gpg .authinfo

or, rm .authinfo.gpg

if you did a cp in the past.

I think this maybe a bug included in the recent updates, as it didn't
happened when I ran that same sh script before I updated to Ubuntu 9.10.

Tuesday, November 24, 2009

firefox problem with wireless connection

I had problem visiting some websites with firefox. The pages could not
render, refresh didn't work either. How ever, I could see that the source
was loaded.

The most weird thing was that google-chrome could still work at the same
time, which made me think it was not a networking problem but a bug with
the newly upgraded firefox. I tried re-installing the firefox and all
its dependence, where aptitude worked as well as google-chrome, yet this
didn't help solve the problem.

The real cause for this problem turn out to be with the wireless
connection, and if replaced the TP-LINK wirelss card (TL-WN510G) with a
wired connection problems went away. This is found out using wireshark,
after captured a lot of TCP Retransmission packets.

I still can not understand why would things like this happen: no other
applications but firefox would have problems with the wireless connection
(apt-get and google-chrome works), and, the problems are limited to a
few websites (51job would fail while google.com works).

It maybe related to the tcp connections limitation at a same time, but
this is just my guess.

Monday, November 16, 2009

henu-cernet client for GNU/Linux

Visist here: http://bku.net.ru/henu-cernet to download the henu-cernet client for GNU/Linux.

Wednesday, November 11, 2009

Tor is back - config tor bridge without vidalia

Tor used to be blocked by China's GFW, but now it is back! Here is how
to manually config tor to use bridge without the vidalia GUI, useful for
FreeBSD and GNU/Linux users, especially for those who live in China.

It has been so long a time, since August 2009, that I can not visit
blogger, youtube, twitter, vimeo, picasa, or anything else that is
contributed and enjoyed by other Internet users, even with Tor, which
greatly helped me before in using the Internet free and securely.

It's all because of GFW, on which I don't want to comment too much. What
I support is Chinese government to censor the Internet and to guide
masses, for I am a somewhat patriotic guy not interested in dog-eat-dog
politics, and CCP did change and improve the life standard of my family
in the last few decades.

However, would you PLEASE *distinct* those so-called anti-government
content from other normal information? Would you please give us some
restricted freedom under your great and wisdom control?

All I want and need is something interesting and new, like a funny cat
picture, a comedy video, or some latest news from my friends. Give me
access to these good things, and block/remove/delete/whatever the other
fucking damn FLG, CNN, or Tibeter. Who cares!?

Okay. Let's come to the config file for using tor with bridge.

FILES

/etc/tor/torrc

OPTIONS

Bridge IP:ORPort [fingerprint]

When set along with UseBridges, instructs Tor to use the relay at
"IP:ORPort" as a "bridge" relaying into the Tor network. If
"fingerprint" is provided (using the same format as for
DirServer), we will verify that the relay running at that
location has the right fingerprint. We also use fingerprint to
look up the bridge descriptor at the bridge authority, if it's
provided and if UpdateBridgesFromAuthority is set too.

UseBridges 0|1

When set, Tor will fetch descriptors for each bridge listed in
the "Bridge" config lines, and use these relays as both entry
guards and directory guards. (Default: 0)

UpdateBridgesFromAuthority 0|1

When set (along with UseBridges), Tor will try to fetch bridge
descriptors from the configured bridge authorities when
feasible. It will fall back to a direct request if the authority
responds with a 404. (Default: 0)

EXAMPLES

# This example is copied and pasted from a vidalia generated torrc.
# The IP and port of bridges have been modified. ^&^
# For real tor bridges, try Google.

Bridge 8.98.151.48:80
Bridge 81.59.250.53:43
Bridge 108.125.18.153:91
UpdateBridgesFromAuthority 1
UseBridges 1

You can also get these help from

$man tor

And, finally, once again, I'd like to say it is the government's right
and responsibility to censor and to guide masses. I support the
government's position and shall defeat the FLG, CNN, and Tibeter. I
support China!!

Thursday, September 24, 2009

Google Wave and "Gmail is temporarily unable to access your Contacts"

At this time(Thu Sep 24 23:43:42 CST 2009), hundreds of thousands of
gmail users are experiencing the problem of "Gmail is temporarily unable
to access your Contacts. You may experience issues while this
persists". And, there are already many posts about this topic, saying
it's once again an outage, google's fault or mistake.

But to my view, it's obviously not an exception, but an necessary
procedure toward the extent of Google's recently most exciting and
powerful product: Google Wave! Goole Wave will be out of the sandbox,
and be extended to every now Gmail users within this week, that's the
real cause for this "temporarily unable" thing.

Why?

Did you notice that google contact has been working so well despite the
intentionally highlighted err notice on Gmail, which has been there for
over hours. Have you ever experienced such funny FAULT or OUTAGE that
google will allow to PERSIST for so long a time?

It's no exception, it's Google Wave's coming! Let's wait to see!!

----------------------------------------
All these words are just my personal assumption based on very few proof,
so it has nothing to do with Google Mail or Google Wave. All I want to
do is to make an prediction.

Wednesday, August 26, 2009

[drm:i915_get_vblank_counter] *ERROR* trying to get vblank count for disabled pipe 0

This is about how to solve a frame buffer problem I encountered after
upgrading to the 2.6.28-15-generic kernel. Last week I enabled the frame buffer
in my grub menu.lst to use the very fast fbterm(a Chinese console
environment, better than zhcon), with the following options:

vga=791 video=vesafb:ywrap,mtrr:3

At that time, everything worked well, and I really enjoyed the many
features of fbterm: display ttf font, Chinese and any other double width
characters, as well as the scrollback history.

However, after I upgraded to the latest kernel 2.6.28.15-generic in
through Ubuntu's apt, I found the console couldn't work any
longer. After the GRUB menu, everything disappeared and nothing showed
until the very late stage, when X desktop stared. If I get out to
the console with Ctrl+Alt+F1, it is still blank, and I found the
following message in dmesg every time I tried to invoke the console:

[drm:i915_get_vblank_counter] *ERROR* trying to get vblank count for
disabled pipe 0

A quick google gave no answer to my question, and a test of booting with
the previous 2.6.28-14 kernel didn't help either. So it's not a problem
with the upgrade, and there must be something wrong with my
configuration, but I am sure I didn't change any of the system files.

...

The resolution of this problem finally came when I was checking the vga
opinions, and thought of the vesafb module. Was it loaded?

lsmod | grep fb

told me the answer, and after I load vesafb with the command:

modprobe vesafb

MY CONSOLE IS BACK!

I think the kernel should load it automatically as the options given is
clear, but it didn't. No matter how, I add the it in /etc/modules, and
hope it will solve this problem.

--------------------
UPDATE:

Found the source of the problem, in

/etc/modprobe.d/blacklist-framebuffer.conf

to solve the problem, just comment out the line of vesafb.

--------------------
UPDATE2:

It's not the blacklist, change it won't help. it's the mtrr option,
it should be:

vga=791 video=vesafb:ywrap,mtrr:1

Sunday, August 9, 2009

iptables forward local port 80 to 8080

This is about how to forward local port 80 to 8080, or any other port,
which is useful when you are runing some test server with no root
privilege, while the client can still connect to the standard www port.

iptables -t nat -A OUTPUT -d 127.0.0.1 -p tcp --dport 80 -j REDIRECT --to-port 8080

Friday, August 7, 2009

cmd create a .lnk(shortcut)

We don't use any extra command tool that you have to download somewhere
else and worry about its security, but the winxp built-in cscript(or
wscript, if you prefer) to excute a little Jscript creat-a-lnk.js(source
followed), and create your shortcut on the desktop(or anywhere you want
to), quick and safe!

--------------------create-a-lnk.js--------------------
Shell = new ActiveXObject("WScript.Shell");
DesktopPath = Shell.SpecialFolders("Desktop");
link = Shell.CreateShortcut(DesktopPath + "\\shortcut-name.lnk");
// If you want:
// link = Shell.CreateShortcut("D:\\path\\to\\your\\shortcut-name.lnk");
link.Description = "a lnk created from cmd";
link.HotKey = "CTRL+ALT+SHIFT+l";
//link.IconLocation = ".exe,1";
link.TargetPath = Shell.CurrentDirectory + "\\lnk-to-this.txt";
// If you want:
// link.TargetPath = "E:\\path\\to\\your\\target.exe";
link.WindowStyle = 3;
link.Save();
--------------------create-a-lnk.js--------------------

Personally, I feel this is much better than running some unkown
XcreateLnk.exe as you can see the source, learn the process, and
guarante the security of your system.

linux zip/unzip err encoding 压缩解压中文文件 乱码

在linux下压缩和解压(zip,unzip)时,如果文件名中含有中文,就会由于文件名编码
(encoding)不同而出现平台(GNU/linux与win)之间制作的压缩包不能互相兼容的问
题,就是所谓的乱码.这里说一种最简单的解觉方法(2009)

首先,出现这种情况时不需要紧张,因为这只是文件名称的混乱,文件本身的内容还是正常
的.

然后,来看解觉的方法^_^:
前提:您身处2005以后的时代~
安装了zip,unzip ->以ubuntu为例 (~$ sudo apt-get install zip unzip)

1.制作可以在win下打开的zip压缩包
# sorry.暂缺

2.解压在win下制作的zip压缩包
~$ unzip -O cp936 /path/to/file.zip

-O 参数指定原压缩包的编码方式.
简体中文(GBK/GB2312) 为 cp936
繁体中文(BIG5) 为 cp950

结束语.
遇到问题,先尝试 -h --help,然后man,再然后才轮到Google.

小记:因为要从压缩包里取一个文件名含中文的文件夹出来,记得以前在linux下做的
压缩包在win下会打不开,反过来win下压缩的也会解压成乱码,就试验了一下.果然,
跟以前一样还是行不通的,并没有因为时间过渡到了2009,版本升到了9.04就有所改
变.乱码依旧,直接google,结果除了台湾一个贴子看起来比较有趣外,英文的搜索没
有结果,中文搜索 linux 压缩 解压 乱码得到的全部都是关于rar,7z代替的方案,
再不然就是一篇转了无数次的更改zip源代码的沉旧文章.可是我原先的zip都做好
了,并切也(还)没有养成动辙就源代码编译的好习惯(尤其是在ubuntu下),所以就准
备reboot回我们的D版winxp...

就在^D退出Terminal的这当口,想到了-h, --help.

于是就有了本篇的故事.为什么ubuntu里面带的zip不是Info-ZIP的呢?那样也许就
可以在制做压缩包的时候也指定编码格式了.

# 台湾的站
http://mrtg2.tnc.edu.tw/xoops/html/modules/weblog/details.php?blog_id=181

Sunday, August 2, 2009

google code svnsync Error setting property

When I tried to sync a local repository to google code project host, I
got the Error setting property.
yang@acer:~$ svnsync init https://yangs.googlecode.com/svn file:///home/yang/code.google/
yang@acer:~$ svnsync sync https://yangs.googlecode.com/svn
.......
Committed revision 7.
Copied properties for revision 7.
Transmitting file data ................
Committed revision 8.
svnsync: Error setting property 'log'
svnsync: At least one property change failed;
repository is unchanged
svn: Error setting property 'log'
Could not execute PROPPATCH
After somewhat hours of googling, I didn't find any direct solution for
my problem, although it did help me get an general understanding of
several keyword in the err log:
PROPPATCH is an http method used in WebDav, just like GET, POST, and
PUT.
property is some technology SVN used to store additonal
information about the files in a repository.
Okay, let's go back to my problem, and its solution. In fact, it's easy,
and all included in the svn help. I didn't realize this until I went
back to the svnbook after long time unsuccessful attempts to google the
solution.
The Err message tells you that something wrong happened while setting a
property 'log'. Exactly speaking, it's the 'log' property of revision 8,
as the err happened right after revision 7's commit job was done. So, to
solve the problem, you need to check and repair the 'log' property of
r8, with the folling command:
svn propedit --revprop svn:log file:///home/yang/code.google/ -r8
In my case, it's some unknown blank new lines at the end of the 'log'
property. After remove them, and the command svnsync went through
without any problem.
Hope this will help those who encounter the same/similar questions, and
the lesson I learned from this experience, again: read the manual~

Monday, May 4, 2009

入党志愿书 2009

我志愿加入中国共产党,拥护党的纲领,遵守党的章程,履行党员义务,执行党的决定,严守党的纪律,保守党的秘密,对党忠诚,积极工作,为共产主义奋斗终身,随时准备为党和人民牺牲一切,永不叛党。

中国共产党是中国工人阶级的先锋队,同时是中国人民和中华民族的先锋队,是中国特色社会主义事业的领导核心,代表中国先进生产力的发展要求,代表中国先进文化的前进方向,代表中国最广大人民的根本利益。党的最高理想和最终目标是实现共产主义。我愿为共产主义事业奋斗终身。

自1921年建党至今,我们的党已经走过了80多年的道路。这几十年,中国共产党从小到大、从弱到强、从幼稚到成熟,不断发展壮大。从建党之初的50多名党员,逐步发展到今天拥有七千多万党员的执政党。并在长期的革命和建设过程中,先后形成了分别以毛泽东、邓小平、江泽民为核心的三代党中央领导集体。

新的历史时期,树立和落实科学发展观及构建社会主义和谐社会,是以胡锦涛同志为总书记的党中央提出的重大战略思想。科学发展观揭示了中国发展的本质和核心在于坚持以人为本。以人为本,就是以实现人的全面发展为目标,从人民群众的根本利益出发谋发展、促发展,不断满足人民群众日益增长的物质文化需要,切实保障人民群众的经济、政治和文化权益,让发展的成果惠及全体人民,这直接构成了构建社会主义和谐社会的根本目的。构建社会主义和谐社会必须以人为出发点,着眼于人的问题。努力为构建社会主义和谐社会服务,更是我们每一个共产党员的责任和义务,我们要满腔热忱的投入到建设中国特色社会主义事业中去。

中国革命的实践雄辩证明了没有中国共产党的领导就没有新中国,没有中国共产党的领导,中国人民就不可能摆脱受奴役的命运成为国家的主人。党是中国特色社会主义事业的领导核心,我以自己能够加入这样伟大的党而感到光荣和自豪。是党把我从一个不懂事的孩子培养成为一名具有大学文化程度的青年。多年来,在党组织的教育与培养下,通过自己的刻苦学习与工作锻炼,我牢固地树立起坚定的马克思主义政治信仰和共产主义理想信念。加入中国共产党,为共产主义理想、为建设中国特色社会主义、为党和人民的根本利益而奉献自己的青春、热血与汗水,这是我的毕生信念与追求。

现在,如果能接纳我为中国共产党党员,我一定要认真地用共产党员标准来严格要求自己,全心全意地为人民服务,不谋求任何个人私利.百折不挠地执行党的决定,维护党的团结和统一,严守党的纪律,保守党的机密,对党忠诚老实,言行一致,密切联系群众,在工作、学习和社会生活中起先锋模范作用,随时为捍卫党和人民的利益英勇斗争,为全面建设小康社会的宏伟目标不懈奋斗。

如果暂时不能吸收我入党,那说明我距离党的要求还有一定的差距,我将无情地解剖自己,认真改造世界观、人生观和价值观,不断克服自身存在的缺点,争取早日成为一名光荣的中国共产党党员。

我志愿加入中国共产党,为共产主义事业奋斗终身!

X X X

2009年X月X日

Friday, May 1, 2009

澄海3C-CREG-无限版 下载地址及开启方法

澄海3C-CREG-无限版,非作弊版本。下载地址:
点击这里下载
无限技能,需要5V5(可以加电脑),选择死亡模式,即自动开启。

Friday, April 24, 2009

Got my first offer! from Southampton!

A conditional offer from Southampton, my first offer.
Please find attached your formal offer letter - a copy is also being sent via post as well.


It is important that you reply as quickly as possible - but please sign and return the "Reply to Offer" form in the post. Please do not wait until you have fulfilled the conditions (if any conditions are stated). Your offer is only valid for two months from the date of the offer letter.


We look forward to hearing from you.

Wednesday, April 15, 2009

my google adsense account was disabled

this morning(4:00 A.M.), while I was trying the usb zip32 boot with FreeBSD, I noticed there was a email from google, with the title "Google AdSense Account Disabled".

So, my google adsense was disabled, and it also said that publishers disabled for invalid click activity are not allowed any further participation in AdSense. Which make me feel sad, for I like google, and the google advertise on my website means something more than the little amount of money(less than $10 in last month). I even saved the envelop received from Google Adsense, just because there is a Google's Logo.

But, now I was disabled.

The merely one thing make me feel a little better is that Google said it's going to return the money:

The earnings on your account will be properly returned to the affected advertisers.

And, I hope it's true.

If you have got he bad luck as well as I, visit this online appeal form. And google may give you a final chance.

Wednesday, March 25, 2009

cert-henu-p2p-speed教育网的速度

昨晚有人在学校网管群里抱怨校园网限速,限制p2p。作为cert教育网的忠实拥护者,截图(因为是PrintScreen直接截的图,电影内容看不到)一张,以视听。可以看到,播放器右下角的即时速度为453KB/s。其实,峰值可以达到580多KB,不过是我按键的速度慢了点儿。

Tuesday, March 24, 2009

narrowad被黑导致xinhua被挂马

2009-03-24下午 18:36 google搜索图片过程中firefox挂掉了

还看到一个rundll错误的提示框,同时发现不明进程orz.exe(先前有听说过,但跟熊猫烧香一样从来没中过,汗……)
当时不太明白的是为什么xinhua网会被挂马,并且是2007-09那么古老的东西
后来一层一层的挖出来是广告商narrowad的问题。
比较有趣的是,在将近20点时,病毒被清除了,xinhua网上的广告恢复正常。(当时正在从2007-09到2009-03一页一页地测试)

还原后的恶性js脚本

疑问:
1.firefox下的flash插件早已升级,为什么还会出现这样的情况?
2.广告商是如何被黑?(很感兴趣……)以及,又如何恢复过来?

---------------
更新: 2009-03-24 22:49
疑问1.的答案找到了,早期遗留下的旧版本falsh插件没有彻底清除,导致中马。惭愧……不过,给系统盘设置读写权限的做法很好地保护了俺免遭木马毒害。V

Thursday, February 26, 2009

resume a background progress after logout(not ^z bg/fg)

here I'd like to share with you some useful tips I just founded while learning to set up a CS1.5 server on GNU/Linux. It's about how to resume a progress that had been put into background as you logout, and it's not the ^z and bg/fg stuff.

we have all come crossed such situations that we need to leave for a few seconds or just some unexpected things kicked us out from the system when we were still running a program, say 'nc -l -p 80'. This happens commonly when you are logging in with a not-robust connection, and when we get back, the the program is still there, running in the background. You can see it with a 'ps -A', but never will you be able to 'fg' it.

So, what shall we do?

The answer is 'screen'. With screen, you can safely "save" a running progress in the system, and "resume" it at any time. Following is the usage from 'man screen'.

SCREEN(1) SCREEN(1)

NAME
screen - screen manager with VT100/ANSI terminal emulation

SYNOPSIS
screen [ -options ] [ cmd [ args ] ]
screen -r [[pid.]tty[.host]]
screen -r sessionowner/[[pid.]tty[.host]]

-d -m Start screen in "detached" mode. This creates a new session but
doesn't attach to it. This is useful for system startup
scripts.

-S sessionname
When creating a new session, this option can be used to specify a
meaningful name for the session. This name identifies the session
for "screen -list" and "screen -r" actions. It substitutes the
default [tty.host] suffix.
And, examples I found at a GUN/Linux CS server howto.

"save a progress in background"

'screen -A -m -d -S hlds ./hlds_run -game cstrike +ip ip.de.internet +sv_lan 1 -nomaster +maxplayers 18 +map de_dust2'

"resume it whenever necessary"

'screen -r hlds'

To make it background again, Hold ctrl, then press and hold A, then press D.

Sunday, February 22, 2009

gong1chuang1.com

今天(2月22号)返回学校才收到上年(2008年)12月24日google中国按照我的申请寄来的益暖中华大学生公益创意大赛的宣传资料,

而大赛的初赛截至日期是2月14号……

Thursday, January 1, 2009

keep an eye on Microsoft

Maybe we are all googlers, who hate Micro$oft and love GNU, but it is still necessary to watch Bill's huge company, world's largest software company.

向来喜欢标榜自己是google的忠实拥护者,努力用开源的GNU替代微软,然而还是很有必要留心比尔盖茨的大公司,世界上最大的软件公司

here are some websites you may be interested.

Live Services
MSDN Blog
Azure