Disable Chrome’s two-finger back/forward navigation

Page change gesture is a bit annoying to me because I often accidentally change pages when I just wanted to scroll up and down.

Because Google Chrome uses Apple’s default gestures, we can turn it off from System Preferences.

System Preferences > Trackpad > More Gestures > Swipe between pages

If you want to turn it off only on Google Chrome, open the terminal and type

defaults write com.google.Chrome.plist AppleEnableSwipeNavigateWithScrolls -bool FALSE

Haskell Platform with Mac OS X 10.9 (Mavericks)

XCode 5.0 on Mac OS X 10.9 (Mavericks) no longer provides GCC, only clang. According to Haskell Platform for Mac OS X,

Xcode 5 supplies clang as the C compier, and with respect to pre-processing there are some “differences of interpretation” between it and gcc. These differences can affect some Haskell code that uses the CPP extension.

There are two alternatives to solve this problem

  1. Download ghc-clang-wrapper.  Copy this script to /usr/bin, and make sure it is exectuable. Run it sudo.

  2. Install a gcc and direct GHC at that.

I installed Haskell Platform using MacPorts and confirmed that the first method works well. If ghc-clang-wrapper does not find where ghc is installed, you can manually edit /opt/local/lib/ghc-7.6.3/settings by replacing the line

(“C compiler command”, “/opt/local/bin/gcc-mp-4.7”),

with

(“C compiler command”, “/usr/bin/ghc-clang-wrapper”),