Tag: macOS
-
Installing the Old AirPort Utility (Version 5.6) on Mountain Lion | frank.is
As it turns out, the AirPort Utility application is totally compatible with Mountain Lion even though its installer isn’t. Using it is a not-so-simple process of extracting it from the package.
via Installing the Old AirPort Utility (Version 5.6) on Mountain Lion | frank.is.
-
当在 OS X 上编译部署 Ruby 时出现 “You have to install development tools first.” 错误时的解决方案
一般出现这个问题时在 Lion 、 Mt. Lion 往上的系统中,因为自从某个版本之后 Xcode 将 gcc 由
gcc-4.2
改为llvm-gcc-4.2
所致。所以解决方法也很简单:cd /usr/bin/ sudo ln -s llvm-gcc-4.2 gcc-4.2
-
Textmate 2.0.0-alpha.9317 Adds Support For Removing Trailing Spaces in Document / Selection
更新摘要:
2012-09-29 (r9317)
New semantic class: callback.document.will-save. This can be used to have a command called prior to saving a document, the command could e.g. strip trailing whitespace or ensure the document has a LF character on last line. Two minor issues is that selection is currently lost after running a “did save” command (when it replaces entire document) and caret is scrolled into the visible area.相关 bundle 设置:
-
Lion 升级至 Mountain Lion,导入 Lion 用户数据后可能会出现的问题
- Mail 中的 RSS 订阅会丢失(解决方案)
- Mail 中的 Rules 会丢失
- Xcode 需要升级
- Xcode 中的 Command Line Tools 、 iOS 5.0 Simulator 需要重新安装
- FaceTime 需要重新激活
- homebrew 需要在安装完 Command Line Tools 之后升级
- s3cmd 需要重新安装
- Dropbox 需要升级
- Keychain Access 需要整理
- Font Book 中的自定义字体会全部 disabled,需要重新启用
- 部分网络连接要在设置中重新设置,以记住密码
-
如何在 Mountain Lion 导出之前 Mail.app 中的 RSS 订阅
cd ~/Library/Mail/V2/RSS/ find . -name "Info.plist" -exec grep -A 1 Feed {} \; | grep string | sed 's/^[^>]*>//' | sed 's/]*>$//'
-
让 Mac OS X 上的 Mail 总是自动添加 Reply-To 的方法
- 打开 Terminal
- 输入
defaults read com.apple.mail UserHeaders
,回车 - 显示有
The domain/default pair of (com.apple.mail, UserHeaders) does not exist
- 输入
defaults write com.apple.mail UserHeaders '{"Reply-To" = "reply-to@address"; }'
- 禁用此功能
defaults delete com.apple.mail UserHeaders
注意:此设置会忽略 GUI 中的 Reply-To 设置
-
Install s3cmd beta / alpha on OS X
Beta released: 1.1.0-beta2, now supports invalidation
sudo python setup.py install --record install.log
[10:46:27]humanerrorprocessor@hep: /Users/humanerrorprocessor/Git/s3cmd$ sudo python setup.py install Password: Using xml.etree.ElementTree for XML processing running install running build running build_py creating build creating build/lib creating build/lib/S3 copying S3/__init__.py -> build/lib/S3 copying S3/AccessLog.py -> build/lib/S3 copying S3/ACL.py -> build/lib/S3 copying S3/BidirMap.py -> build/lib/S3 copying S3/CloudFront.py -> build/lib/S3 copying S3/Config.py -> build/lib/S3 copying S3/ConnMan.py -> build/lib/S3 copying S3/Exceptions.py -> build/lib/S3 copying S3/FileDict.py -> build/lib/S3 copying S3/FileLists.py -> build/lib/S3 copying S3/HashCache.py -> build/lib/S3 copying S3/MultiPart.py -> build/lib/S3 copying S3/PkgInfo.py -> build/lib/S3 copying S3/Progress.py -> build/lib/S3 copying S3/S3.py -> build/lib/S3 copying S3/S3Uri.py -> build/lib/S3 copying S3/SimpleDB.py -> build/lib/S3 copying S3/SortedDict.py -> build/lib/S3 copying S3/Utils.py -> build/lib/S3 running build_scripts creating build/scripts-2.7 copying and adjusting s3cmd -> build/scripts-2.7 changing mode of build/scripts-2.7/s3cmd from 644 to 755 running install_lib creating /Library/Python/2.7/site-packages/S3 copying build/lib/S3/__init__.py -> /Library/Python/2.7/site-packages/S3 copying build/lib/S3/AccessLog.py -> /Library/Python/2.7/site-packages/S3 copying build/lib/S3/ACL.py -> /Library/Python/2.7/site-packages/S3 copying build/lib/S3/BidirMap.py -> /Library/Python/2.7/site-packages/S3 copying build/lib/S3/CloudFront.py -> /Library/Python/2.7/site-packages/S3 copying build/lib/S3/Config.py -> /Library/Python/2.7/site-packages/S3 copying build/lib/S3/ConnMan.py -> /Library/Python/2.7/site-packages/S3 copying build/lib/S3/Exceptions.py -> /Library/Python/2.7/site-packages/S3 copying build/lib/S3/FileDict.py -> /Library/Python/2.7/site-packages/S3 copying build/lib/S3/FileLists.py -> /Library/Python/2.7/site-packages/S3 copying build/lib/S3/HashCache.py -> /Library/Python/2.7/site-packages/S3 copying build/lib/S3/MultiPart.py -> /Library/Python/2.7/site-packages/S3 copying build/lib/S3/PkgInfo.py -> /Library/Python/2.7/site-packages/S3 copying build/lib/S3/Progress.py -> /Library/Python/2.7/site-packages/S3 copying build/lib/S3/S3.py -> /Library/Python/2.7/site-packages/S3 copying build/lib/S3/S3Uri.py -> /Library/Python/2.7/site-packages/S3 copying build/lib/S3/SimpleDB.py -> /Library/Python/2.7/site-packages/S3 copying build/lib/S3/SortedDict.py -> /Library/Python/2.7/site-packages/S3 copying build/lib/S3/Utils.py -> /Library/Python/2.7/site-packages/S3 byte-compiling /Library/Python/2.7/site-packages/S3/__init__.py to __init__.pyc byte-compiling /Library/Python/2.7/site-packages/S3/AccessLog.py to AccessLog.pyc byte-compiling /Library/Python/2.7/site-packages/S3/ACL.py to ACL.pyc byte-compiling /Library/Python/2.7/site-packages/S3/BidirMap.py to BidirMap.pyc byte-compiling /Library/Python/2.7/site-packages/S3/CloudFront.py to CloudFront.pyc byte-compiling /Library/Python/2.7/site-packages/S3/Config.py to Config.pyc byte-compiling /Library/Python/2.7/site-packages/S3/ConnMan.py to ConnMan.pyc byte-compiling /Library/Python/2.7/site-packages/S3/Exceptions.py to Exceptions.pyc byte-compiling /Library/Python/2.7/site-packages/S3/FileDict.py to FileDict.pyc byte-compiling /Library/Python/2.7/site-packages/S3/FileLists.py to FileLists.pyc byte-compiling /Library/Python/2.7/site-packages/S3/HashCache.py to HashCache.pyc byte-compiling /Library/Python/2.7/site-packages/S3/MultiPart.py to MultiPart.pyc byte-compiling /Library/Python/2.7/site-packages/S3/PkgInfo.py to PkgInfo.pyc byte-compiling /Library/Python/2.7/site-packages/S3/Progress.py to Progress.pyc byte-compiling /Library/Python/2.7/site-packages/S3/S3.py to S3.pyc byte-compiling /Library/Python/2.7/site-packages/S3/S3Uri.py to S3Uri.pyc byte-compiling /Library/Python/2.7/site-packages/S3/SimpleDB.py to SimpleDB.pyc byte-compiling /Library/Python/2.7/site-packages/S3/SortedDict.py to SortedDict.pyc byte-compiling /Library/Python/2.7/site-packages/S3/Utils.py to Utils.pyc running install_scripts copying build/scripts-2.7/s3cmd -> /usr/local/bin changing mode of /usr/local/bin/s3cmd to 755 running install_data creating /System/Library/Frameworks/Python.framework/Versions/2.7/share creating /System/Library/Frameworks/Python.framework/Versions/2.7/share/doc creating /System/Library/Frameworks/Python.framework/Versions/2.7/share/doc/packages creating /System/Library/Frameworks/Python.framework/Versions/2.7/share/doc/packages/s3cmd copying README -> /System/Library/Frameworks/Python.framework/Versions/2.7/share/doc/packages/s3cmd copying INSTALL -> /System/Library/Frameworks/Python.framework/Versions/2.7/share/doc/packages/s3cmd copying NEWS -> /System/Library/Frameworks/Python.framework/Versions/2.7/share/doc/packages/s3cmd creating /System/Library/Frameworks/Python.framework/Versions/2.7/share/man creating /System/Library/Frameworks/Python.framework/Versions/2.7/share/man/man1 copying s3cmd.1 -> /System/Library/Frameworks/Python.framework/Versions/2.7/share/man/man1 running install_egg_info Writing /Library/Python/2.7/site-packages/s3cmd-1.5.0_alpha3-py2.7.egg-info
Setup
s3cmd –configure
Usage
s3cmd sync -rP --guess-mime-type --delete-removed --no-preserve --cf-invalidate --exclude '.DS_Store' /path-to-files/ s3://bucket/
Post Update
Now you can use
brew
to install beta or alpha version:brew install s3cmd --devel brew install s3cmd --HEAD
-
WordPress 在 localhost MAMP 执行时出现 500 错误的解决方案
去
/Applications/MAMP/logs/php_error.log
下看错误,如果是:PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate x bytes) in /path/to/file on line n
那么就去
/Applications/MAMP/bin/php/php5.3.6/conf/php.ini
里把memory_limit
改为64M
或更大即可 -
OS X 下一个比较隐蔽的缓存目录
/private/var/folders/tz/95z2f6rx1zb1j04zxb0sh1040000gn/C
-
更新 Homebrew 时出现 Error: Failed while executing git pull origin refs/heads/master:refs/remotes/origin/master 的解决方案
病情:
error@cox:/Users/mom$ brew update remote: Counting objects: 2482, done. remote: Compressing objects: 100% (750/750), done. remote: Total 2105 (delta 1543), reused 1822 (delta 1349) Receiving objects: 100% (2105/2105), 329.33 KiB | 122 KiB/s, done. Resolving deltas: 100% (1543/1543), completed with 295 local objects. From https://github.com/mxcl/homebrew f884112..28f7e01 master -> origin/master error: The following untracked working tree files would be overwritten by merge: Library/Formula/autojump.rb Please move or remove them before you can merge. Updating f884112..28f7e01 Aborting Error: Failed while executing git pull origin refs/heads/master:refs/remotes/origin/master
解决方法:
cd `brew --prefix` git clean -n # Does a dry run---shows what will get nuked without touching anything git clean -f # This will destroy files
-
如何打开被 Xcode 优化过的 png 图片
被 Xcode 优化过的图片大部分程序是无法打开的,如果想查看这类图片,需要:
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/pngcrush -revert-iphone-optimizations -q input.png output.png
-
OS X 登录界面语言修改
sudo "/System/Library/CoreServices/Language Chooser.app/Contents/MacOS/Language Chooser"
-
OS X 上如何将图片文件编码为 Base64 格式
openssl base64 -in input.png -out output.txt
相反的
openssl base64 -d -in input.txt -out input.png
-
gettext 在 OS X 安装备忘
[15:01:44]root@vortex:/Users/vortex$ brew install gettext ==> Downloading http://ftpmirror.gnu.org/gettext/gettext-0.18.1.1.tar.gz ######################################################################## 100.0% ==> Downloading patches ######################################################################## 100.0% ######################################################################## 100.0% ==> Patching patching file gettext-tools/configure patching file gettext-tools/Makefile.in ==> ./configure --disable-debug --prefix=/usr/local/Cellar/gettext/0.18.1.1 --without-included-gettext --without-included ==> make ==> make install ==> Caveats This formula is keg-only, so it was not symlinked into /usr/local. OS X provides the BSD gettext library and some software gets confused if both are in the library path. Generally there are no consequences of this for you. If you build your own software and it requires this formula, you'll need to add its lib & include paths to your build variables: LDFLAGS -L/usr/local/Cellar/gettext/0.18.1.1/lib CPPFLAGS -I/usr/local/Cellar/gettext/0.18.1.1/include ==> Summary /usr/local/Cellar/gettext/0.18.1.1: 365 files, 13M, built in 3.1 minutes
[15:08:58]root@vortex:/Users/vortex$ brew link gettext Linking /usr/local/Cellar/gettext/0.18.1.1... 145 symlinks created
-
iChat 聊天泡泡替换
/Applications/iChat.app/Contents/PlugIns/Balloons.transcriptstyle/Contents/Resources/
sudo chown root:wheel BigBubbleGloss.png;sudo chown root:wheel BigBubbleMask.png sudo chmod 644 BigBubbleGloss.png;sudo chmod 644 BigBubbleMask.png
-
iChat Share Screen「共享屏幕」出现绿色花屏的解决方案
把被共享屏幕人的「Automatic graphics switching」选项关掉即可
-
OS X 美化备忘
/System/Library/PrivateFrameworks/CoreUI.framework/Resources /System/Library/CoreServices
- 解压:
./sartfiletool -d SArtFile.bin artfiles
- 压缩:
./sartfiletool artfiles SArtFile.bin SArtFile.new.bin
- 解压:
-
完整删除 Wacom 驱动的方法
选中 Install Pen Tablet.pkg 再选 Show Package Contents,里面有一个 Archive.pax.gz 包,解开后里面就是完整的文件安装结构,去本地磁盘逐个删除对应文件即可
-
删除 Parallels Desktop 6 的残余垃圾
/Library/QuickLook/ParallelsQL.qlgenerator/ /Library/Parallels/ /Library/Spotlight/ParallelsMD.mdimporter/ /Library/Preferences/Parallels/ /Library/LaunchDaemons/com.parallels.desktop.launchdaemon.plist ~/Library/Preferences/Parallels/
虽然 Parallels Desktop 的安装程序中自带卸载程序,但上面这些还是有几率卸不掉的
-
用 LaunchBar 替换掉了 Alfred
界面,功能都要强于 Alfred,制定性和 QS 也有一拼,现在 Macupdate 在打折,不过最近的更新进度不是很快,而且到现在也没上 Mac App Store,先用着再说
如果看了本文你也想试试 LaunchBar,往下看:
- 开机自动运行?需要右键点 Dock 上的图标选择 Open at Login
- 各种索引内容的设置在程序菜单的 Index-Show Index 里
Single Seat License 的限制比较坑爹,具体是:
You may install and use (“RUN”) one copy of the SOFTWARE on a single computer. The primary user of the computer on which the SOFTWARE is installed may make a second copy for his or her exclusive use on a portable computer.
为避免两义性就不翻译了,根据自己的智力理解
-
删除 OS X 下一些奇怪的东西
# 这是 OS X 只要用 Finder 访问就会生成的玩意,先执行一遍,然后再配合 TotalFinder 的 .DS_Store 收集功能,文件夹中就再也不会出现这种文件了
sudo find / -name ".DS_Store" -depth -exec rm {} ;
# 从 Windows 下转移过来的文件的残留物
sudo find / -name "desktop.ini" -depth -exec rm {} ;
sudo find / -name "Thumb.db" -depth -exec rm {} ;
# 由 Samba 和一些虚拟机产生,如果不知道是什么就忽略此条
sudo find /Users/username/Dropbox/ -name "*Zone.Identifier*" -depth -exec rm {} ;
-
如何完整删除 Microsoft Mesenger for Mac
一破 IM 居然是 mpkg 包,mpkg 包吧竟然没 Uninstaller,卸载方法吧竟然我在 Mesenger 开发者 PDF 里才能找到,而且还不全。这是我用 Mac OS X 这两个月来见过最傻逼的 Mac OS X 程序,另外值得一提的是。 Skype for Mac 和此软件有一拼
#!/bin/bash rm /Applications/Microsoft Messenger.app rm ~/Library/Preferences/com.microsoft.autoupdate2.plist rm ~/Library/Preferences/com.microsoft.error_reporting.plist rm ~/Library/Preferences/com.microsoft.Messenger.plist rm -rf /Library/Application Support/Microsoft rm -rf ~/Library/Preferences/Microsoft rm -rf ~/Library/Caches/com.microsoft.Messenger rm -rf ~/Documents/Microsoft\ User\ Data