Category: Uncategorized

  • shell_exec silent error

    This is likely a common error yet might be hard to detect. If you run shell_exec(), make sure to use the full path to the binary file. It might be obvious but many for convenience does not do so, including myself at times. You forget that .bashrc does these for you while running PHP script…

  • Wget/cURL – Pretend to be a real browser

    wget -d -S –referer=”http://…” –user-agent=”Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13″ –header=”Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8″ –header=”Accept-Language: en-US,id-ID;q=0.8,id;q=0.6,en;q=0.4″ –header=”Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3″ –header=”Keep-Alive: 300″ –header=”Connection: keep-alive” –load-cookies cookie.txt –save-cookies cookie.txt –keep-session-cookies “http://…” curl -v -L –referer “http://…” –user-agent “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_7) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.68 Safari/534.24” –header “Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5” –header…

  • Firefox 4 – AJAX JavaScript Execution

    Upgraded to Firefox 4, it’s alright, may feel a bit faster (advertised placebo?). It looks a lot like Safari. I guess there is a convergence of best practices going on. Anyway, here is the point of this post: – Firefox 3: innerHTML will execute any JavaScript code inside it (normally loading via AJAX). Other browsers…

  • Investing lessons from a market sell-off

    As a beginner in stock investing, I’ve learned some basic lessons, hopefully not too painful to shun stocks all together. They sound very simple but are not easy for amateur investors to avoid. So you would need to be constantly reminded. In your portfolio, there will be stocks that are going up/down since you bought…

  • Demand from a Natural Disaster

    With the strong 8.9 quake just happened in Japan and living in California, I would have to think really hard about what happens before, during and after a natural disaster, more specific, a quake. Let’s imagine what people and businesses would have to deal with and who can benefit from the increased demand. I’ll be…

  • Recommended software

    Some software I cannot live without: – Keepass (Mac/PC) – TrueCrypt (Mac/PC) – Terminal (Mac), Putty (PC) – ExFAT (for read/write an external HDD for both PC+Mac

  • Security camera

    Here is a wonderful combination: an IP camera (SharX, LTS, YCam), FTP server (VSFTPD), online image browser (http://minishowcase.net/). You don’t have to install fancy tools, just go online, browse the archive images when you receive a motion detection email alert from the camera. Gotta love technology

  • Bandwidth cost for EC2/cloud computing

    Cloud computing often advertises on the per hour instance cost (like 10 cents per hour). Cheap right? Not necessarily. There are many additional charges (bandwidth, IO, etc. etc.) that can become much much more expensive than the cost of running the instance. Any wise company that want to invest their time in any cloud must…

  • Auto Scaling

    The idea is really cool and cost efficient. However, actual implementation is not easy as it should be. There are vendors trying to bridge the gap and I believe it will be much easier in the future. Problem at 2AM For many services, usage fluctuates during any day (and also week). For example, we see…

  • MOD files import into iMovies for Panasonic SDR-H18

    This little trick is for iMovies to import MOD files automatically. Create this folder and copy MOD files to it: D:\MP_ROOT\101PNV01