James Agawa Blog

July 9, 2010

Some of the things I learned on Debugging

Filed under: Uncategorized — jameslouie1234 @ 9:51 am
  1. Be sure what the bug really is
  2. What are the parameters
  3. Can you pin point that on the code
  4. Is it working on other platform or environment
  5. Did you clear the cache
  6. Can you identify the keywords for your problem so you can ask google
  7. What did google say when you told him your problem

July 7, 2010

Disregarding a commit on a branch – GIT

Filed under: GIT — jameslouie1234 @ 3:59 am

If you want to disregard a commit you made in GIT and want to go back to a particular commit, you can do this:

git reset --hard 8b58be52b834b0406283280e6a07076302d45d9c

8b58be52b834b0406283280e6a07076302d45d9c is the commit you want to get into and not your last commit

but hold on, you might want to keep the changes on file, and just disregard the commit, then you can do this:

git reset --soft 8b58be52b834b0406283280e6a07076302d45d9c

May 14, 2010

Windows Quick Installation of PEAR

Filed under: PHP — jameslouie1234 @ 7:25 am

This apply if you already have php installed in your machine (I am using Windows 7 but this will work for Vista and XP):

  1. Go to your php folder and look for the file go-pear.bat
  2. double click go-pear.bat and it will show a command prompt
  3. you will be asked if PEAR to be installed system-wide or local (I prefer system so I type system and press enter, if you want local just type local and hit enter)
  4. you will be presented with option to change the file layout of the new PEAR installation, if don’t understand it just hit enter again (hahaha)
  5. It will install the PEAR files and after will ask you if you like to alter php.ini, just enter Y and press enter
  6. Just continue to press enter till it closed the window
  7. on the same location where you find the go-pear.bat, there is a newly created file PEAR_ENV.reg, just double click it and choose Yes
  8. Try if it works, open command prompt (press (Windows Logo + R) –> type (cmd) –> press (EnterKey) ) then type “pear -V” and there you go 🙂

Oh if you see this error after number 8: “PHP_PEAR_PHP_BIN is not set correctly.”, please do the following:

  1. Go to System Properties (shortcut Windows Logo + Break)
    If you are using Windows 7, you need to click  “Advanced system settings”
  2. Select the Advance tab
  3. click the “Environment Variables…” button
  4. look for “PHP_PEAR_PHP_BIN” and double click it to edit
  5. change the Variable Value from .\php.exe to the absolute path of your php.exe (something like C:\php5\php.exe)
  6. Click OK
  7. Click another OK then try number 8 of the previous list again

May 5, 2010

How to view untracked files in Git

Filed under: GIT — jameslouie1234 @ 6:28 am

To view all files that are not added or tracked in git, you can type this on your console

git status

and this will give you a list of untracked files and also modified files

Create a free website or blog at WordPress.com.