Search On VeryCD

最近在看Safari Extensions. 自己也尝试着写了一个. Search On VeryCD, 就是在右击菜单里面添加search功能.
search on verycd. 同时在safari偏好设置, 可以设置窗口打开的方式.

这是我第一个Extension, 所以有bug也是避免不了的, 如果有什么bug, 请随时联系我.

其实Extensions还是挺容易的.而且safariextz只是一个压缩格式而已, 你可以在命令行里面使用 xar -xf 'TheExtensionName.safariextz' 来解压文件, 然后可以看到里面所有的内容. 在windows下面你可以使用7zip来解压这个文件. 你可以尝试解压我的Extensions, 来看看到底怎么回事.

require ‘rubygems’ => false

The value returned by require doesn’t tell whether there was an error or not (if the file can’t be found, a LoadError exception will be raised).

since require tries to avoid loading a file more than one time, it says whether you required the file for the first time (true) or if it had already been loaded (in this case returns false and doesn’t try to load the file again). So, the fact that in irb

require ‘rubygems’

returns false only means that the file rubygems.rb had already been loaded,
and it wasn’t necessary to load it a second time.

~$ irb
irb(main):001:0> require 'time'
=> true
irb(main):002:0> require 'time'
=> false

Get Windows Live Hotmail in Mail.app

Start by opening up Mail and going to the Preferences. Click on the Accounts tab and create a new account by clicking on the plus (+) at the bottom. Enter your name, email address and password, then click continue to set the incoming mail settings. Enter the following:

Account Type: POP
Description: Hotmail (or whatever you like)
Incoming Mail Server: pop3.live.com
Username: Your email address
Password: Your password

In the next section, you should leave the Use SSL checkbox checked and Authentication as Password. For the outgoing mail settings, enter the following:

Description: Hotmail (or whatever you like)
Outgoing Mail Server: smtp.live.com
Check “Use only this server”
Check “Use Authentication”
Username: Your email address
Password: Your password

As before, leave Use SSL checkbox check and Authentication as Password.

事实上 Mail.app会自动识别并使用MSN POP, 基本上只要把第一个页面的输入用户名和密码, 其他会自动配置好.

MagicPrefs Makes Your Magic Mouse Cooler

MagicPrefs is a free menubar application which aims to improve the functionality and configuration options of the Apple Magic Mouse.

- It features the ability to bind a variable number of finger clicks, taps, swipes, pinch and other gestures to functions like Middle Click , Hold Down Both Mouse Buttons , Spaces , Expose, Dashboard etc.
- Touch Sensitivity implements a single point control for a number of factors impacting the algorithms of the taps, swipes, pinche and other gestures.
- Tracking Speed adds the ability to increase the maximum mouse speed by a extra 200%.
- Also featured is a real-time display of the fingers touching the surface of the mouse that you can enable to test and monitor the way the mouse sees fingers.

Download

Use badge at ICON

It is very easy to use badge at ICON like mail

[[[NSApplication sharedApplication] dockTile] setBadgeLabel:@”3″];

Here is an example to show how to use badge and change dock title or image.

http://developer.apple.com/samplecode/DockTile/listing5.html

MAC 加载 EXT2/EXT3

很多书上都写到了如何在mac里面加载NTFS格式的硬盘, 但是很少提到如何在mac里面加载ext3格式. 目前有两种方式.

1. 下载Mac OS X Ext2 Filesystem, 刚方法似乎在雪豹中无法使用, 或者在不久的将来就能被解决了, 这样就可以用linux里面的mount命令来挂载ext2格式的硬盘了, 注意ext3格式也是使用这个命令.

1. cd ~
2. mkdir linux
3. sudo mount -t ext2 /dev/disk1s11 ~/linux

2. 如果安装了MacFuse, 再安装 fuse-ext2插件就可以了, 不过这个在雪豹64位模式下无法使用, 只能在32模式下使用, 自动加载的linux卷宗是只读模式的, 如果需要可以模式那么需要推出该分区,然后通过命令行来挂载.

$ sudo /usr/local/bin/fuse-ext2 -v /dev/path /mnt/point -o debug

说明:

$ fuse-ext2 <device|image> <mountpoint> [-o option[,...]]
options:
ro : mount read only
force: mount read/write
allow_others: allow other users to access
debug: noisy debug output