Showing posts with label Mac. Show all posts
Showing posts with label Mac. Show all posts

Tuesday, December 25, 2012

Mac shortcut symbols


  Command/Apple Key (like Control on a PC)
Also written as Cmd
  Option (like Alt on a PC)
  Shift
  Control (Control-click = Right-click)
  Tab
  Return
  Enter (on Number Pad)
  Eject
  Escape
  Page Up
  Page Down
  Home
  End
  Arrow Keys
  Delete Left (like Backspace on a PC)
  Delete Right (also called Forward Delete)
reference: http://www.danrodney.com/mac/index.html

Sunday, October 14, 2012

Setup ctags on Mac for Rails development

The original ctags comes with Mac OS may say something like this when you run ctags -R:


$ctags -R
ctags: illegal option -- R
usage: ctags [-BFadtuwvx] [-f tagsfile] file ...

To solve the problem, install a new version and disable the original one:

$ brew install ctags
$ cd /usr/bin/
$ sudo mv ctags ctags.orig

Then $which ctags will give you the new installed ctags in /usr/local/bin/ctags.

Monday, October 8, 2012

Friday, October 5, 2012

Trigger an Automator Application from Thunderbird message filter

Create a message filter, choose "Launch File" as the action:



Select the "document.wflow" in the automator application:



Keywords: Bash, Shell Script, Execute

Mac - Create an automator application to open a terminal and run a script

Create a new Automator Application.



Drag "Run AppleScript" to workspace.



Edit the script to launch the terminal and run another script:




Friday, September 14, 2012

Clean setup ruby ree on Mountain Lion

http://blog.teamtreehouse.com/installing-ruby-rails-and-mysql-on-os-x-lion

http://ryanbigg.com/2011/06/mac-os-x-ruby-rvm-rails-and-you/

http://coderwall.com/p/fywjrw

xcode - app store
(need to install after download completed: open xcode in application, ...)
xocde - go to preference -> download -> command line tools
(try $gcc -v to ensure it works.)

Install the followings using su login:
homebrew - http://mxcl.github.com/homebrew/

gcc (non-LLVM) -
brew tap homebrew/dupes
brew install apple-gcc42

xquartz - apple's X11
http://xquartz.macosforge.org/landing/

git - brew install git

Install the followings using local login:
rvm - $ curl -L https://get.rvm.io | bash -s stable --ruby

CPPFLAGS=-I/opt/X11/include CC=/usr/local/bin/gcc-4.2 rvm install --force ree

Install the followings using su login:
postgresql - brew install postgresql

or
mysql - brew install mysql