Tag Archives: macOS

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,需要重新启用
  • 部分网络连接要在设置中重新设置,以记住密码

让 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