Redirect IP address to localhost in os x

July 20, 2009

Use this command to redirect ip address to localhost in os x. Not sure if it will work in other os. ifconfig lo0 alias 10.0.0.1 will redirect 10.0.0.1 to the localhost / loopback adapter ifconfig lo0 -alias 10.0.0.1 will remove it

NSLog replacement

June 19, 2009

copied from http://iphoneincubator.com/blog/debugging/the-evolution-of-a-replacement-for-nslog basically just put these code into your precompiled header file: you might need to add this flags to the project: OTHER_CFLAGS = -DDEBUG GCC_PREFIX_HEADER = YourProject_Prefix.pch # this is needed especially for static library

OS X Leopard DNS performance problem – enabling local name server

October 12, 2008

Lately I have been having problem with slow DNS lookup while browsing. You can see it when I browse, it took some time in the “looking up for youtube.com …” for example. I googled around and tried several solutions as suggested by others. Using Open DNS (208.67.222.222, 208.67.220.220) and verizon? (4.2.2.1, 4.2.2.2, 4.2.2.3) as my […]

Mercurial tips & tricks for mac

July 28, 2008

I am collecting several useful mercurial tricks for me : – See diffs when committing in vim see : http://www.selenic.com/mercurial/wiki/index.cgi/DiffsInCommitMessageInVIM but instead of using the instruction as is, I have to modify the string a little bit to work in my mac: what I did is replacing : $EDITOR “$HGTMP/msg” “$HGTMP/diff” || exit $? with […]

Reminder to self. Never set the permission of the /

July 24, 2008

In a lapse of judgment, I set my hard drive permission to disable readonly for all user, except myself & admin (Using hard drive get info – sharing & permission ). The reasoning was because I can see my root when I enable wireless sharing. It turned out to be a very bad decision though, […]

batch file rename in mac

July 23, 2008

I am missing batch renaming functionality that I used to have in windows -> “ren *.xxx *.xxx.orig” in my macbook. But using utility “mmv”, I finally can do the same in mac & windows. You can download the utility from here : http://www.joel.lopes-da-silva.com/articles/computer-science-technology/62-tips-tricks/79-mmv-under-mac-os-x-leopard-for-mac-intel.html some example usage : http://debaday.debian.net/2007/06/13/mmv-mass-moving-and-renaming-files/ Tags: macmmv linux batch rename

IPhone simulator breakpoints problem

June 12, 2008

Sometimes I got problem settings breakpoints. I found this solution in apple discussions: x As saggymac said: “The default setting for debugging libraries and frameworks is Load Symbols Lazily. On occasion this causes breakpoints to not be hit. Turning off this setting makes it take longer to start debugging, but hits breakpoints more reliably.” may […]

Objective-C simple command line program and compilation

June 4, 2008

I am trying to compile a simple command line for experiment, and it is somehow not as obvious as I thought. Here is a the very simple program I copied somewhere from internet and here is how to compile it : setting “-framework Foundation” is the one that threw me off. I couldn’t find it […]

My os x nginx configuration

June 2, 2008

First, to install nginx do this : sudo port install nginx then use this configuration – this is only for testing, with setting for my os x (for access log / pids). It also use proxy to merb # nginx using macports installation # for my local testing user kusno staff; worker_processes 1; pid /opt/local/var/run/nginx.pid; […]

Perl breakpoint

May 8, 2008

Put : $DB::single=2; to enable breakpoint in the code. Don’t forget to run with -d Tags: perldebug

Older Entries