2007年5月5日星期六

给苹果系统提速

(翻译 http://www.thedvshow.com/cgi-bin/dvtips/newsscript.pl?record=53)

1.首先,磁盘碎片整理并不增加磁盘空间。唯一增加磁盘空间的方法是删除文件。磁盘碎片整理只是把不连续的磁盘空间整理为连续空间。

2.如果你在运行OS X Tiger或者Pather的话不需要进行磁盘整理。OS X在运行时实时整理所有文件大小小于20MB的文件。除非你有许多大文件经常修改,否则不许要进行磁盘整理。

(译注:在你需要经常修改大文件或者很多大文件变动时,操作系统可能不能分配到连续的完整空间,因此会使用不连续空间,这样再读取这些文件时会需要稍多的磁盘操作从而降低速度。)

你不需要进行磁盘整理,HFS+文件系统不像FAT和NTFS那样碎片化,它存放数据采用了更“聪明”的方式,不像FAT设计的那样贪婪的使用更多的字节。

如果你真的感觉需要进行碎片整理,那么可以使用第三方工具iDefrag。

关于碎片整理更多的建议可以参考Apple网站文档

3.在系统属性里面,去掉”put the hard disks to sleep whenever possible”选项。使用这个选项会导致磁盘唤醒时的延迟。

其它影响因素还有运行耗费cpu性能的进程,过低的磁盘空间,没有编码的资源等等。

4.使用AppZapper移除没有使用的程序,AppZapper不仅在Application文件夹移除文件,它会同时移除关联的.plist,甚至.dmg等关联文件。

5.检查/etc/hostconfig文件,关闭不需要的服务。如果需要更深入的优化,可以在控制台使用’ps -ax | more’查看后台进程。对于大多数后台进程可以使用’man NameOfDaemon’查看资料判断是否需要。

6.删除不需要的第三方程序。

删除Application中不需要的程序。有卸载功能的程序使用卸载功能,没有的直接把它放到垃圾箱。

属性文件包含有对应用系统的各种设置,如果删除了应用程序,那么也要把属性设置删除,可以直接拖动到垃圾箱或者Control-Click选择删除。

7.使用Disk First Aid

8.Onyx是众多系统工具软件中的一款,可以使用它来调优系统隐藏属性,进行清理工作提高系统性能。



Powered by ScribeFire.

The Zen of Python

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!

给sallingClicker添加realplayer的控制功能

Salling Clicker 是一款远端控制软件,类似苹果自带remote control的frontrow服务端,
支持使用蓝牙协议的手机﹑palm等来控制mac OS X。
安装完后带有dvd player,iPhoto,iTunes,VLC等的控制脚本,但是没有带realplayer控制
脚本。它的脚本使用的是applescript,可以自己编写realplayer控制脚本。
使用它提供的脚本模板keypad widget可以很快自己编写一个realplayer的控制脚本。
下面列出需要响应控制事件的部分脚本:
if the_key is "#" then
show keypad help keymap keymap_info title "Sample Help"
else
-- show screen message "'" & the_key & "' was pressed"
if the_key is ">" then
show screen message "play"
tell application "RealPlayer"
activate
play
end tell
else if the_key is "<" then
show screen message "pause"
tell application "RealPlayer"
activate
pause
end tell
else if the_key is "^" then
show screen message "up volume"
tell application "SEC Helper"
set system sound volume to system sound volume + 0.1
end tell
show screen message (system sound volume as string)
else if the_key is "v" then
show screen message "down volume "
tell application "SEC Helper"
set system sound volume to system sound volume - 0.1
end tell
show screen message (system sound volume as string)
else if the_key is "6" then
show screen message "un mute"

tell application "RealPlayer"
--activate
tell player 1
set is muted to false
end tell
end tell
else if the_key is "5" then
show screen message "mute"
tell application "RealPlayer"
-- activate
tell player 1
set is muted to true
end tell
end tell
else if the_key is "1" then
show screen message "full"
tell application "RealPlayer"
-- activate
tell player 1
set is full screen to true
end tell
end tell
else if the_key is "2" then
show screen message "un full"
tell application "RealPlayer"
-- activate
tell player 1
set is full screen to false
end tell
end tell
else
show screen message the_key
end if

全屏幕代码还没有调好。
手机按键说明:
上 提高系统音量
下 降低系统音量
左 暂停realplayer
右 播放
5 静音
6 停止静音
在nokia 6600 + MacBookPro上面测试通过。

2007年5月4日星期五

del.icio.us招聘c++高手

blogger.com使用的一些问题汇总

  1. 编写中文的时候不能把光标移到最后一个字的后面(苹果+Firefox下编辑) 2007-05-04
  2. 在Firefox下使用不能使用Home键移到行首 2007-05-04

比较firefox,camino,safari

firefox
优点:具有大量的插件,在windows,linux,Mac OS X 都可以使用,
能够方便的迁移各种浏览器数据,一致的操作方式。
(找不到苹果下面的顿号健了)

Camino
优点:速度非常快,使用Cocoa编写,堪称mac本地版的Firefox。

Safari:
优点:苹果系统自带浏览器

蓝色比特博客第一贴

今天在Firefox安装了ScribeFire,准备开始撰写博客,本准备申请
dreamhost在开始,但是始终为pending状态。
scribeFire支持了几种博客服务,有
  • wordpress
  • livejournal
  • jeeran
  • windowslivespaces
最终还是准备使用google提供的blogger.com(也可能不是google的)