2008年10月15日星期三

用firefox给医改提意见的方法

为了用电邮方式提交你的个人意见给国务院医改小组,而你用的又是firefox,那么为了解决网页上错误的javascript阻止你发表意见,你需要:
1. 安装greasemonkey 插件
2. 访问医改意见反馈网页:http://www.ndrc.gov.cn/yg
3. 添加下列用户脚本:
// ==UserScript==
// @name new
// @namespace my
// @include *
function On_Submit()
{

if(check(document.addForm))
{
window.open('','check_method','width=418,height=200');
document.addForm.submit();
}
}
// ==/UserScript==


第2个脚本:

// ==UserScript==
// @name sum
// @namespace http://2ban
// @include http://www.ndrc.gov.cn/ygyj/vcode.jsp

document.addEventListener('click', function(event) {
// event.target is the element that was clicked

// do whatever you want here
document.forms[0].submit();
// if you want to prevent the default click action
// (such as following a link), use these two commands:



event.stopPropagation();
event.preventDefault();
}, true);

// ==/UserScript==
4. 刷新页面,在出现输入校验码时,用tab键选择输入框输入,不要用鼠标点选,输入完毕后,用鼠标点提交即可。(抱歉我第一次用greasemonkey,javascript也忘了怎么用,所以大家将就用吧)

总之,我希望使用firefox的用户也有参与公共事物、发表个人意见的权力和渠道。

2008年9月11日星期四

为motorola Z6转换视频文件

按照z6手机的说明,该手机支持h263 /3gpp格式的视频,但发现其随机附带的视频用linux下的mplayer播放时检测为mpeg4/aac 编码的文件,这比h263所使用的单声道音频效果自然好很多,参考网上的资料,经检测下列命令适合把网上常见的mpeg4 podcast视频转换为可以在Z6上播放的节目,并获得mp4的视频压缩效果和aac立体声音频效果:
系统要求:
debian或ubuntu,添加对应的non-free源,如multimedia.debian.org (莫名其妙被大陆政府封锁),medibuntu.ubuntu.org
下载带non-free组件支持的ffmpeg程序

操作步骤:
1. 下载mp4文件,比如从miro订阅的podcast频道下载,假设名为 channel.m4v
2.
ffmpeg -i channel.m4v \             #源文件
-acodec libfaac \ #目标文件音频编码
-vcodec mpeg4 \ #目标文件视频编码
-r 10 \ # 每秒10帧的fps,Z6手机支持的最高可能是15
-s qcif \ #使用h263支持的分辨率和屏幕大小 176 x 144,这种分辨率没必要考虑字幕,更本看不清的,所以建议尽量牺牲视频的质量来缩减文件大小。
channel.3gp #目标文件

网上也有分离音视频(demux or rip),然后对视频用多pass来转换,最后在合成(mux),以提高视频效果的实现,但对于我的Z6简直是浪费。
如果你对声音的要求也很低,那么acodec可以用libamr_nb 或libamr_wb,这个对于人的语音是够了,vcodec可以用h263。

2008年6月12日星期四

how to play amr audio files

amr is 3gpp standard audio format, mplayer may support it natively in near future, or you can compile the amr codec into mplayer yourself.

But I'm lazy, so when I found this amr file on internet, I downloaded it and transferred to my motorola phone with bluetooth, so that I could play it.

另外偏题一下,上面这个电话录音是当事人自己公布的,不是我窃听的。里面是中产阶级的夫妻俩在吵架,妻子借批评孩子不好好学习来埋怨丈夫不好好做自己的正事,老给家里惹麻烦,宣泄自己对cops的fear,对未来的恐惧。 情感真实,本色出演,比任何肥皂剧都感人,更有现实意义,背景信息可以看这里:http://groups.google.com/group/cuihua/browse_thread/thread/7f0a4ce23638234f

2008年6月11日星期三

how to choose a condom

Warning: This is not a scientific article, it's from my personal experience.

Condom is an easy and safe way to protect your sex mate, but because most of them are made from some kind of nature rubber, it's has bad heat conductivity, and can reduce the sensibility. So I prefer to use the super thin type (here I mean skinny not smaller ). I found the diameter is not important, and choose a smaller one has no improvement for my sex life. I think, it's because tighter condom is still thick than the thin type of normal or size, unless it's as small as a tooth-stick :)

I haven't try other type besides thin, smaller and normal type. Of course, I hate to use condom, but it's the best choice proved so far.
== RED RIBBON ==
 __
| ))
 X\
/ \\

===== LOVE =====

2008年6月10日星期二

undelete files on vfat filesystem

step 1: Delete your favorite files on a vfat filesystem in a usb-flash drive with command:cd /media/usbkey rm *
step 2: Unmount the filesystem with command: umount /media/usbkey
step 3: Try to remember the path of the deleted files, then undelete them with command: dosfsck -r -u

note: the path begin with slash, from the root of usb drive, not from the mount point.

2008年5月22日星期四

rip audio from mpeg file

time mplayer 惊梦-hxf.mpg -ao pcm:fast -vc null -vo null
you will get a raw wav file, then use lame compress it to mp3.

http://www.doom9.org/index.html?/belight-ac3tomp3.htm