Sunday, July 25, 2010

Remapping keyboard keys in Mac OSX

Use KeyRemap4MacBook to remap keys on your OSX keyboard.

Snow Leopard Only:

It'll enable "FN + Numpad" by default. What I would really like is a way to do "Left/Up/Down/Right" without using the arrow cursor which forces my hand to shift down the keyboard too much. The utility provides a "Vi Mode" where you can map "FN + hjkl" for Left/Up/Down/Right.

To change CapsLock to Escape you need to download another utility from the website.

Snow Leopard Only:

Tunnel Firefox connections through a server

Use openSSH to open up SOCK5 tunneling to server

Configure network connection in Firefox to use manual proxy. Leave everything blank except

SOCKS Hosts: localhost Port: PORT_NO

Wednesday, July 21, 2010

Controling a Mac OSX using VNC

From "System Preferences > Sharing > Screen Sharing", click "Computer Options" and set password and voila!


Tuesday, July 20, 2010

Using curl to post data to a rails app

curl -X POST -d "location[lat]=111&location[lng]=222" http://localhost:3000/users/123/devices/456/locations

However rails require authenticity token. To overcome that just turn forgery protection off.

# config/environment.rb
config.action_controller.allow_forgery_protection = false

Monday, July 12, 2010

Print screen in Mac OSX


- Hold down Apple key ⌘ + Shift + 3 and release all
- Mouse click on screen

Portion of screen:

- Hold down Apple key ⌘ + Shift + 4 and release all key
- Drag mouse to select portion of screen to capture