修复 Mac OS X 新版 Terminal 在 SSH 时候出现的 LANGUAGE WARNING

自从升级了新版的 Mac OS X 之后,使用 Terminal SSH 到别的机器上总是能看到这样的警告:

在执行 perl 脚本的时候还能看到这样的警告:

找了很多方法,包括改服务端 sshd config 什么的,都觉得不好。因为这应该不是服务端的问题,不应该在服务端解决。于是仔细搜索之后发现这个回答完美解决了这个问题:

http://stackoverflow.com/questions/2499794/how-can-i-fix-a-locale-warning-from-perl/7413863#7413863

Here is how to solve it on Mac OS Lion (10.7):

Add the following (更多…)

How to Start the Mac Screen Saver with a Keyboard Shortcut in OS X

start-screen-saver-keystroke-mac

Have you ever wanted to initiate the screen saver of your Mac by hitting a keystroke combination? You’re not alone, and that’s what we’re going to show you how to do here. While OS X does not include this feature by default, we’ll demonstrate how to create an Automator system service that will accomplish the same feat, activating the screen saver by a keyboard shortcut of your choosing.


To (更多…)

How to Change the Profile Picture of a Mac User Account

The first time you set up a Mac or new user account, you’re asked to pick a profile picture for that account. Most of us set this image once and don’t think much about it, but that profile picture follows us around in OS X and is visible at each boot login menu, in the Fast User Switching menu, visible to other users with AirDrop, and plenty of other places in Mac OS X.

If you decide you want to change (更多…)

Maintain & Recall Command Line Clipboard History with iTerm 2

iterm2-icon

Mac users who spend a lot of time at the command line have yet another reason to use iTerm 2 as their default terminal client; clipboard history. Added in the most recent version of iTerm, a running history of OS X clipboard activity can be natively stored, recalled, and summoned directly in iTerm2, accessible through a handy new feature panel called Toolbelt.


You’ll need the latest version (更多…)

git commit 出现There was a problem with the editor ‘vi’

今天在Mac OS X 10.9.3上使用git的时候遇到这么一个问题,执行git commit操作会显示如下错误:
There was a problem with the editor ‘vi’

搜寻了一下相关的解决方案,发现好多人遇到了这个问题。似乎是因为vim的返回值有问题导致的。
所以执行一下下面这条命令:
$ git config –global core.editor /usr/bin/vim
将git使用的编辑器强制指定一下,就可以正常使用了。具体的错误分析就不翻译了,贴在下面:

I have had an annoying problem with git and vi. I like to use vim to edit my commit messages, but I’ve been hit with this annoying message (更多…)

OS X 支持 NTFS 读写

苹果的 OS X 明明已经支持 NTFS 分区读写, 但是默认情况还是按只读挂载, 查了些资料小修改了下, 就可以开启原生读写了
# 用 root 身份做如下操作 (高危! 请切记自己在干什么)
sudo -s

cd /sbin
# 将系统自带的挂载程序改名
mv mount_ntfs mount_ntfs_orig
# 新建我们要的挂载脚本并编辑
vim mount_ntfs

mount_ntfs
#!/bin/sh
/sbin/mount_ntfs_orig -o rw "$@"

# 保存退出后改一下权限
chmod a+x mount_ntfs
# 都搞定了, 退出 root 身份
exit

不过这个方法还有几个小问题要注意

1. 分区最好有卷标, 默认的 “未命名磁盘” 可能无法挂载. 如遇无法自动挂载可以先在终端下改个名再试
# (更多…)

Mac OS 禁止apache httpd自动启动

mac os不像linux有/etc/init.d/rc.local以及service的方式可以设置程序随机启动,而是使用plist文件管理。
plist文件分布在:/System/Library/LaunchDaemons/中的最多,其中apache的httpd程序启动配置文件org.apache.httpd.plist就在这里。
但这些配置文件可由程序launchctl设置是否加载。也就是说,在launchctl list命令结果中出现的plist文件才会有效。
launchctl需要root权限。
禁止其随机启动方法:

sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist

如果没有任何输出就是成功卸载了。如果要加载,把unload换成load即可。
第二次运行unload会发现错误:launchctl: (更多…)

Claim back disk space from Mail.app (Gmail)

There is a good chance you read your mail from Gmail with Mac’s native Mail app. There is also a good chance you never really paid attention to how much disk space all this content synced with Gmail IMAP really takes up. Having recently replaced my internal 160 GB hard drive with an Intel X25-M SSD drive half the size, I’m naturally eager to strip all the unnecessary stuff out of the system in order (更多…)

[转]自制可更新MAC版国服魔兽世界

        无论是黑苹果还是白苹果,mac下病毒比窗口少这是不争的事实。5.2马上来临,你的mac准备好了吗?还在为mac下客户端每次升级担心?还在windows下更新而后拷贝到mac下?希望一个一劳永逸的法子?那么你最好看下。

 

       特别提示,有异议请勿看,可能《X-Only》Huan.Zuo大大发布的补丁更适合您。

 

不废话了,直接开始。

(本人系统为OSX Mountain Lion 10.8.2,经测试10.7以上均可使用。)

工具/原料

  • 原理

    1、全球版本大统一

    2、更新和登陆目前是Config.wft文件控制

  • 台服或者美服安装包

    美服安装包下载地址

    下载页面 https://us.battle.net/account/download/

    安装包 (更多…)

Mac下删除“打开方式”里面重复的软件列表方法

在Mac系统中,如果一个程序进行了版本更新,那么就会在打开方式中留下两个相同的打开方式。虽然一两次还能忍受,但是时间长了会让列表变得过于庞大。

20090811-ejw6qi74x5r4xmgdfrrtreiafa

要解决这个问题,可以通过把出问题的程序拖到垃圾桶再放回来解决,但是程序一多就不是一个办法了。其实,只要打开terminal(终端),复制粘贴(完整的一行,是一条命令),执行后即可重建列表。

/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system-domainuser