Wednesday, March 17, 2010

linux/*nix bash 4.x autocd ..

for those who dont know about latest features in bash 4.x :

sometime you know the folder name but to reach to that folder you need to go from one to another.

eg: /home/project/web/avs/desktop

with bash new autocd you can simply type

cd /home/**/desktop

the double '*' character indicate 'autocd'

same thing when you are frustrated with php, you can simply do:

rm -f /**/*.php

ok, first you must enable the autocd by using the following command:

shopt -s globstar autocd

happy "bash"ing :)

Monday, March 8, 2010

python psycopg2 in imac

I been banging my head making psycopg2 running on this imac with this error trying importing the module:

Symbol not found: _PQbackendPID

after googling around (almost 1 hour exactly), one important thing is about the multi architecture python supported, for this reason u need to specified for python u r using 32 bit with following command:

defaults write Prefer-32-Bit -bool yes

Build and install your psycopg2 again . And voila, everything works.

Mac OS X if very yummy, but coming from linux/ubuntu world where packages are easily available and almost up to date, this is a little frustration for me.

Oh well, I already fell in love with iMac (been using it for 3 days already :P ), this will be just like the old days for me with linux, where you must do things your self, compile, problem and trouble shoot your self. Things like this will make you bolder.... i mean wiser.

- Mac g33k