Author: admin

  • I hate iPhotos

    When I got my first Mac, which is the alum MacBook, I got really excited on using iPhotos and imported nearly 10,000 photos from different collections. The default setting is to use a single library file to manage everything. Importing is very simple and that’s why it’s deadly. Now the problems I have with iPhotos:…

  • Vietnamese Vegetables

    I just started gardening two years ago and it’s been so much fun. I’m trying to grow more food that my family eat, which are Vietnamese dishes. Being in California makes it a bit easier, although it could be cold for some of these tender plants. These are some vegetable plants eaten in popular Vietnamese…

  • rrdtool and No font found

    Recently we did an upgrade to CentOS 5.3 and rrdtool stopped working, specifically, rrdgraph. The reason is that there is no font installed in the system (not sure why, you can check it via “fc-list”). To fix this, do an “yum install xorg-x11-fonts-Type1” and make sure you see some fonts listed in “fc-list”. Also assume…

  • apf vs. newly assigned IP address

    If you try to ping/traceroute and got this message, there are several places to look. First, disable the firewall and if it works again then you know it’s the firewall. In this case, APF. An call to “iptables -L -n” might be able to narrow down the root cause. PING 173.x.x.x 56(84) bytes of data.…

  • Will WolframAlpha make the lazy lazier?

    WolframAlpha is launching right now. I just tried a few and see the cheat sheet. The interface is nice and the results were presented beautifully and logically. I’ll definitely use it for its designed purposes and Yahoo for the rest of search queries. If this type of computational search engine were widely available like it…

  • How to make a cheap tomato cage

    You can buy the small and flimsy one at the store. Walmart, HomeDepot all has 42″ tall for $2. The strong one are selling online for about $20. Or you can make a super strong one for about $4 each. What I got is a wire mesh from Home Depot. $7.65 makes 2 cages that…

  • Getting started with EC2 tutorial

    I just start playing with EC2 today and these are some useful notes and observation. The small standard instance is quite slow, only scores 50 under Unixbench-WHT. Our quads E5405 are around 410+, Q9550 is at 650-750. I also was confused about S3 versus EBS. The console management makes life much easier, but could be…

  • Brother 5440CN Control Center in Mac OSX

    If you turned off Control Center from starting up at boot, you can find it again in this folder. It took me a while trying to find it under Spotlight, /Applications without luck. /Library/Printers/Brother/Utilities/

  • Adaptec RAID under CentOS

    Download the Storage Manager RPM for your card model and architecture from their site http://www.adaptec.com/en-US/support/raid/ If you run /usr/StorMan/arcconf and get this error: ./arcconf: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory Do this export LD_PRELOAD=/usr/StorMan/libstdc++.so.5 root@r StorMan]# ./arcconf | UCLI | Adaptec uniform command line interface…

  • Compact JS code using PHP

    This is a simple function to minimize JS code, it’s very simple and probably fail with more complex cases. But hey, might be useful for someone for something! We would suggest using JSMin::minify() instead. /** compact JS code */ function compactJS($pContent) { $pContent = str_replace(“\r\n”,”\n”,$pContent); $pContent = preg_replace(“/^\/\/.*/”,”,$pContent); // begining w/ // $pContent = preg_replace(“/[^:]\/\/.*/”,”,$pContent);…