太帅了!
~完了~
2009年1月31日
2009年1月21日
0
~完了~
上海电信的DNS劫持
作者:
孙继东
时间:
下午12:33
中国的互联网盛产流氓是不争的事实,CNNIC就是流氓们的风向标。
上海电信的DNS劫持问题网上已经有很多文章探讨了,我就不多说了。
对于民间草根流氓我们可以置之不理,大不了不使用它们的产品。但是对于电信,这坨基础设施提供者,的流氓行径,怎么才能逃出丫的魔掌呢?
从此不上网不现实,根本性地解决也非你我之力所能办到。唉,眼不见心不烦,换DNS:最开始我用OpenDNS,但是速度总有问题;后来我用香港的,今天上午,就在今天的上午,突然就不能用了。现在全民提倡不折腾,我还是老老实实的忍受,用回默认的吧,懒得再找一个能用的IP。刚刚改了路由器的设置,顺手封了vnet.cn和218.83.175.155。
唉。。。
2009年1月19日
1
/html/body/table[3]/tbody/tr/td/div[1] 删除右侧的广告栏 不要也可
//a[contains(@href, 'http://www.baidu.com/baidu.php?url=')]/parent::td/parent::tr/parent::tbody/parent::table 删除混在搜索结果中的广告
//a[contains(@href, 'http://www.baidu.com/baidu.php?url=')]/parent::td/parent::tr/parent::tbody/parent::table/preceding-sibling::br 删除广告条目上的br, 用来减少屏蔽广告后留下的页面空白 不要也可
使用容易出广告的词测试
HeaderControl
可以针对单独的域设置 User-Agent, Referer 和 语言,是 RefControl, UserAgent-Switcher 和 Modify Headers 三合一产品。
我的一些设置
1. 对google.com这个域设置语言为en,这样就不会再自动跳转到google.cn了,其他域不受影响;
2. 对qzone.qq.com这个域设置浏览器的User-Agent为windows xp, ie 6.0就可以看qq空间了,不过无法登陆,对于只开放给好友的qq空间还是没有办法看,腾讯使用只兼容ie的javascript来加密密码,https 不是更好吗? 腾讯真会省钱啊;(现在好像可以了)
3. 有些相册设置了防盗链,改Referer搞定。
安装地址:https://addons.mozilla.org/en-US/firefox/addon/6895
这个扩展与firefox 3.0.*不兼容,改版本号后可正常使用。
~完了~
firefox 扩展: RIP, HeaderControl
作者:
孙继东
时间:
下午4:21
半年前写的东西了,转到这里
RIP
我穷,买东西都是为了解决温饱问题,这些都可以在我家附近的超市解决。所以我不看广告,广告对我来说也没有什么意义。由于现在网络上的广告普遍采用按点击量进行收费,为防止误点击给广大广告主带来损失,我选择了在浏览器上屏蔽广告。
在 firefox 中使用订阅了 ChinaList 过滤规则的 adblock plus 就可以屏蔽大多数的广告了,但是还是有很多漏网之鱼,比如说百度的推广广告混在它的搜索结果里,我误点过很多次,内心非常不安。怎么办? 怎么办? 怎么办? 百度一下,还好,让我找到了 Remove It Permanently(RIP) 。
/html/body/table[3]/tbody/tr/td/div[1] 删除右侧的广告栏 不要也可
//a[contains(@href, 'http://www.baidu.com/baidu.php?url=')]/parent::td/parent::tr/parent::tbody/parent::table 删除混在搜索结果中的广告
//a[contains(@href, 'http://www.baidu.com/baidu.php?url=')]/parent::td/parent::tr/parent::tbody/parent::table/preceding-sibling::br 删除广告条目上的br, 用来减少屏蔽广告后留下的页面空白 不要也可
使用容易出广告的词测试
使用前
HeaderControl
可以针对单独的域设置 User-Agent, Referer 和 语言,是 RefControl, UserAgent-Switcher 和 Modify Headers 三合一产品。
我的一些设置
1. 对google.com这个域设置语言为en,这样就不会再自动跳转到google.cn了,其他域不受影响;
2. 对qzone.qq.com这个域设置浏览器的User-Agent为windows xp, ie 6.0就可以看qq空间了,不过无法登陆,对于只开放给好友的qq空间还是没有办法看,腾讯使用只兼容ie的javascript来加密密码,https 不是更好吗? 腾讯真会省钱啊;(现在好像可以了)
3. 有些相册设置了防盗链,改Referer搞定。
安装地址:https://addons.mozilla.org/en-US/firefox/addon/6895
这个扩展与firefox 3.0.*不兼容,改版本号后可正常使用。
~完了~
0
IBM thinkpad x31 风扇控制 Perl 脚本
作者:
孙继东
时间:
下午1:57
半年前我写的一篇博文
夏天到了,小本热的厉害,参考http://www.thinkwiki.org上的文章写了个小脚本!
#!/usr/bin/perl
my %correspond = (
50 => 'auto',
55 => '3',
60 => '5',
65 => '7',
);
my $temperatures_file = "/proc/acpi/ibm/thermal";
my $fan_file = "/proc/acpi/ibm/fan";
my $delay = "3";
my $pid = "/var/run/temperatures.pid";
die "Must run $0 as root\n" if $< != 0;
die "$pid exist!\n" if -e $pid;
open PID, ">", "$pid" or die "Cannot open pid file: $pid\n";
print PID $$;
close PID;
open FAN, '>', $fan_file or die "Cant open $fan_file for write, quit! $!\n";
print FAN "enable";
close FAN;
my $status = 0;
while (1) {
open FAN, '<', $fan_file or die "Cant open $fan_file for read, quit! $!\n";
chomp (my ($now_level) = grep /^level/, <FAN>);
close FAN;
$now_level =~ s/^level:\s+([0-9a-z-]+)$/$1/;
open TEMP, '<', $temperatures_file or
die "Cant open $temperatures_file for read, quit! $!\n";
chomp (my $temperatures = <TEMP>);
close TEMP;
# cpu, minipci, #hdd, gpu
my $max_tempera = (sort {$a <=> $b}
($temperatures =~ /:\s+(\d+) (\d+) \d+ (\d+) /)
)[-1];
my $i = 0;
my $act;
for (sort {$a <=> $b} (keys %correspond)) {
my $tempera = $_;
if ($max_tempera >= $tempera) {
$i++;
$act = $correspond{$tempera};
}
}
if ($i == 0) {
$act = 'auto' if $status != 0;
$status = 0;
} else {
if ($i <= $status) {
undef $act;
} else {
$status = $i;
}
}
undef $act if defined $act && $act eq $now_level;
if (defined $act) {
open FAN, '>', $fan_file;
print FAN "level $act\n";
close FAN;
}
sleep $delay;
}
~完了~
夏天到了,小本热的厉害,参考http://www.thinkwiki.org上的文章写了个小脚本!
#!/usr/bin/perl
my %correspond = (
50 => 'auto',
55 => '3',
60 => '5',
65 => '7',
);
my $temperatures_file = "/proc/acpi/ibm/thermal";
my $fan_file = "/proc/acpi/ibm/fan";
my $delay = "3";
my $pid = "/var/run/temperatures.pid";
die "Must run $0 as root\n" if $< != 0;
die "$pid exist!\n" if -e $pid;
open PID, ">", "$pid" or die "Cannot open pid file: $pid\n";
print PID $$;
close PID;
open FAN, '>', $fan_file or die "Cant open $fan_file for write, quit! $!\n";
print FAN "enable";
close FAN;
my $status = 0;
while (1) {
open FAN, '<', $fan_file or die "Cant open $fan_file for read, quit! $!\n";
chomp (my ($now_level) = grep /^level/, <FAN>);
close FAN;
$now_level =~ s/^level:\s+([0-9a-z-]+)$/$1/;
open TEMP, '<', $temperatures_file or
die "Cant open $temperatures_file for read, quit! $!\n";
chomp (my $temperatures = <TEMP>);
close TEMP;
# cpu, minipci, #hdd, gpu
my $max_tempera = (sort {$a <=> $b}
($temperatures =~ /:\s+(\d+) (\d+) \d+ (\d+) /)
)[-1];
my $i = 0;
my $act;
for (sort {$a <=> $b} (keys %correspond)) {
my $tempera = $_;
if ($max_tempera >= $tempera) {
$i++;
$act = $correspond{$tempera};
}
}
if ($i == 0) {
$act = 'auto' if $status != 0;
$status = 0;
} else {
if ($i <= $status) {
undef $act;
} else {
$status = $i;
}
}
undef $act if defined $act && $act eq $now_level;
if (defined $act) {
open FAN, '>', $fan_file;
print FAN "level $act\n";
close FAN;
}
sleep $delay;
}
~完了~
0
在 linux 中使用 mencoder 和并 Macromedia Flash Video(flv)
作者:
孙继东
时间:
下午1:48
2009年1月1日
订阅:
帖子 (Atom)


