2009-02-27, Fri

Apache page load delay on Windows Vista

When I load pages off my local Apache server in Window Vista, there seems to be a 1-2 sec delay before the browser starts receiving and rendering the page. It is pretty slow considering the fact that it is a local request.

Apparently it has something to do with Windows Vista doing an IPv6 lookup on localhost each time a page is requested. Here’s how I fixed it.

Load up C:\Windows\system32\drivers\etc\hosts in a text editor
Your host file will look something like this

      127.0.0.1    localhost
       ::1          localhost

All you need to do is comment out the “::1 localhost” line

      127.0.0.1    localhost
      # ::1          localhost

Save the file. This should solve the delay issue.

Thanks to the brilliant guys at apachelounge.

Isaac Su

tags: apache bug delay hosts ipv6 localhost problem slow vista windows

Comment

---

2009-02-23, Mon

Faster Blackberry Battery Changeover

Blackberry phones are known to have very long start-up times. This is especially inconvenient when you’re wanting to swap over to a second battery, or swap a SIM card in a Blackberry phone. Here’s how you can save some time.

  1. Have a Blackberry/USB charger and the appropriate power source handy.
  2. Power off the device by pressing and holding on the power button, or selecting the “Turn Power Off” item from the home menu.
  3. Connect the Blackberry to the charger. You should see the charging indicator come on.
  4. Swap the battery or SIM card.
  5. This saves the need for a cold start-up on the phone.

Thanks to powerwind841117 from Blackberryforums.com.au

Isaac Su

tags: blackberry charger phone sim-card start-up tip

Comment

---

2009-02-12, Thu

build-essentials equivalent on Fedora

Before compiling anything from source on Ubuntu, the build-essentials metapackaged is installed by typing

   sudo apt-get install build-essentials

On Fedora, the equivalent package is the package group “Development Tools”. This can be installed by typing

   sudo yum groupinstall "Development Tools"
Isaac Su

tags: build-essentials fedora rpm ubuntu yum

Comment

---

2009-02-04, Wed

High CPU usage in phpDesigner 2008

When opening big PHP projects in phpDesigner 2008, the CPU usage of the phpDesigner process gets stuck at 45-50% on my Core 2 Duo.

This is accompanied by the word “Parsing…” in the status bar at the bottom of the application window next to the project name. What’s actually happening is that phpDesigner is trying to parse all the files in your project, including any binary files (GIF, JPEG, PNG, etc.).

The way to fix it is to exclude file types from the project parser.

  1. Project -> Project Manager
  2. Select your project and click Edit
  3. Select the Fliters tab

Filter pattern determines the type of files that get included or excluded.
Kind determines the whether the filter operation affects the Project, the Parser or Both.

Here’s a sample of the filters I applied to my project which solved the high CPU usage problem:

  Exclude Files
      *.gif    Parser
      *.jpg    Parser
      *.js     Parser
      *.css    Parser
      *.log    Parser

After you’re done, click OK. Close the project and re-open it. The “Parsing…” message should come up for a short while before disappearing. If the “Parsing…” message persists, you’ve probably left out some files from the “Exclude files” list (e.g. *.exe, *.bmp, *.pdf, etc.).

Isaac Su

tags: cpu filter help high parsing phpdesginer problem project solution tip usage

Comment [2]

---

2009-02-03, Tue

Capture a screenshot on the Apple iPhone 3G

I was fiddling around with a friend’s iPhone 3G, looking for undocumented functions and features (it’s a pastime of mine).

I found out that if you press and hold the Home button and press the Sleep/Wake button, the screen flashes, and a screen grab (or screenshot) is taken of what’s currently displayed on the iPhone screen.

  1. Press and hold the Home button below the screen.
  2. Press the Sleep/Wake Up button at the top edge of the phone.
  3. Flash!

The screen grabs are stored in the Camera Roll library in the Photos App.

Apparently this only works on version 2.0 firmware and up.

Isaac Su

tags: apple iphone screen-capture screen-grab screenshot tip undocumented

Comment

---

« Older Newer »