Posts

Showing posts with the label mac os x

Replace ^M in VI

Sometime , you found ^M when you open a file in VIM This is gonna help you get through it. In VIM 1. Press colon (:) , prepare to input command 2. Use command    :%s/ (press ctrl-v, then ctrl-m) ===> you get :%s/^M    then     :%s/^M/\n\r/ , then enter finally, everything should be ok :)

Enable color for terminal ( iterm included )

refer to http://blog.imzaid.com/color-terminal-bash-on-the-mac-iterm-included :) tested with osx, not sure on linux

Setup wget for mac/linux

For mac 1. download wget.xxx.tar.gz from official web. 2. unpack it. 3. run ./configure 4. sudo make install ref to http://www.thelinuxblog.com/linux-man-pages/1/wget

TIP for setup psycopg2 for mac/linux

If something like 'cannot find pg_config' , we should add /path/to/postgres/x.x/bin to PATH environment. That's all for this post.

Revise linux screen (knowledge)

Linux screen is useful! :) Enter to scroll/copy mode. >> Ctrl - a - [  Begin and end copy text >> press space bar to begin copy then space bar to end copy Paste copied text >> Ctrl - a - [ ref : http://www.samsarin.com/blog/2007/03/11/gnu-screen-working-with-the-scrollback-buffer/ (thank to samsarin)

Prepare for python development on Mac

Here's instruction 1. Get the dmg file of python from www.python.org, then install it. 2. Get the dmg file of setuptool from pypi, then install it. 3. Follow step from http://blog.praveengollakota.com/47430655 (very thank to praveen)

Uninstall Xcode

After google and other mac information web, I get sudo /Developer/Library/uninstall-devtools –mode=all

use python 32 bit in mac show leopard :)

# Prefer 32-bit execution for Python 2.6.1 on Snow Leopard $ defaults write com.apple.versioner.python Prefer- 32 -Bit -bool yes for unset >>> -bool no thk Jaharmi (http://www.jaharmi.com/2009/08/29/python_32_bit_execution_on_snow_leopard)

Hail My New Machine

microsoft messenger has build a slowly speed by take a big cpu usage!!! damn