20 12 / 2011

Open file in NetBeans from Mac Terminal

alias nb='/Applications/NetBeans/NetBeans\ 7.0.1.app/Contents/MacOS/netbeans --open'

Insert above code to ~/.profile
You can open file from terminal with nb index.php

Tags:

Permalink 19 notes

19 12 / 2011

Syntax Highlighting for Mac Vi

Run

sudo vi /usr/share/vim/vimrc

Insert..
syntax on "turns on highlighting
set ai "turns on auto indent
set nu "turns on line numbers

I am not setting syntax on and set nu as auto in the rc file.
Perfer to turn them on as needed.

19 12 / 2011

Open Terminal from Finder

Settings -> Keyboard -> Services -> New Terminal at Folder

(restart Finder with killall Finder if it doesn’t work)

Tags:

Permalink 12 notes

13 12 / 2011

Installing Windows 7 with Virtual Box in Mac OS X Lion

Here I’m trying to run Windows 7 with Virtual Box on my Mac.

Normal installation works fine,

  1. Creating the drives,
  2. Installing the OS

Well, problem came when I tried to share folders with my Mac.

Have to install Virtual Box Guest addition add on to do that.

Well, nothing happens when I clicked “Install Guest Additions…” under Devices of VB menu. (You have to be running your Windows).


Turns out for some unknown reasons, its has downloaded the ISO file but not mounted automatically. 

Solution: Mount and run the ISO yourself with Windows 7 explorer.
My case, VBoxWindowssAdditions-x86

source: https://forums.virtualbox.org/viewtopic.php?f=6&t=45771

08 12 / 2011

Installing xdebug with XAMPP on Mac

Follow instructions from http://xdebug.org/find-binary.php to get the correct version of xdebug.

However, compile it with 32bit else you will find yourself trapped with wrong architecture error.

./configure --enable-xdebug --with-php-config=/Applications/XAMPP/xamppfiles/bin/php-config
 CFLAGS="-arch i386 $CFLAGS" CCFLAGS="-arch i386 $CCFLAGS"
 CXXFLAGS="-arch i386 $CXXFLAGS" LDFLAGS="-arch i386 $LDFLAGS"

source: http://blog.laaz.org/tech/2010/08/27/xdebug-with-xampp-on-mac-os-x/

Tags:

Permalink 2 notes

02 12 / 2011

Install swftools Mac / Linux

Mac

Use Macports to install on Mac
However, use
sudo port install foo configure.compiler=llvm-gcc-4.2
to install if you’re on lion os.
Check out the problemhotlist if you still encounter problems.
source: https://trac.macports.org/wiki/ProblemHotlist


Linux

source: http://www.betaquest.com/2010/08/how-to-install-swftools-0-9-1-on-centos-5-5/
Follow the steps and pray that it works.

01 12 / 2011

Listing all installed packages in Mac

source: http://forums.macrumors.com/showthread.php?t=817008

pkgutil --pkgs

Tags:

Permalink 2 notes

15 11 / 2011

My new .profile

My new .profile
The previous post on .profile has errors cause the formatting ran.

#the prompt
#export PS1="\u@\h\w--\d--\t$"
alias gitbs="git branch | grep '^* ' | awk '{print \$2}'"
alias gitprompt="git status -s 2>/dev/null >&2 && echo \"(\`gitbs\`) \""
colorblue="\[\033[0;34m\]"
colorred="\[\033[0;31m\]"
endcolor="\[\033[m\]"
PS1="${colorblue}$PS1${colorred}\`gitprompt\`${colorblue}\d \t>${endcolor}"

#the path
PATH=$PATH:/Applications/XAMPP/xamppfiles/bin/

alias ki='open -a "Komodo Edit"'

#change default directory
cd -P Desktop/htdocs

#enable colors
export CLICOLOR=1

14 11 / 2011

Some Useful apps for mac

  • Paragon NTFS reader
  • Stuffit
  • Adium
  • Sizeup
  • AppCleaner
  • TotalFinder

10 11 / 2011