<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>Andy Huang</title>
    <link rel="alternate" type="text/html" href="http://www.andyhuang.net/blog/" />
    <link rel="self" type="application/atom+xml" href="http://www.andyhuang.net/blog/atom.xml" />
    <id>tag:www.andyhuang.net,2009-09-05:/blog//2</id>
    <updated>2009-10-26T04:35:31Z</updated>
    
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type Pro 5.0rc3</generator>

<entry>
    <title>Posting to blog from Windows 7</title>
    <link rel="alternate" type="text/html" href="http://www.andyhuang.net/blog/2009/10/posting-to-blog-from-windows-7.html" />
    <id>tag:www.andyhuang.net,2009:/blog//2.41</id>

    <published>2009-10-26T04:25:05Z</published>
    <updated>2009-10-26T04:35:31Z</updated>

    <summary>This is just a test to post something to blog from Windows 7.&#160; Let’s see how butchered Microsoft’s Windows Live Writer will make this post be…&#160; If the image is in wrong directory etc., I’ll have to edit / remove...</summary>
    <author>
        <name>Andy Huang</name>
        <uri>http://www.andyhuang.net/mt/mt-cp.cgi?__mode=view&amp;blog_id=2&amp;id=1</uri>
    </author>
    
    
    <content type="html" xml:lang="en-us" xml:base="http://www.andyhuang.net/blog/">
        <![CDATA[<p>This is just a test to post something to blog from Windows 7.&#160; Let’s see how butchered Microsoft’s Windows Live Writer will make this post be…&#160; If the image is in wrong directory etc., I’ll have to edit / remove them later..</p>  <p>&#160;</p>  <p><a href="http://www.andyhuang.net/blog/WindowsLiveWriter/PostingtoblogfromWindows7_12D22/Windows7.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Windows7" border="0" alt="Windows7" src="http://www.andyhuang.net/blog/WindowsLiveWriter/PostingtoblogfromWindows7_12D22/Windows7_thumb.png" width="244" height="235" /></a></p>  <p>&#160;</p>  <p>Ah well, not too bad, I’m lazy, this will stay for now.</p>]]>
        
    </content>
</entry>

<entry>
    <title>My Snow Leopard Upgrade Experience, and General Impressions</title>
    <link rel="alternate" type="text/html" href="http://www.andyhuang.net/blog/2009/08/my-snow-leopard-upgrade-experi.html" />
    <id>tag:andy.hwang.tw,2009://2.33</id>

    <published>2009-08-31T22:30:26Z</published>
    <updated>2009-12-12T16:41:26Z</updated>

    <summary><![CDATA[Snow Leopard came in the mail today (finally).&nbsp;Thank you Apple, for killing a small tree to deliver me one DVD. Using a box large enough to house at least 16 retail packages to ship 1 single disc to an end...]]></summary>
    <author>
        <name>Andy Huang</name>
        <uri>http://www.andyhuang.net/mt/mt-cp.cgi?__mode=view&amp;blog_id=2&amp;id=1</uri>
    </author>
    
        <category term="Apple" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="General" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Memo" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="OSX" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="1password" label="1Password" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="apple" label="Apple" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="mailapp" label="Mail.app" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="osx" label="OSX" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="quicksilver" label="Quicksilver" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="snowleopard" label="Snow Leopard" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="soundflower" label="Soundflower" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="spaces" label="Spaces" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="systempreferences" label="System Preferences" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="upgrade" label="Upgrade" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="wiretapstudio" label="WireTap Studio" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-us" xml:base="http://www.andyhuang.net/blog/">
        <![CDATA[Snow Leopard came in the mail today (finally).&nbsp;Thank you Apple, for killing a small tree to deliver me one DVD. Using a box large enough to house at least 16 retail packages to ship 1 single disc to an end line consumer is definitely the right choice!! Seriously, if I'm paying you $40 for the rights to kill a tree, I better be the one doing the killing, not you!<div><br /></div><div><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://www.andyhuang.net/blog/assets_c/2009/08/IMG_0101-34.html" onclick="http://www.andyhuang.net/blog/assets_c/2009/08/IMG_0101-34.html','popup','width=1600,height=1200,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://www.andyhuang.net/blog/assets_c/2009/08/IMG_0101-thumb-100x75-34.jpg" alt="IMG_0101.JPG" class="mt-image-none" style="" height="75" width="100" /></a><a href="http://andy.hwang.tw/assets_c/2009/08/IMG_0102-35.html" onclick="window.open('http://andy.hwang.tw/assets_c/2009/08/IMG_0102-35.html','popup','width=1600,height=1200,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://andy.hwang.tw/assets_c/2009/08/IMG_0102-thumb-100x75-35.jpg" alt="IMG_0102.JPG" class="mt-image-none" style="" height="75" width="100" /></a><a href="http://andy.hwang.tw/assets_c/2009/08/IMG_0103-36.html" onclick="window.open('http://andy.hwang.tw/assets_c/2009/08/IMG_0103-36.html','popup','width=1600,height=1200,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://andy.hwang.tw/assets_c/2009/08/IMG_0103-thumb-100x75-36.jpg" alt="IMG_0103.JPG" class="mt-image-none" style="" height="75" width="100" /></a></span></div><div><br /></div><div>The upgrade took just about 1 hour from inserting disc to the green check mark with "Install Succeeded" text... &nbsp;Maybe they could've done it faster, I don't know. But what's important is I am now on Snow Leopard.</div><div><br /></div><div>The upgrade was, unfortunately, not quirk free. &nbsp;Read on for a few problems that I encountered and how I fixed them.</div><div><br /></div>
]]>
        <![CDATA[One of the very first things I noticed is that my "Tap To Click" no longer works... This was an easy fix though. &nbsp;System Preferences &gt; Trackpad, and enable it. &nbsp;But, in the process of attempting to launch System Preferences, I noticed that my Quicksilver no longer works.<div><br /></div><div>Quicksilver required not only an upgrade, but also removal of a few plugins. &nbsp;The plugins I had to remove are:</div><div><ul><li>AirPort Module</li><li>File Tagging Module</li><li>Services Menu Module</li></ul><div>They can be yanked from ~/Library/Application Support/Quicksilver/PlugIns/</div><div><br /></div><div>Slightly annoyed with Quicksilver not working, I had many many many safari windows open to help me search for a solution. &nbsp;And this is when I really started to dig the new expose. &nbsp;The new expose have two things I really enjoy: Application specific expose, allowing you to show all windows of one application, and the nice little blue glow that tells you which one you're highlighting. &nbsp;This enables me to have a much better work flow than the older version.</div><div><br /></div><div>After Quicksilver was fixed, I wanted to listen to some music. &nbsp;It appears that my USB DAC is some how choppy if I plug it in directly w/o sound flower. &nbsp;I do not yet know why, and will need to check it out again. &nbsp;So I tried to launch sound flower, only to find that sound flower was not installed. Attempting to install also gave me some kext error. &nbsp;It was a short lasted problem though, there is a fixed 3rd party package available, google for Snow Leopard Sound flower and you'll be on your way. &nbsp;DAC sounds great after that.</div><div><br /></div><div>I started chatting with some friends, and got quite a pleasant surprise when I tried to change language. &nbsp;The new international (input manager / kotoeri) have a "command + tab" like interface for selecting the language. &nbsp;Very nice, no longer need to stare at menu bar for the tiny icon to change to the right language I want... &nbsp;If you're wondering I work with Romaji (English), Hiragana, Katakana, Pinyin - Chinese Traditional, and Pinyin - Chinese Simplified, so this really helps.</div><div><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://andy.hwang.tw/assets_c/2009/08/Screen shot 2009-08-31 at 16.26.58-43.html" onclick="window.open('http://andy.hwang.tw/assets_c/2009/08/Screen shot 2009-08-31 at 16.26.58-43.html','popup','width=288,height=395,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://andy.hwang.tw/assets_c/2009/08/Screen shot 2009-08-31 at 16.26.58-thumb-100x137-43.png" width="100" height="137" alt="Screen shot 2009-08-31 at 16.26.58.png" class="mt-image-none" style="" /></a></span></div><div><br /></div><div>Other things that doesn't really work for me...</div><div><ul><li>Menu Meters -- Dev says will fix soon</li><li>Insomniax -- Not sure when it will be fixed</li><li>Several apps thinks it is downloaded from the web and need me to approve again, not really a problem, just a pest...</li><li>WireTap Studio required re-activation, that isn't an issue, but when it did re-activate, I lost my recording library... haven't dug the file system to see if the files are actually lost yet though.</li><li>1Password 3 Beta doesn't really work for popup passwords (IE: .htaccess + .htpasswd sets) for me yet... not sure why, but since its beta, its only as expected...</li><li>1Gb = 1024Mb, 1Mb = 1024Kb, 1Kb = 1024b, not 1000. Apple, PLEASE don't be lame and count like harddrive manufactures!!??</li><li>Snow Leopard seems to make the system warmer in general. &nbsp;I'm coasting at 60℃ to 64℃ as opposed to the usual 45℃ to 50℃...</li></ul><div><br /></div><div>Other things that I like but not sure if its new or not...</div><div><ul><li>Spaces changing icon on screen (the one with white box traveling to the space you're going to) seems to look a bit prettier than before?</li><li>System Preference's spotlight some how magically fixed itself (I lost the highlight last week and can't get it back for whatever reason).</li><li>Mail.app's db upgrade was ridiculously quick, even for a 6gb db like my.</li><li>Spaces / Expose's edge of screen feature (throw your mouse to edge of screen to activate feature) no longer have ugly hit zone.</li></ul></div></div></div>]]>
    </content>
</entry>

<entry>
    <title>URL Shortener and Base 62 Encoder / Decoder</title>
    <link rel="alternate" type="text/html" href="http://www.andyhuang.net/blog/2009/08/url-shortener-and-base-62-enco.html" />
    <id>tag:andy.hwang.tw,2009://2.32</id>

    <published>2009-08-05T23:43:03Z</published>
    <updated>2009-08-06T01:33:00Z</updated>

    <summary><![CDATA[I'm creating yet another URL shortener script. &nbsp;Why? &nbsp;Because I'm not keen on over paying for simple scripts -- because, well, I'd be over paying -- and I'm not too keen on using open source scripts -- because the more...]]></summary>
    <author>
        <name>Andy Huang</name>
        <uri>http://www.andyhuang.net/mt/mt-cp.cgi?__mode=view&amp;blog_id=2&amp;id=1</uri>
    </author>
    
        <category term="Memo" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Misc." scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="PHP" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Projects" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="base62" label="Base62" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="bcmath" label="BCMath" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="class" label="Class" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="largeinteger" label="Large Integer" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="math" label="Math" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="php" label="PHP" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="unitconversion" label="Unit Conversion" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-us" xml:base="http://www.andyhuang.net/blog/">
        <![CDATA[I'm creating yet another URL shortener script. &nbsp;Why? &nbsp;Because I'm not keen on over paying for simple scripts -- because, well, I'd be over paying -- and I'm not too keen on using open source scripts -- because the more people using the same script, the more likely people will find exploits in it. &nbsp;So with all that in mind, I set out to create my own script.]]>
        <![CDATA[<div>
<p>One of the main components of URL shortener script is the base 62 encoder / decoder.  Base 62 is just another way of counting, which allows us to pack more numbers into a shorter string.  In base 10, we count: 1,2,3,...,9,10,11, etc. That's good, everyone knows how to count that, but the down side is, it's not very short.  If we do URL shorteners like that, pretty soon, we'll have long URLs because 5 digits will only encompass 99999 links, etc. You might say, hey, 99999 links isn't too bad, but I say why end there?  In base 62, we count like this: 1,2,3,...7,8,9,A,B,C,...,X,Y,Z,a,b,c,...x,y,z,10,11,12, etc.  Notice by the time we got to "10", we're already at 63?  Now, with the same 5 digits, we're looking at 62^5 instead of 10^5 links.</p>

<p>Computers generally don't know how in fancy bases unless you teach it to do so, and teaching MySQL to count like that is way over my head -- hey, cut me some slacks, I'm a PHP guru, not a MySQL guru -- so I'm letting MySQL count in its native auto increment on an unsigned integer. With that, I also get a fancy pool of numbers to work with... Unsigned BIGINT in MySQL goes up to 18446744073709551615 to be exact.  That's eighteen quintillion, four hundred and forty six quadrillion, seven hundred and seventy four trillion, seventy three billion, seven hundred and nine million, five hundred and fifty one thousand, and six hundred and fifteen.  Or in short: quite-a-mouth-full (see, wasn't that easier?).</p>

<p>Now, we obviously don't expect to house that much links in the URL shortener database, but its always fun for a small challenge.  PHP can't count that much in integers (default int size is 4 bytes, and we'd need around 8 to 9 bytes to match that), and floats aren't that accurate when we're doing math (decimal precision issues), so we'll obviously need something better.</p>

<p>In comes BCMath Arbitrary Precision Mathematics.  BCMath allows us to work with arbitrary large numbers with arbitrary precision through some nifty <span class="del">black magic</span> API function calls. So anyways, after a few minutes of tinkering and editing, I present you a quick and simple base62 class for you to use in your application!</p>

<div class="code_container">
<div class="code_header">PHP Code</div>
<div class="code_body">
<pre>&lt;?php
/**
 * Base 62 Encoder / Decoder Class
 * (c) Andy Huang, 2009; All rights reserved
 *
 * This code is not distributed under any specific license, 
 * as I do not believe in them, but it is distributed under
 * these terms outlined below:
 * - You may use these code as part of your application, even if it is a commercial product
 * - You may modify these code to suite your application, even if it is a commercial product
 * - You may sell your commercial product derived from these code
 * - You may donate to me if you are some how able to get a hold of me, but that's not required
 * - You may link back to the original article for reference, but do not hotlink the source file
  * - This line is intentionally added to differentiate from LGPL, or other similar licensing terms
 * - You must at all time retain this copyright message and terms in your code
 */
class base62 
{
	static $characters = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
	static $base = 62;

	public function encode($var) 
	{
		$stack = array();
		while (bccomp($var, 0) != 0)
		{
			$remainder = bcmod($var, self::$base);
			$var = bcdiv( bcsub($var, $remainder), self::$base );
	
			array_push($stack, self::$characters[$remainder]);
		}
	
		return implode('', array_reverse($stack));
	}
	
	public function decode($var) 
	{
		$length = strlen($var);
		$result = 0;
		for($i=0; $i&lt;$length; $i++) 
		{
			$result = bcadd($result, bcmul(self::get_digit($var[$i]), bcpow(self::$base, ($length-($i+1)))));
		}
	
		return $result;
	}
	
	private function get_digit($var) 
	{
		if(ereg('[0-9]', $var))
		{
			return (int)(ord($var) - ord('0'));
		}
		else if(ereg('[A-Z]', $var))
		{
			return (int)(ord($var) - ord('A') + 10);
		}
		else if(ereg('[a-z]', $var))
		{
			return (int)(ord($var) - ord('a') + 36);
		}
		else
		{
			return $var;
		}
	}
}</pre>
</div>
</div>
<p>If copy &amp; paste isn't your thing, you can download the file directly: <span class="mt-enclosure mt-enclosure-file" style="display: inline;"><a href="http://www.andyhuang.net/blog/assets/class_base62.phps">class_base62.phps</a></span>.</p>

<p>Since it is a static class, you can invoke it directly without having to instantiate it.  Simply do this:
<div class="code_container">
<div class="code_header">PHP Code</div>
<div class="code_body">
<pre>
require_once("class_base62.php");
base62::encode("100"); // returns "1c";
base62::decode("LygHa16AHYF"); // returns "18446744073709551615";</pre>
</div>
</div>

<p>Happy coding! But please do let me know if you encounter any problems with the script, so I can fix it!</p>
</div>]]>
    </content>
</entry>

<entry>
    <title>Unlock iPhone OS 3.0 With Push Support and no Rapid Battery Drain</title>
    <link rel="alternate" type="text/html" href="http://www.andyhuang.net/blog/2009/07/unlock-iphone-os-30-with-push.html" />
    <id>tag:andy.hwang.tw,2009://2.31</id>

    <published>2009-07-21T10:23:42Z</published>
    <updated>2009-07-21T10:54:45Z</updated>

    <summary><![CDATA[With the 3.0 iPhone OS, new baseband, and everything, there are several problems floating about. &nbsp;First, there are a large handful of users plagued by the rapid battery drain problem. &nbsp;How do you know if you have this problem? &nbsp;Well,...]]></summary>
    <author>
        <name>Andy Huang</name>
        <uri>http://www.andyhuang.net/mt/mt-cp.cgi?__mode=view&amp;blog_id=2&amp;id=1</uri>
    </author>
    
        <category term="Apple" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="General" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Memo" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="iPhone 3G" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="apple" label="Apple" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="iphone" label="iPhone" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="iphone3g" label="iPhone 3G" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="jailbreak" label="Jailbreak" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="pushnotification" label="push notification" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="unlock" label="Unlock" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-us" xml:base="http://www.andyhuang.net/blog/">
        <![CDATA[<div>With the 3.0 iPhone OS, new baseband, and everything, there are several problems floating about. &nbsp;First, there are a large handful of users plagued by the rapid battery drain problem. &nbsp;How do you know if you have this problem? &nbsp;Well, its quite simple actually. &nbsp;Before upgrading to 3.0, your battery is good for 12 hours, 8 hours, whatever. &nbsp;After upgrading to 3.0, it discharges even if you have the phone plugged in, and you're generally looking at no more than 3 hours idle time. &nbsp;Second, if you hacktivate your iPhone, you don't get youtube and you don't get push notifications.</div><div><br /></div><div>I've found that the battery depletion problem is usually to do with activating using an official SIM, and then hacktivating the device, because apparently it leaves some messed up APN settings on the phone. &nbsp;As for the push notifications, hacktivating it directly is not going to work because you're not going to get the certificates required for push notification.</div><div><br /></div><div>Luckily for me, having an official SIM card and a third party SIM card means I can have the best of both worlds, and not have to worry about either problems. &nbsp;Unfortunately, though, it does mean restoring the phone is a bit more time consuming.</div><div><br /></div><div>Now, I must note that this is a memo for myself, and nothing but. Don't complain if you do not have an official SIM card so you cannot get it to work. Don't ask me for my certificates, because I don't want to share my pushed email messages and risk getting banned. &nbsp;With that said, let's start.</div>]]>
        <![CDATA[<h5>Getting the certificates</h5><div>This part is actually easy and straight forward...</div><div><ol><li>Eject your unofficial SIM</li><li>Insert your official SIM</li><li>Restore using standard 3.0 ipsw through iTunes &lt;-- Very important, we don't want 3.0.1 or 3.1 or etc. because those will have different baseband which could permanently lock your devices</li><li>Activate your device over iTunes</li><li>Quit iTunes completely</li><li>Jailbreak the device using redsn0w, it doesn't really matter if you install Cydia or Icy, you will need one of them, but this restore is going out the window later so just choose whatever</li><li>Use PhoneView, or other tool to drop nimble from dev-team's push fix package to /private/var/Keychains/</li><li>Install MobileTerminal or OpenSSH so you can have access to your device</li><li>Install at least one application which uses push notification via AppStore, I used Beejive IM, but you can use IM+ or whatever</li><li>Launch the application, enable push notification</li><li>Launch MobileTerminal or SSH into your device (No, close Cyberduck or CuteFTP or whatever, SSH, not SFTP)</li><li>Change nimble to 777 permission, su up, execute nimble as root</li><li>Copy the 4 output files (<span class="Apple-style-span" style="font-family: 'Lucida Grande', helvetica, hirakakupro-w3, osaka, 'ms pgothic', sans-serif; font-size: 12px; ">push-cert.bin, push-key.bin, youtube-cert.bin, youtube-key.bin; no, you're not getting them from me) to your machine.</span></li></ol><div><font class="Apple-style-span" face="'Lucida Grande', helvetica, hirakakupro-w3, osaka, 'ms pgothic', sans-serif" size="3"><span class="Apple-style-span" style="font-size: 12px;"><br /></span></font></div></div>

<h5>Unlocking for other provider</h5>This next part is the tricky part...<div><ol><li>Eject your official SIM</li><li>Insert your unofficial SIM (you can put away your official SIM for safe keeps now)</li><li>Restore using standard 3.0 (again, I can't stress enough, not any other version or you may lose your unlock permanently!)</li><li>Jailbreak using redsn0w, install the package manager of your choice -- I'm biased because I appear on Cydia's thank you page, so I go with Cydia.</li><li>Setup your iPhone as a <b>new iPhone</b> when iTunes ask you, do <b>NOT</b>&nbsp;use one of the backups. &nbsp;If you use a backup you will face the rapid battery depletion problem!</li><li>PhoneView (or other tools) to drop the four files to /private/var/Keychains/</li><li>PhoneView (or other tools) to drop nimble and inject to /private/var/Keychains/</li><li>PhoneView (or other tools) to DELETE keychain-2.db from /private/var/Keychains/</li><li>Install MobileTerminal / OpenSSH from package manager</li><li>Launch MobileTerminal or SSH into your device</li><li>Go to /private/var/Keychains/ and chmod 777 both nimble and inject</li><li>Su up, and execute inject</li><li>Reboot your device (IE: Power button until you see red slider, slide it, wait for apple icon to go away, power button again)</li><li>Sync your data, install your push notification app (if you installed it before this step, push will not work. &nbsp;Restart from step 3 again)</li><li>Go back to package manager, add repo666.ultrasn0w.com and install ultrasn0w (so you can use your unofficial carrier)</li><li>Launch youtube app, you would probably be asked for your WiFi password, enter it, and verify that it works -- if not, go back to step 6 and repeat.</li><li>Launch your push notification app, and verify that it works -- if not, go back to step 6 and repeat.</li><li>Setup your Exchange/MobileMe account (if you've set it up before this step, push may not work. &nbsp;Restart from step 3 again).</li></ol><div><br /></div><div>That should do the trick for you. &nbsp;Please post comments to let me know if this works or doesn't work for you so we can refine these steps together!</div></div>]]>
    </content>
</entry>

<entry>
    <title>Sideways Hacking Time Machine to Work with SMB (Windows) and Potentially Other Shares</title>
    <link rel="alternate" type="text/html" href="http://www.andyhuang.net/blog/2009/06/sideways-hacking-time-machine.html" />
    <id>tag:andy.hwang.tw,2009://2.30</id>

    <published>2009-06-19T05:50:19Z</published>
    <updated>2009-06-19T07:07:59Z</updated>

    <summary> I have a NAS with four 400GB harddrives running a RAID 5 installation, which means I won&apos;t lose data on there unless two of the drives go bad. It&apos;s done through my TS-409 (shown to the right). Since I...</summary>
    <author>
        <name>Andy Huang</name>
        <uri>http://www.andyhuang.net/mt/mt-cp.cgi?__mode=view&amp;blog_id=2&amp;id=1</uri>
    </author>
    
        <category term="Apple" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Memo" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="OSX" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="apple" label="Apple" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="backup" label="Backup" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="networkdrive" label="Network Drive" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="osx" label="OSX" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="samba" label="Samba" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="smb" label="SMB" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="timemachine" label="Time Machine" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="windows" label="Windows" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-us" xml:base="http://www.andyhuang.net/blog/">
        <![CDATA[<div>
<div style="float:right">
<iframe src="http://rcm.amazon.com/e/cm?t=andhua-20&amp;o=1&amp;p=8&amp;l=as1&amp;asins=B00138UKE4&amp;md=10FE9736YVPPT7A0FBG2&amp;fc1=000000&amp;IS1=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0000FF&amp;bc1=FFFFFF&amp;bg1=FFFFFF&amp;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</div>
<p>I have a NAS with four 400GB harddrives running a RAID 5 installation, which means I won't lose data on there unless two of the drives go bad.  It's done through my TS-409 (shown to the right). Since I have all these space, I might as well use it to backup my MacBook regularly so I don't lose any of my important data. OS X users know, Time Machine is awesome.  It helps you take hourly, daily, and weekly snapshots of your computer.  But unfortunately, it only works with additional harddrives attached to the machine, OR Time Capsule on your network... right?  Wrong.  Today, we will sideways hack Time Machine, and make it work with your SMB (Windows) share folder.</p>
<p>Before you get started, counter intuitive as it may seem, please be sure to have your data backed up before proceeding.  While the memo is written with the best of intentions to help people make backups, I will not be responsible for any data loss as result of you following through this memo of my.  You have been warned.</p>
</div>]]>
        <![CDATA[<div>
<p>Now then, let's move on.</p>
<p>If you head straight over to System Preferences -> Time Machine, you will notice that it does not allow you to select your SMB based share.  This is probably because Apple wants you to buy Time Capsule / external hard drives, or it could be because hdiutil doesn't work too well with SMB based share.  Either ways, we'll hack it to work with our SMB share.</p>
<p>First, head over to the terminal; typically Applications -> Utilities -> Terminal, or if you're like me, QuickSilver -> iTerm.  Once you have your terminal launched, issue this command:</p>
<div class="code_container">
<div class="code_header">Terminal Command</div>
<div class="code_body">defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1</div></div>
<p>It's pretty long, and it might've gotten squeeshed here, but that's all in one line.  What that does is that it modifies a hidden configuration setting set by Apple, for the System Preferences application, to get Time Machine to show unsupported network drives.  Guess what's unsupported?  Yep, you guessed it, SMB / Windows share drives.  Now that if you have it enabled, you will see your drive as an option to back up to... but you're not done yet!  As this alone will not work -- remember what I said about hdiutils?</p>
<p>The next step gets a little bit more complicated, so please read carefully and look at the screenshots I am attaching.  What you'd need to do now is figure out what is your ethernet's MAC address.  Go back to your terminal (if you've left it already) and enter this command:</p>
<div class="code_container">
<div class="code_header">Terminal Command</div>
<div class="code_body">ifconfig en0 | grep ether</div>
</div>
<p>You should get something like this as result:</p>
<div class="code_container">
<div class="code_header">Terminal Result</div>
<div class="code_body">chiisana-osx:~ Andy$ ifconfig en0 | grep ether<br />
        ether 00:23:df:90:5f:e8</div>
</div>
<p>Copy down the series of hexadecimal numbers without the colons; in my example, it would be: "0023df905fe8".  You will need this number later, so don't lose it.</p>
<p>Next, head over to System Preferences -> Sharing, and look near your computer name.  While your computer name can be anything (I, for example, have it in Japanese), the identifier on networks MUST BE alphanumeric, and some basic symbols.  This is typically deduced from your computer name's ascii parts.  Take a look at this screenshot:</p>
<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://www.andyhuang.net/blog/assets/2009_06_18_machine_name.png"><img alt="2009_06_18_machine_name.png" src="http://www.andyhuang.net/blog/assets_c/2009/06/2009_06_18_machine_name-thumb-200x77-31.png" width="200" height="77" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /></a></span>
<p>Notice my says "chiisana-osx.local"?  You want to note down the part before .local.  So for my example, it'd be "chiisana-osx".  Write yours down, and don't lose it, you'll need this later too.</p>
<p>Finally, ask yourself the question: "How big is my harddrive?" If you don't know this information, go to your desktop, select "Macintosh HD", and click "Command + I".  In the new window, it should tell you your harddrive's capacity.  Note down that number, and give or take double it, because you'll need some extra space to keep historical copies in the Time Machine.  Now we have all the information we'd need.</p>
<p>Go to System Preferences -> Time Machine, and setup your Time Machine on your desired network drive.  Please keep in mind that Time Machine will create the backup file at the root of that network share, so if you want it in a specific folder, make sure you adjust your share accordingly before mounting.  It should get started creating the backup... but after a while, it will fail (oh no!)... because hdiutil doesn't really work with SMB shares.  Now what?  Now we create our own backup file...  Your backup file should be named machine identifier, underscore, MAC address, dot, sparsebundle.  In my example, it would be "chiisana-osx_0023df905fe8.sparsebundle", make sure you make your own backup file name correctly, or Time Machine will not work.  Once you have your backup file name constructed, go back to the terminal and issue this command:</p>
<div class="code_container">
<div class="code_header">Terminal Command</div>
<div class="code_body">cd<br />
hdiutil create -size xxxg -fs HFS+J -volname "My Time Machine Backup" yyyyyyyy_zzzzzzzz.sparsebundle</div></div>
<p>Replace xxxg with numbers of GB you would like to allocate for backup; IE: 200g for 200GB, 300g for 300GB, 1T for 1TB, etc.</p>
<p>Replace yyyyyyyy_zzzzzzzz.sparesbundle with your backup file name; IE: chiisana-osx_0023df905fe8.sparsebundle</p>
<p>The first line, cd, will set you to your home directory, regardless of where you are.  The second line will create the backup sparsebundle for you.  In my case, the 200G sparse bundle worked out to be around 115M, but your sizes may vary.  Once you have this file, move it to your SMB share, and set your Time Machine to backup again. This time, Time Machine will magically work! But because you're copying your entire harddrive's contents (in my case, upwards to 100GB), the first time making the backup will take some time...  After it is done once, it will be much more snappy in the future.  Happy time traveling!</p>
</div>]]>
    </content>
</entry>

<entry>
    <title>Fiio E5 Review</title>
    <link rel="alternate" type="text/html" href="http://www.andyhuang.net/blog/2009/06/fiio-e5.html" />
    <id>tag:andy.hwang.tw,2009://2.29</id>

    <published>2009-06-10T22:55:36Z</published>
    <updated>2009-09-02T02:49:21Z</updated>

    <summary><![CDATA[Well, those that follows me on twitter knows, my net died on me earlier.&nbsp; And to make the best of the situation, I decided to go bowling: Well, no, that wasn't fun actually.&nbsp; What's more fun is, I picked up...]]></summary>
    <author>
        <name>Andy Huang</name>
        <uri>http://www.andyhuang.net/mt/mt-cp.cgi?__mode=view&amp;blog_id=2&amp;id=1</uri>
    </author>
    
        <category term="Audiophile" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="General" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Personal" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="audiophile" label="Audiophile" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="pocketamp" label="Pocket Amp" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-us" xml:base="http://www.andyhuang.net/blog/">
        <![CDATA[Well, those that follows me on twitter knows, <a href="http://twitter.com/AndyHuang/status/2105121501">my net died on me earlier</a>.&nbsp; And to make the best of the situation, I decided to go bowling:<br /><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://www.andyhuang.net/blog/assets/2009_06_10_001.jpg"><img alt="2009_06_10_001.jpg" src="http://www.andyhuang.net/blog/assets_c/2009/06/2009_06_10_001-thumb-200x136-15.jpg" class="mt-image-center" style="margin: 0pt auto 20px; text-align: center; display: block;" height="136" width="200" /></a></span><br /> <div>Well, no, that wasn't fun actually.&nbsp; What's more fun is, I picked up my <a href="http://www.fiio.com.cn/en/showproduct.asp?id=309">Fiio E5</a> from the post office today!&nbsp; The postal system did a good job on damaging the package, but thanks to my crappy iPhone's auto-no-focus camera, I won't be able to show that...<br /><br /><a href="http://andy.hwang.tw/assets/2009_06_10_002.jpg"><img alt="2009_06_10_002.jpg" src="http://andy.hwang.tw/assets_c/2009/06/2009_06_10_002-thumb-200x275-16.jpg" class="mt-image-none" style="" height="275" width="200" /></a><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://www.andyhuang.net/blog/assets/2009_06_10_003.jpg"><img alt="2009_06_10_003.jpg" src="http://www.andyhuang.net/blog/assets_c/2009/06/2009_06_10_003-thumb-200x200-17.jpg" class="mt-image-none" style="" height="200" width="200" /></a></span><br /><br /><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://www.andyhuang.net/blog/assets/2009_06_10_005.jpg"><img alt="2009_06_10_005.jpg" src="http://www.andyhuang.net/blog/assets_c/2009/06/2009_06_10_005-thumb-200x238-19.jpg" class="mt-image-none" style="" height="238" width="200" /></a></span><a href="http://andy.hwang.tw/assets/2009_06_10_006.jpg"><img alt="2009_06_10_006.jpg" src="http://andy.hwang.tw/assets_c/2009/06/2009_06_10_006-thumb-200x226-20.jpg" class="mt-image-none" style="" height="226" width="200" /></a><br /><br />To be honest, aside from the out-dated iPod Shuffle look alike, the controls made it looks (and feels) kind of cheap:<br /><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://www.andyhuang.net/blog/assets/2009_06_10_008.jpg"><img alt="2009_06_10_008.jpg" src="http://www.andyhuang.net/blog/assets_c/2009/06/2009_06_10_008-thumb-200x85-22.jpg" class="mt-image-none" style="" height="85" width="200" /></a></span><br /><br />Oh well, I can live with that I guess.&nbsp; Let's try to plug it into my Audio Technica A700 and see how it sounds...<br /><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://www.andyhuang.net/blog/assets/2009_06_10_010.jpg"><img alt="2009_06_10_010.jpg" src="http://www.andyhuang.net/blog/assets_c/2009/06/2009_06_10_010-thumb-200x266-29.jpg" class="mt-image-none" style="" height="266" width="200" /></a></span><br /></div><div><br />Because the E5 is intended to be a pocket amp, my guess is that its target earphones aren't usually too good with bass.&nbsp; The frequency range it supports is 10Hz to a ridiculous 100KHz.&nbsp; But my A700 does 5Hz to 35KHz, so I guess I'm going to be missing out some bass... oh well, not like I can hear those 5Hz anyways (I might feel it, but that's for another discussion)...<br /><br />Preliminary testing gives good impression on the iPhone, because it did as promised, improve the output quality, and sound volume.&nbsp; I can hear the layering of different instruments and sounds a bit better than without it, which is definetly a plus.&nbsp; But on the other hand, I'd still need to put the phone's output volume to be pretty high to hear the quality, so it is by no means going to help save battery.<br /><br />Next up, MacBook.&nbsp; When it gets plugged into my MacBook, unfortunaetly, it didn't sound so great...&nbsp; I got the feeling of literally plugging something in between my earphone and my laptop, which acts as nothing more than an external volume control...&nbsp; There might even be a little bit of distortion to the higher sound spectrum (16 to 18KHz range, beyond that I can't really hear, but only feel, so I can't really judge it)...&nbsp; and the sound layering feel isn't as obvious as well... that's probably because the MacBook already gives a pretty decent sound output. Oh well, you get what you paid for...<br /><br />In general, I did noticed that the sound seems to be muddled a bit... that is to say, I wasn't able to tell the exact direction of the instruments anymore.&nbsp; Also, I noticed that the "Bass boost" switch is best remained off.&nbsp; When the bass boost is enabled, the entire sound sounds like it is being covered under something.&nbsp; Not my kind of preference, maybe it'll float some other people's boat better.&nbsp; <br /><br />All in all, I think it's a good buy.&nbsp; For pocket amps, anything under $100 USD is probably as good as a fancy toy with volume control... and this one is only $17.&nbsp; So its ability to make my iPhone sound better is good enough.&nbsp; I don't foresee myself whipping out my MacBook to plug E5 and A700 in, but I do foresee myself keeping it plugged to my iPhone.<br /></div>]]>
        
    </content>
</entry>

<entry>
    <title>Not just an iPod anymore</title>
    <link rel="alternate" type="text/html" href="http://www.andyhuang.net/blog/2009/05/not-just-an-ipod-anymore.html" />
    <id>tag:andy.hwang.tw,2009://2.28</id>

    <published>2009-05-31T02:24:26Z</published>
    <updated>2009-05-31T02:24:26Z</updated>

    <summary>Those that may remember my other post a while back, where my iPhone had no modem usage, will probably be glad to see that my iPhone is no longer just an iPod with phone anymore... Finally gotten around to get...</summary>
    <author>
        <name>Andy Huang</name>
        <uri>http://www.andyhuang.net/mt/mt-cp.cgi?__mode=view&amp;blog_id=2&amp;id=1</uri>
    </author>
    
    
    <content type="html" xml:lang="en-us" xml:base="http://www.andyhuang.net/blog/">
        <![CDATA[Those that may remember my other post a while back, where my iPhone had no modem usage, will probably be glad to see that my iPhone is no longer just an iPod with phone anymore...

<br /><br /><center><a href='http://blogpress.w18.net/photos/09/05/30/392.jpg'><img src='http://blogpress.w18.net/photos/09/05/30/s_392.jpg' border='0' width='187' height='281' style='margin:5px'></a></center><br /> 
Finally gotten around to get it a data plan... And from the looks of it, my 500mb/mn isn't quite enough!!

-- Post From My iPhone<br />]]>
        
    </content>
</entry>

<entry>
    <title>Google Gears, Fluid, RTM, and Greasemonkey</title>
    <link rel="alternate" type="text/html" href="http://www.andyhuang.net/blog/2009/02/google-gears-fluid-rtm-and-gre.html" />
    <id>tag:andy.hwang.tw,2009://2.27</id>

    <published>2009-02-20T10:33:27Z</published>
    <updated>2009-02-20T10:42:44Z</updated>

    <summary><![CDATA[I started using RTM a while ago, and it works great.&nbsp; It helps me keep all my to-dos together in one place, and allows me to set different deadlines so I don't forget them. But the problem is, there is...]]></summary>
    <author>
        <name>Andy Huang</name>
        <uri>http://www.andyhuang.net/mt/mt-cp.cgi?__mode=view&amp;blog_id=2&amp;id=1</uri>
    </author>
    
        <category term="Apple" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Memo" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="OSX" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="fluid" label="Fluid" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="googlegears" label="Google Gears" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="greasemonkey" label="Greasemonkey" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="osx" label="OSX" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="rtm" label="RTM" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-us" xml:base="http://www.andyhuang.net/blog/">
        <![CDATA[I started using <a href="http://www.rememberthemilk.com/">RTM</a> a while ago, and it works great.&nbsp; It helps me keep all my to-dos together in one place, and allows me to set different deadlines so I don't forget them. But the problem is, there is no way to manage my to-do list while I'm on the go... you know, the boring bus commute, and things like that...&nbsp; Until I ran into an <a href="http://walkah.net/blog/walkah/fluid-desktop-web-apps">article</a> on how to use <a href="http://fluidapp.com/">Fluid</a>, an OSX application that converts webpages into small Applications for you. Fluid is nice because it offers both userscript (Greasemonky) and Google Gears (offline syncing) support.&nbsp; But this is where my problem begin...<br /><br />There is a really <a href="http://userscripts.org/scripts/show/38591">nice GM script</a> I want to use, but it seems to cause problems with the Google Gear synchronization.&nbsp; Whenever I have the script enabled, and Google Gear tries to sync, everything goes wonky and the page refuse to load.&nbsp; I must disable the script, have Gears sync, and then re-enable the script.<br /><br />If anyone knows how to make these work in harmony, please do leave a comment to let me know how!&nbsp; In the mean time, I'll have to keep the script disabled...<br /> ]]>
        
    </content>
</entry>

<entry>
    <title>Making Your OSX Run Faster</title>
    <link rel="alternate" type="text/html" href="http://www.andyhuang.net/blog/2009/02/making-your-osx-run-faster.html" />
    <id>tag:andy.hwang.tw,2009://2.26</id>

    <published>2009-02-20T00:20:30Z</published>
    <updated>2009-02-20T00:43:18Z</updated>

    <summary><![CDATA[As you guys are aware of, I just got my MacBook, and I'm still experiencing the should-not-exist-learning-curve...&nbsp; Anyways, today, I noticed something funny, and I figured I'd share with all of you.Earlier today, I was unable to start any applications...&nbsp;...]]></summary>
    <author>
        <name>Andy Huang</name>
        <uri>http://www.andyhuang.net/mt/mt-cp.cgi?__mode=view&amp;blog_id=2&amp;id=1</uri>
    </author>
    
        <category term="Apple" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="General" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Memo" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="OSX" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="apple" label="Apple" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="firefox" label="Firefox" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="itunes" label="iTunes" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="lastfm" label="Last.fm" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="mailapp" label="Mail.app" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="memorymanagement" label="Memory Management" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="osx" label="OSX" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="tips" label="Tips" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="utorrent" label="uTorrent" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-us" xml:base="http://www.andyhuang.net/blog/">
        <![CDATA[As you guys are aware of, I just got my MacBook, and I'm still experiencing the should-not-exist-learning-curve...&nbsp; Anyways, today, I noticed something funny, and I figured I'd share with all of you.<br /><br />Earlier today, I was unable to start any applications...&nbsp; I'd type the application name via QS, and QS would go away, but no app.&nbsp; I'd use Finder to go to /Applications and attempt to manually launch it, and nothing would happen.&nbsp; Finally, when I tried to start iTerm, it told me it was unable to fork.&nbsp; Linux instincts kicked in and told me that the problem came from lack of resources or PIDs.&nbsp; So I quickly quit a few apps (I had upwards to 30 applications running at that time), and long and behold, I was able to start applications again.&nbsp; I checked my processes list via terminal, and noticed a bunch of idle perl processes -- It's still a mystery to me as to what they are, as I was unable to kill them individually, nor through killall, nor could I see them via Activity monitor, but that's besides the point.&nbsp; I rebooted the system, and it seems to be running fine now (and the idle perl processes have yet to return *touch wood*).<br /><br />I decided I want to pay attention to my resources usage, and make sure my system doesn't lock up on me.&nbsp; I have the habit of leaving commonly used applications running...&nbsp; this is even the case when I was still on Windows.&nbsp; This is when I started to notice a funny trend.&nbsp; It'd appear that applications on OSX suffers even more evident memory leak/consumption problem than their Windows counter part!&nbsp; Here's a quick break down of memory usage oddities after around 12 hours of me working:<br />iTunes - Real Memory: 220.8MB, Virtual Memory: 2.0GB<br />Firefox - Real Memory: 208.4MB, Virtual Memory: 1.7GB<br />Mail - Real Memory: 150.2MB, Virtual Memory: 1.4GB<br />Last.fm - Real Memory: 92.7MB, Virtual Memory: 1023.49MB<br />uTorrent - Real Memory: 16.28MB, Virtual Memory: 973.33MB<br /><br />iTunes I understand, I have tons of music (library of 1699 tracks, 14.13 GB total) and most of them are tagged with album art, so it takes resource to load when I play songs.&nbsp; But on Windows, my iTunes usually floats at around 150MB of memory usage, not 220MB!&nbsp; So I quickly quit iTunes and restarted it.&nbsp; Surely, it dropped down to 70MB of real memory, and arond 1GB of virtual memory -- though, as I wrote these, it grew slowly to 85.52MB and 1.07GB already.<br /><br />Firefox I understand...&nbsp; The prefetching "feature" and caching of tabs etc. does eat up quite a bit of resources...&nbsp; On Windows I've seen it gone up to as much as 600MB of memory, too... So I just killed it and restarted.&nbsp; It's coasting at around 107MB right now...<br /><br />Mail - I wonder if it downloaded all my mails from gmail, even though I said IMAP, and tries to load them into memory over time... Mail is now consuming only 51MB and 1.0GB after quit and relaunch.<br /><br />Last.fm - WHY?!&nbsp; It's a tiny icon that does nothing but scrob my musics! ... and I don't even listen to music from it.&nbsp; Restarted it and its now only eating 21MB and 986.49MB of memory.<br /><br />uTorrent - This one is tiny, but still worth mentioning...&nbsp; Because I didn't do anything with it!&nbsp; I simply decided to download it to see if it is exactly the same as the Windows counter part.&nbsp; Forgot about it, and left it idling.&nbsp; No downloading, no seeding, no hash checking, nothing.&nbsp;&nbsp; Main window isn't even open (so I don't see it on expose)!&nbsp;&nbsp; Restarting it seem to have make it go down to 13.17MB, and 966.61MB though.<br /><br />So, yeah...&nbsp; tip to make your OSX run faster?&nbsp; Just quit your apps and restart them every now and then!&nbsp; It's surprising to see their memory grows so rapidly, even if you're not doing anything with them...<br />]]>
        
    </content>
</entry>

<entry>
    <title>Toggle Nocturne via Quicksilver on OSX</title>
    <link rel="alternate" type="text/html" href="http://www.andyhuang.net/blog/2009/02/toggle-nocturne-via-quicksilve.html" />
    <id>tag:andy.hwang.tw,2009://2.25</id>

    <published>2009-02-07T22:50:59Z</published>
    <updated>2009-02-07T23:13:20Z</updated>

    <summary>Getting into the Mac world, I encountered two awesome tools from the same author; Nocturne, a tool which allows you to invert screen colors so your eyes doesn&apos;t go blind in dark places, and Quicksilver, a rapid application launcher allowing...</summary>
    <author>
        <name>Andy Huang</name>
        <uri>http://www.andyhuang.net/mt/mt-cp.cgi?__mode=view&amp;blog_id=2&amp;id=1</uri>
    </author>
    
        <category term="Apple" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Memo" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="OSX" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="apple" label="Apple" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="applescript" label="AppleScript" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="nocturne" label="Nocturne" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="osx" label="OSX" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="quicksilver" label="Quicksilver" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-us" xml:base="http://www.andyhuang.net/blog/">
        <![CDATA[<p>Getting into the Mac world, I encountered two awesome tools from the same author; <a href="http://docs.blacktree.com/nocturne/nocturne" rel="nofollow">Nocturne</a>, a tool which allows you to invert screen colors so your eyes doesn't go blind in dark places, and <a href="http://docs.blacktree.com/quicksilver/quicksilver" rel="nofollow">Quicksilver</a>, a rapid application launcher allowing you to perform complex tasks with just a few key strokes.  However, they don't integrate well together....  I can't seem to use Quicksilver to toggle Nocturne.... not until I wrote a quick AppleScript for it...  And you can do it too!</p>

<p>Here's how I did it.</p>

<p>First, start Nocturne normally, and go to the preferences panel.  Disable sensor auto switch... that will bump you right out of invert mode if you are in a bright enough place.</p>

<p>Then, enter night mode, and quit the application... it will auto revert back to day mode upon exit, but when you launch it again, it will start in night mode, which is what we want.</p>

<p>Next, go to script editor (Quicksilver > Script Editor, Enter) and create this script (copy & paste should do the trick):<br />
<div class="code_container">
<div class="code_header">Apple Script</div>
<div class="code_body">property Disabled : false<br />
tell application "System Events"<br />
	set TheList to get name of every process<br />
	repeat with i from 1 to the count of TheList<br />
		if item i of TheList contains "Nocturne" then<br />
			tell application "Nocturne" to quit<br />
			set Disabled to true<br />
		end if<br />
	end repeat<br />
	if Disabled is false then<br />
		tell application "Nocturne" to activate<br />
	end if<br />
end tell<br />
</div>
</div></p>

<p>Save the script you've just created into ~/Library/Application Support/Quicksilver/Actions as Nocturne.scpt and you're almost ready to rock!  Trigger your Quicksilver, use Command + R to force refresh of your catalog, and type Nocturne into the first box of Quicksilver.  Because Quicksilver weights the application more heavily than your script, you need to hit down a few times to find the script instead of launching the application directly.  I gave it three times and then Quicksilver learned that I want to use the script instead of real app... it might take you lesser or more, depending on how many times you've launched Nocturne via Quicksilver.  But once it learns that, its all good.</p>

<p>Now, each time you want to toggle mode, just trigger Quicksilver, type Nocturne, and it'll switch day and night mode for you.  Pretty neat huh?</p>

<p>Got it to work?  Please let me know how things are working out for you via comments section :)</p>]]>
        
    </content>
</entry>

<entry>
    <title>Another Victim of Apple Tax</title>
    <link rel="alternate" type="text/html" href="http://www.andyhuang.net/blog/2009/01/another-victim-of-apple-tax.html" />
    <id>tag:andy.hwang.tw,2009://2.24</id>

    <published>2009-01-28T05:19:45Z</published>
    <updated>2009-01-28T05:25:09Z</updated>

    <summary>Lookie here, another person fall victim to the Apple Tax... ((Yea, I&apos;ve sold my soul and am buying an unibody MacBook))...</summary>
    <author>
        <name>Andy Huang</name>
        <uri>http://www.andyhuang.net/mt/mt-cp.cgi?__mode=view&amp;blog_id=2&amp;id=1</uri>
    </author>
    
        <category term="General" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Personal" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="apple" label="Apple" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="mac" label="Mac" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="macbook" label="MacBook" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-us" xml:base="http://www.andyhuang.net/blog/">
        <![CDATA[<p>Lookie here, another person fall victim to the Apple Tax...</p>
<p>
<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="2009_01_27_apple_tax.jpg" src="http://www.andyhuang.net/blog/assets/2009_01_27_apple_tax.jpg" width="692" height="622" class="mt-image-left" style="float: left; margin: 0 20px 20px 0;" /></span>
</p>
<p>((Yea, I've sold my soul and am buying an unibody MacBook))</p>]]>
        
    </content>
</entry>

<entry>
    <title>Google Chrome Password Manager</title>
    <link rel="alternate" type="text/html" href="http://www.andyhuang.net/blog/2009/01/google-chrome-password-manager.html" />
    <id>tag:andy.hwang.tw,2009://2.22</id>

    <published>2009-01-11T16:12:07Z</published>
    <updated>2009-01-19T19:10:35Z</updated>

    <summary><![CDATA[So I had to let a co-worker use my computer yesterday. &nbsp;He needed to activate his Google account, so he could activate his Google calendar, so we can manage our time better -- more like I can track him down...]]></summary>
    <author>
        <name>Andy Huang</name>
        <uri>http://www.andyhuang.net/mt/mt-cp.cgi?__mode=view&amp;blog_id=2&amp;id=1</uri>
    </author>
    
        <category term="General" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Google Chrome" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Memo" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="googlechrome" label="Google Chrome" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="passwordmanager" label="Password Manager" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="sqlite3" label="SQLite3" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-us" xml:base="http://www.andyhuang.net/blog/">
        <![CDATA[So I had to let a co-worker use my computer yesterday. &nbsp;He needed to activate his Google account, so he could activate his Google calendar, so we can manage our time better -- more like I can track him down easier :p<div><br /></div><div>All is fine and good, until he click the "never for this site" button for remember password on our campus central authentication system... &nbsp;Apparently, some how that translated to Chrome as "remove the current entry that auto loaded on page load" (my personal login), "and never ask user whether or not Chrome should remember the login information for this domain"... &nbsp;This was very problematic, because now I cannot get Google to remember MY login on MY computer which I use on a regular basis and want to be lazy on!!</div><div><br /></div><div>I poked around the options, and forms, but was unable to find a way to un-do that forsaken button click he did, so I realized I had to dig further.&nbsp;After much searching around and poking around, i the profile settings directory of Google Chrome, I found a sqlite3 database, which contained all the login information. &nbsp;This file can be read with any sqlite3 db manager. &nbsp;Luckily, I was able to remove the block from here manually. &nbsp;As a memo for self -- in case if people clicks the evil button on me again -- here are the procedures to un-do that click.</div>]]>
        <![CDATA[First, the file is located in the Local Settings folder. &nbsp;This means the path may very well differ for Vista and Windows 7 users. &nbsp;I user Windows XP Pro still, so this is the path for me:<div>C:\Documents and Settings\&lt;username&gt;\Local Settings\Application Data\Google\Chrome\User Data\Default</div><div><br /></div><div>Vista and Windows 7 users may wish to try something like:</div><div>C:\Users\&lt;username&gt;\Local\Application Data\Google\Chrome\User Data\Default</div><div><br /></div><div>&lt;username&gt; needs to be replaced with the username being used to login.</div><div><br /></div><div>If you are unable to see the folders, you should enable viewing of hidden files.</div><div><br /></div><div>Once found, the file in the particular folder is called:&nbsp;Web Data</div><div><br /></div><div>Be sure chrome.exe is not running (ctrl-alt-delete, processes, kill all instances of chrome.exe), load the file using sqlite3 db manager.</div><div><br /></div><div>Under logins, find the record matching the site that is blocked, and remove it. &nbsp;The record you want to delete should have a "blacklisted_by_user" flag set to 1.</div><div><br /></div><div>Save the db (if required by db manager), and you are good to go!</div><div><br /></div><div>Know a better way to do this? &nbsp;Know where the file is on Vista and Windws 7? &nbsp;Please let me know via the comments!</div>]]>
    </content>
</entry>

<entry>
    <title>NastuLion for iPhone</title>
    <link rel="alternate" type="text/html" href="http://www.andyhuang.net/blog/2008/11/nastulion-for-iphone.html" />
    <id>tag:andy.hwang.tw,2008://2.20</id>

    <published>2008-11-01T17:07:22Z</published>
    <updated>2008-11-09T01:17:16Z</updated>

    <summary>Today morning I noticed NatsuLion app for iPhone on the app store. NatsuLion is, well, was, a Japanese open source Twitter application for the Macs. It has now been localized into English (still open source after Apple dropped the nasty...</summary>
    <author>
        <name>Andy Huang</name>
        <uri>http://www.andyhuang.net/mt/mt-cp.cgi?__mode=view&amp;blog_id=2&amp;id=1</uri>
    </author>
    
        <category term="General" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="iPhone 3G" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="apple" label="Apple" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="iphone" label="iPhone" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="iphone3g" label="iPhone 3G" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="ipodtouch" label="iPod Touch" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-us" xml:base="http://www.andyhuang.net/blog/">
        <![CDATA[Today morning I noticed NatsuLion app for iPhone on the app store.  NatsuLion is, well, was, a Japanese open source Twitter application for the Macs.  It has now been localized into English (still open source after Apple dropped the nasty NDA) and ported to the iPhone.

Upon first use, it gives a clean feel, much like Twinkle, the other well known Twitter application on the iPhone.

<br /><br /><center><a href='http://blogpress.w18.net/photos/08/11/09/24.jpg'><img src='http://blogpress.w18.net/photos/08/11/09/s_24.jpg' border='0'></a></center><br />
  
It also offers some neat interfaces such ad colorized tweets based on type (d vs @), which really helps reading:



<br /><br /><center><a href='http://blogpress.w18.net/photos/08/11/09/25.jpg'><img src='http://blogpress.w18.net/photos/08/11/09/s_25.jpg' border='0'></a></center><br />

But I am noticing some problems... Peteominantly, lack of local feel (ie: I can't find people near me), and inability to tweet photos...

In the end, I went back to Twinkle forthose two features.  But with Twinkle slowly becoming a bloatware (recent friend list -- ONLY for their network, nothing for Twitter -- addition, and the to be honest all too useless map featre), I think it won't be long before I jump boat and go over to another client.  

Programmers pay attention and make something good for me ya?

-- Posted from my iPhone.
<br />]]>
        
    </content>
</entry>

<entry>
    <title>Hello from iPhone!</title>
    <link rel="alternate" type="text/html" href="http://www.andyhuang.net/blog/2008/10/hello-from-iphone.html" />
    <id>tag:andy.hwang.tw,2008://2.19</id>

    <published>2008-10-31T12:31:00Z</published>
    <updated>2008-10-31T12:31:54Z</updated>

    <summary>Just bought the BlogPress app for iPhone! Hello everyone from it iPhone :) -- Post From My iPhone...</summary>
    <author>
        <name>Andy Huang</name>
        <uri>http://www.andyhuang.net/mt/mt-cp.cgi?__mode=view&amp;blog_id=2&amp;id=1</uri>
    </author>
    
    
    <content type="html" xml:lang="en-us" xml:base="http://www.andyhuang.net/blog/">
        <![CDATA[Just bought the BlogPress app for iPhone!  Hello everyone from it iPhone :)


  -- Post From My iPhone<br />]]>
        
    </content>
</entry>

<entry>
    <title>Z-Rox Walkthrough</title>
    <link rel="alternate" type="text/html" href="http://www.andyhuang.net/blog/2008/09/zrox-walkthrough.html" />
    <id>tag:andy.hwang.tw,2008://2.18</id>

    <published>2008-09-25T00:35:07Z</published>
    <updated>2008-09-25T01:41:56Z</updated>

    <summary><![CDATA[Because of personal interest, I waste a lot of time on random silly flash games.&nbsp; Today, Z-Rox caught my attention because it was linked on some boards I regular.&nbsp; Objective of the game is simple, you look at the cross...]]></summary>
    <author>
        <name>Andy Huang</name>
        <uri>http://www.andyhuang.net/mt/mt-cp.cgi?__mode=view&amp;blog_id=2&amp;id=1</uri>
    </author>
    
        <category term="General" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Memo" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="flashgame" label="Flash game" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="walkthrough" label="Walkthrough" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-us" xml:base="http://www.andyhuang.net/blog/">
        <![CDATA[Because of personal interest, I waste a lot of time on random silly flash games.&nbsp; Today, <a href="http://www.newgrounds.com/portal/view/460260" rel="nofollow" title="Z-Rox">Z-Rox</a> caught my attention because it was linked on some boards I regular.&nbsp; <br /><br /> 
Objective of the game is simple, you look at the cross section image provided to you, and you try to figure out what you're actually seeing.  It's quite an unique idea which we haven't seen before, you should give it a try sometime.  If it gets too difficult, read on for walk through (or a list of answers)...]]>
        <![CDATA[[Please highlight for answers]
<div style="border: 1px solid black; padding-left: 5px;">
<ol>
<li><span style="color:#fff">L</span></li>
<li><span style="color:#fff">F</span></li>
<li><span style="color:#fff">V</span></li>
<li><span style="color:#fff">H</span></li>
<li><span style="color:#fff">X</span></li>
<li><span style="color:#fff">E</span></li>
<li><span style="color:#fff">Y</span></li>
<li><span style="color:#fff">+</span></li>
<li><span style="color:#fff">=</span></li>
<li><span style="color:#fff">!</span></li>
<li><span style="color:#fff">SQUARE</span></li>
<li><span style="color:#fff">/</span></li>
<li><span style="color:#fff">TRIANGLE</span></li>
<li><span style="color:#fff">A</span></li>
<li><span style="color:#fff">K</span></li>
<li><span style="color:#fff">\</span></li>
<li><span style="color:#fff">1</span></li>
<li><span style="color:#fff">CIRCLE</span></li>
<li><span style="color:#fff">U</span></li>
<li><span style="color:#fff">N</span></li>
<li><span style="color:#fff">B</span></li>
<li><span style="color:#fff">O</span></li>
<li><span style="color:#fff">DIAMOND</span></li>
<li><span style="color:#fff">TRAPEZOID</span></li>
<li><span style="color:#fff">7</span></li>
<li><span style="color:#fff">P</span></li>
<li><span style="color:#fff">C</span></li>
<li><span style="color:#fff">Z</span></li>
<li><span style="color:#fff">8</span></li>
<li><span style="color:#fff">PI</span></li>
<li><span style="color:#fff">PENTAGON</span></li>
<li><span style="color:#fff">M</span></li>
<li><span style="color:#fff">SQUARE ROOT</span></li>
<li><span style="color:#fff">9</span></li>
<li><span style="color:#fff">HEXAGON</span></li>
<li><span style="color:#fff">W</span></li>
<li><span style="color:#fff">D</span></li>
<li><span style="color:#fff">6</span></li>
<li><span style="color:#fff">4</span></li>
<li><span style="color:#fff">J</span></li>
<li><span style="color:#fff">2</span></li>
<li><span style="color:#fff">R</span></li>
<li><span style="color:#fff">OCTAGON</span></li>
<li><span style="color:#fff">QUESTION MARK</span></li>
<li><span style="color:#fff">#</span></li>
<li><span style="color:#fff">3</span></li>
<li><span style="color:#fff">S</span></li>
<li><span style="color:#fff">G</span></li>
<li><span style="color:#fff">5</span></li>
<li><span style="color:#fff">%</span></li>
<li><span style="color:#fff">ARROW</span></li>
<li><span style="color:#fff">DROP</span></li>
<li><span style="color:#fff">CENT</span></li>
<li><span style="color:#fff">LADDER</span></li>
<li><span style="color:#fff">ENVELOPE</span></li>
<li><span style="color:#fff">CHESSBOARD</span></li>
<li><span style="color:#fff">$</span></li>
<li><span style="color:#fff">TARGET</span></li>
<li><span style="color:#fff">LOCK</span></li>
<li><span style="color:#fff">INFINITY</span></li>
<li><span style="color:#fff">HEART</span></li>
<li><span style="color:#fff">MOON</span></li>
<li><span style="color:#fff">MAGNET</span></li>
<li><span style="color:#fff">DIE</span></li>
<li><span style="color:#fff">CANDLE</span></li>
<li><span style="color:#fff">WINE GLASS</span></li>
<li><span style="color:#fff">HOUSE</span></li>
<li><span style="color:#fff">PARKING</span></li>
<li><span style="color:#fff">ANCHOR</span></li>
<li><span style="color:#fff">STAR</span></li>
<li><span style="color:#fff">LIGHT</span></li>
<li><span style="color:#fff">EYE</span></li>
<li><span style="color:#fff">TREE</span></li>
<li><span style="color:#fff">SPADE</span></li>
<li><span style="color:#fff">BOWLING BALL</span></li>
<li><span style="color:#fff">LIGHTNING</span></li>
<li><span style="color:#fff">HOOK</span></li>
<li><span style="color:#fff">TACK</span></li>
<li><span style="color:#fff">CLOVER</span></li>
<li><span style="color:#fff">MUSIC</span></li>
<li><span style="color:#fff">SMILE</span></li>
<li><span style="color:#fff">DISK</span></li>
<li><span style="color:#fff">PHONE</span></li>
<li><span style="color:#fff">MOUTH</span></li>
<li><span style="color:#fff">PEACE</span></li>
<li><span style="color:#fff">BOMB</span></li>
<li><span style="color:#fff">UMBRELLA</span></li>
<li><span style="color:#fff">PLANE</span></li>
<li><span style="color:#fff">MAN</span></li>
<li><span style="color:#fff">HOURGLASS</span></li>
<li><span style="color:#fff">GLOBE</span></li>
<li><span style="color:#fff">RADIOACTIVE</span></li>
<li><span style="color:#fff">WATCH</span></li>
<li><span style="color:#fff">ANARCHY</span></li>
<li><span style="color:#fff">SCALE</span></li>
<li><span style="color:#fff">APPLE</span></li>
<li><span style="color:#fff">YINYANG</span></li>
<li><span style="color:#fff">WOMAN</span></li>
<li><span style="color:#fff">CAR</span></li>
<li><span style="color:#fff">STAR OF DAVID </span></li>
</ol>
</div>
I think the system accepts several answers, because I've typed "<span style="color:#fff">Glass</span>" instead of "<span style="color:#fff">Wine Glass</span>" for 66, and still gotten through.  So the answers you see here may or may not be the same as what you're seeing (and getting through correctly).  Take them for what they're worth ;)]]>
    </content>
</entry>

</feed>
