Category Archives: Geeking Out

China Travel Tips, Part 1. Internet & Telephone

Local SIM or Int’l GSM Roaming

That is good question. If you’re going to be in China for 4 days or less, there’s not much point in hasseling with the local SIM card – since the process will probably take 3+ hours inluding: travel time, locating fairly priced SIM card dealer, installing card, verifying adaquate funds in prepaid account, subscribing for international dialing, and testing the process.

If you’re not going to use a local SIM card, you must make sure that International Roaming is active on your phone BEFORE you depart from your home country. Once you land in China, it’s too late. You’re phone won’t work, and it will be a fiasco to get in touch with your phone company.

Note that all GSM compatible phones contain interchangable GSM SIM cards. If your phone doesn’t have a SIM, then it’s not going to work when you’re roaming.

Unlocked Phones and Local SIMs

China is the biggest mobile phone market in the world, and the vast majority of thoese phones are unlocked, paid for directly by the end user, not subsidized by the carrier.

If you want to use a Chinese SIM card in your phone, you must make sure your

Mobile phone coverage is excellent in China, and prices are very reasonable. Even calling internationally via a Chinese SIM card to the USA is only 6¢/minute when you use a 5 digit IP dialing prefix.


Don’t do it. Seven years ago, when I first got to China, Skype worked great. It was hard to call overseas, but anyone could dial inbound via Skype-In, which I would forward to my China Mobile phone.

Then along came the Great Firewall. Every year, the Chinese Great Firewall gets more and more annoying, blocking more and more of the sites that you would like to access.

Now days, Skype is not reliable. Sometimes it works fine, usually for about 15-minutes, but then it drops and won’t reconnect properly for a half hour or more.

If you need to Video Conference while in China, you probably shouldn’t come – because your video conference probably won’t work.

If you just need to make some international calls while you’re here, then you are far better off using 12593 (China Mobile) or 10193 (China Unicom) “IP Call Extension” directly from your mobile phone. The connection will be clear and stable. It works nation wide. It doesn’t drop often, and if it does, you can reconnect quickly.

Ideal China Traveler Configuration

For people who need to stay connected to the world while traveling through China, the best solution is:

  1. Smartphone with Global Roaming from homeland carrier to receive incoming Int’l calls and text messages
  2. Unlocked phone (Smartphone or Feature Phone) with local SIM card from China Mobile or China Unicom
  3. 3G Access Point from China Unicom for Email access and Mobile Browsing via your Smartphone, Tablet and Laptop.
  4. Airport Express or other Ethernet based Hotspot for wireless access while you’re at the hotel or office.

Note that a 3G Card from China Mobile, valid for 3 months will provide 1.5GB of data nation wide. That’s enough for a few weeks of mobile email and mobile (smartphone and tablet) browsing. If you’re going to be trying to use IP telephony, watch any video, or download anything – you’ll blow through this 1.5GB in 2-3 days. Best off getting back to the hotel before downloading a lot.

Most battery powered 3G Access points use a single 1800 mAh battery, meaning you start using it at breakfast, and it’s dead just after lunch.

You combine #3 and #4 (3G hotspot, Ethernet hotspot with AC) with a long lasting 3600 mAh battery (2.5 x size of iPhone 4 battery) in the Sapido 3G/4G Mobile Hotspot available on Amazon for $70.

The Great Firewall

While you’re in China, accessing Twitter, Youtube, Facebook and Google will be cumbersome. If you’re not planning to travel to China frequently, it’s not worth wasting time setting up VPN access so that you can buypass the Great Firewall.

If you absolutely must access the unfiltered world while in China, you’ll need to purchase a VPN account that you can proxy your internet traffic through. These accounts can be installed on Smartphones and Laptop computers, but they are blocked frequently and very slow.

Just Google for “China VPNBEFORE you arrive in China to purchase a VPN account. They are usually around $20/month. Of course these sites are blocked from within China, so you’ll need to have the VPN configured before you arrive.

If you’re curious about the Great Firewall, James Fallows at The Atlantic wrote an excellent article called “Your Connection Has Been Reset“.

iPhone – Runner’s Best Friend

I’ve been running for years, but while running I’ve always had a few issues come up that are quite irritating:

  • It’s difficult to find a running partner with your same schedule and your same ability.
  • It’s easy to get bored while you’re running – unless you’ve got something to listen to
  • If you do try to run with headphones on, they continually fall out of your ears
  • It’s a lot of work to track your progress, and there’s not much sense of accomplishment.

Well, it seems that running with your iPhone is now the perfect sport 😉


First, the Sennheiser PMX 680i earphones hook over your ear, making them the first earphones to not fall out of my ears when running vigorously, the earphones also have an onboard control (volume, pause) and a microphone – just like the standard iPhone 4 headset.

Next, there is an iPhone App called “Jog Log” that supports multi-tasking the way you would expect, including some smart iTunes controls that also work exactly the way you would expect. There are lots of iPhone running Apps, but Jog Log actually lets you listen to your music, and even to pause and skip, but doesn’t get in the way.

Jog Log also gives your a “Ghost Partner” that you can use to train against. First, go into Settings / Audio Cues and turn ALL of the Audio Cues on. This way you get updates on your Average Pace, Current Pace, Target Pace and Heart Rate – typically every minute. You can adjust the Cue frequency if you like.


Then, go into Settings / Target Pace, and set the pace of your Ghost Runner Nemesis. As you’re running, you’ll get an updated every minute telling you how far you are ahead of (or behind) the Ghost Runner.

When using Jog Log, you get all the information you could want while you’re running, and you never need to actually look down at your iPhone until you get home and want to inspect the map of the run you just completed.

Last, there’s the DailyMile, which Jog Log integrates with, and will automatically pump your daily run results into. DailyMile keeps stats on how much you’ve run this week, this month, year-to-date, and lifetime – including maps of your runs, commentary and even blog posts if you like. DailyMile is a whole online community focused entirely around running.

Jog Log also has Heart Rate monitor integration, and lots of innovative Heart Rate related features in store. If you’ve got your own Heart Rate monitoring ideas, join in the discussion.

If you’re using this monitoring solution in Shanghai, be sure to fix your iPhone GPS first.

PPS: Peer-to-Peer Stream on Mac (via Virtualization)

UPDATE PPS releases official Mac version.

PPS recently released the first official Mac OS X version of PPStream. Mac OS X “.pkg” or “.dmg” installer packages are available. It’s probably easiest to just grab the installer here pps.dmg. Or you can directly visit the new PPS for Mac download page to view all available options.

Note that PPS is also available for iPad, iPhone, Android and Linux!!!

Way to go PPS team.

For reference, I’ve included the origional PPS vmware instructions below, but they are now obsolete.

Our last Mac OS X problem is the “U盾” for online banking “网上银行”. Even QQ works quite well on Mac OS X these days.

PPS (Peer-to-Peer Stream) a popular P2PTV service works like a Real Time version of BitTorrent, merging the Internet peers provided content into a local steam that’s read locally by Windows Media Player, Real Player, or another similar plugin.

If a user wishes to view a certain channel, the P2PTV software contacts a “tracker server” for that channel in order to obtain addresses of peers who distribute that channel; it then contacts these peers to receive the feed. The tracker records the user’s address, so that it can be given to other users who wish to view the same channel. In effect, this creates an overlay network on top of the regular internet for the distribution of real-time video content

PPS is only available for Windows. Fortunately, modern Mac computers are based on x86 architecture (same as a PC chip) and modern x86 CPUs have extensions optimizing them for Virtualization – allowing a Virtual OS inside your regular computer to run at nearly the same speed as any other applications. Both x86 Intel (Intel VT-x) and AMD (AMD-V) chips support such Virtualization, though all Mac’s use Intel chips due to Intel’s strength in low power, mobile computing such as the Intel-M.

There are currently FOUR Virtualization solutions that run on Mac OS X:

  1. Wine Open Source. Commercial “CrossOver” package $40: NO
  2. VirtualBox Open Source. Free: FULL SCREEN ONLY
  3. VMware Fusion Purchase $80, Upgrade $10, Free 30-day trail: YES – BEST
  4. Parallels Desktop for Mac Purchase $80, Upgrade $50, Free 14-day trial: YES – OK

Wine would be the most ideal way to run PPStream, as it emulates Windows without actually requiring your virtual machine to have Windows installed, but unfortunately PPStream isn’t compatible with either the OpenSource Wine or with CodeWeavers “CrossOver” commercial version of Wine.

VirtualBox is also free, and under some circumstances will allow you to run PPS, but there are some bugs when resizing the “Windows XP” screen on your Mac Desktop. If you ONLY run PPS full screen (and never run it as a background window), the VirtualBox is another fast, free way to run PPS on Mac OS X.

Parallels was the first virtualization package available for Mac OS X, but I’ve found VMware to be more stable and less frustrating over the long term, so I highly recommend VMware. There VMware vs Parallels wikipedia page seems to be run by the Parallels marketing department, but LowEndMac has an extensive VMWare vs Parallels article. VMWare Fusion works perfectly running PPStream, regardless of Single Window Mode, Full Screen Mode, Unity Mode, regardless if you are constantly resizing, or if you just use one screen size.

Google Maps in China: FIXED! (iPhone/iPad)

Google Maps works great in Beijing, but it has never worked accurately in Shanghai or many other parts of China. Countless requests to Google and Apple to fix the problem go unanswered, so we’re forced to take matters into our own hands.

You’ll need to Jailbreak your iOS device (which is completely legal), thereby installing Cydia.

Once you’ve got Cydia installed, open Cydia and choose “Manage” from the bottom menu, then choose “Sources”. Click the “Edit” button on the top right and then click the “Add” button on the top left. In the dialog box that comes up, enter the following address:

Click the “Add Source” button to continue, Cydia will verify the URL, then download a list of packages. Once that’s complete just press “Return to Cydia”, and on the top right of the Cydia window click “Done”.

Now, click on “MirrorDev” in your list of Sources, and choose “Location Fixed” from the list. Click the “Install” button on the top right.


After “Location Fixed” is installed, you’ll see a new entry in your Settings screen called “中国区地图校正” (China Map Correction”) that has two settings:

启动 (Activate) [On/Off]

联通版本(China Unicom Version) [On/Off]

Thanks to the developers at MirrorDev for doing what Apple and Google have consistently failed to do. Better yet, check out MirrorDev’s post about the Google Map Fix.


iTunes: Disable Backups / Enable Backups

iTunes does not provide an menu option for enabling or disabling backups, but you can manually update the iTunes preference file to do the trick. There is a preference called “DeviceBackupsDisabled”. If you do decide to disable backups on a regular basis, note that MOST of your data will automatically be synced to your phone — but your Text Messages are not synced outside of the normal iTunes Backup process.

To disable backups:

  1. Quit iTunes
  2. Open
  3. defaults write DeviceBackupsDisabled -bool true
  4. Open iTunes
  5. Sync

To enable backups:

  1. Quit iTunes
  2. Open
  3. defaults write DeviceBackupsDisabled -bool false
  4. Open iTunes
  5. Sync

Enjoy 🙂

Longest Gap without a Post…

I think this is the longest I’ve ever gone between regular blog posts. Someday I’ll have to explain why 😉

I’ve been getting ready to upgrade to IOS4.0, however IOS is inferior to Android unless you Jailbreak. Unfortunately, several of the jailbreak apps I rely on are still not yet compatible with IOS4. You can check out the full IOS4 Compatibility Chart, but the ones I’m concerned with are: * CallClear * Insomnia isn’t available for IOS4, but SBSettings has a replacement called “Keep Awake” that may due the trick for you. * iProtect * MyWi 4.0 (v3.52 no doesn’t work with IOS4) * Recent Call Delete (like Call Clear) doesn’t work with IOS4 * UDIDFaker * WeatherIcon * USB Drive

Hopefully I can get most of these worked out and install IOS4 sometime next week…

Run WordPress Locally. No need to modify the DataBase!

Simply add the following lines to your “wp-config.php” and you’ll be able to run your same WordPress code and use your same WordPress database on both your live server and your local development server.

function WP_LOCATION () {
    $script_path = realpath(dirname($_SERVER['SCRIPT_FILENAME']));
    $wp_base_path = realpath(dirname(FILE) . DIRECTORY_SEPARATOR . '..');
    $web_subfolder = substr( $script_path, strlen($wp_base_path)); 
    $wp_path = $web_subfolder ? substr( dirname($_SERVER['SCRIPT_NAME']), 0, -strlen($web_subfolder) ) : dirname($_SERVER['SCRIPT_NAME']) ;
    $retval = 'http' . ($_SERVER['HTTPS'] ? 's' : null) . '://' . $_SERVER['HTTP_HOST'] . $wp_path ;
    return $retval;

If you use BBpress, you can so something very similar, but edit the bb-config.php

function WP_LOCATION () {
    $script_path = realpath(dirname($_SERVER['SCRIPT_FILENAME']));
    $bb_base_path = realpath(dirname(FILE) . DIRECTORY_SEPARATOR . '..');
    $web_subfolder = substr( $script_path, strlen($bb_base_path));
    $retval = 'http' . ($_SERVER['HTTPS'] ? 's' : null) . '://' . $_SERVER['HTTP_HOST'] . $web_subfolder ;
    return $retval;
$bb->uri = WP_LOCATION();

I’ve updated the WordPress documentation under Running Development Copy of WordPress to note the discovery.

If manually running SQL updates make you feel happy and productive, then you may prefer running the manual database update on your local development system each time you copy the database off live. For your reference, the SQL command to do the trick is:

SELECT * FROM wp_options WHERE option_name = "home" OR option_name = "siteurl";
UPDATE wp_options SET option_value = "http://localhost/local_folder_name" WHERE option_name = "home" OR option_name = "siteurl";

Don’t forget to change local_folder_name to you’re actual local WordPress path. To make development simpler, I recommend updating your /etc/hosts and adding aliases for your local sites. For example: localhost XYZproject.local PDQproject.local otherProject.local

Then setup separate VirtualHosts for each of your projects, and access them with the alias defined in your hosts file.

Safari Session Management

Ever since Safari 3, the History Menu added “Reopen Last Closed Window” and “Reopen All Windows from Last Session”. The session information is stored inside ~/Library/Safari/LastSession.plist. When Safari crashes, the crash causing tab will typically be opened again, and Safari will crash again. Download the “LastSession” python script from radiotope to get a list of the Safari sessions that were last active.

For easiest use, download the LastSession python script, make it executable, and save it to your /usr/bin or /usr/local/bin folder:

chmod 755 ~/Downloads/
sudo mv ~/Downloads/ /usr/bin/lastsession

You can also use the Window/Merge All Windows command followed by Bookmarks “Add Bookmark for These 99 Tabs” to easily save you’re entire workspace.

Mac OS X Hints posted about creating “Time Machine” like Session History for Safari by storing version history of the ~/Library/Safari/LastSession.plist file. Version history can be combined with the “readsession” script to get an even longer list of URLs…

There are currently three session management options for Safari, all of which have been updated to work with Safari v4.0.

  • SAFT: InputManager plugin, SIMBL plugin, or Safari Launcher. $15.

    • Add bookmark folder here and add bookmark here in every bookmark menus
    • Save and load browser windows
  • Safari Stand: SIMBL plugin. Free.

    • Bookmark Shelf for visually managing multiple browsing sessions
    • Restore Last Workspace Window that is 100% crash proof
  • GLIMS: Free.

    • Re-open last session when Safari starts
    • Re-open tabs in single window
    • Undo Close Tab (CMD+Z)
    • Unfortunately, GLIMS “re-open last session” is only updated when Safari exits, so it doesn’t protect you when Safari crashes. GLIMS provides a ton of interesting options, primarily related to the Safari “Search Field”, but doesn’t do much in the way of Session Management.
  • Forget Me Not: SIMBL plugin. Open Source. Free.

    • Reload windows and tabs when you relaunch Safari
    • File / Unclose Window
    • Edit / Undo Close Tab
    • Forget Me Not is about making Safari easier to use, rather than specifically about managing your session in Safari.

Bottom line: The only plugin that really brings Saft session management to the next level is Saft.

To minimize Safari crashes, you can also use the excellent Click To Flash plugin, which has the pleasant side effect of forcing Youtube to play back in QuickTime rather than Flash.

Next project: Synchronize Safari sessions across multiple machines

The Case for iPad

I stayed up late to follow the iPad announcement via Twitter and the Gizmodo Live Blog. I talked with friends and read far too many online comments. The overall sentiment seems to be:

This can’t possibly replace a laptop or even a netbook. No Adobe Flash. No Multi-Tasking. No Camera.

For the people that really know how to Multi-Task, they should also be able to figure out how to Jail Break their iPad and use Kirikae or another multi-tasking app as many of us do on the iPhone right now.

Personally, I use Saft to disable Flash in Safari on my iMac, so I’m happy to avoid Flash on my iPhone and soon my iPad. Increasing the share of the internet who does not have Flash will hopefully force web designers to gradually abandon flash.

An expensive gadget in this economy that doesn’t replace better/faster/cheaper something I already think I need every day, and instead proposes to tell me there I things I didn’t think I needed that I now gotta have and

If it is bigger than pocketsized, it enters a class of “it doesn’t matter how much bigger than pocketsized, it might as well be WAY bigger since I have to carry it in a bag or under my arm.”

I’ve been using a MacBook Air as my primary computer for the last 2 years. Tasks like compiling software or running Photoshop are downright painful on the Air though. Fortunately, the iTab should be able to basically replace my Air on a daily basis: (Email, RSS, Books) and do so in a much more comfortable form factor than either my iPhone (screen is way too small) or my Air (how do you use it on the sofa? do you like looking like a geek at the airport?)

During these 2 years, I’ve basically had my Air with me every day, 24×7. Almost anytime I’m out, I’ve got my Air in my bag. At only 3 lbs, it’s been working great. However, getting almost the same resolution (30% less pixels) with 4x the battery life, half the weight, and for more adaptable to every day human life. Use it at the dinner table, sitting on the sofa, or standing and chatting with friends.

  iPadMacBook AirDifference
Height: 9.56 in (242 mm) 12.8 in (325 mm) 34%
Width: 7.47 in (189 mm) 8.94 in (227 mm) 20%
Depth: 0.5 in (13.4 mm) 0.76 in (19.4 mm) 44%
Weight: 1.6 lbs (0.73 kg) 3.0 lbs (1.36 kg) 100%
Resolution: 1024×768 1280×800 30%
Starting Price: $500 $1500 200%

RTM: Add Tasks via the Menu Bar

Using Web Applications is getting easier every day, but there’s generally not quite as convenient as desktop applications. The only two exceptions I’ve found so far are Remember The Milk for task management and Google Reader for my RSS feeds.

This evening I found a way to bring RTM one step closer to “Native Application” like performance – now I can simply press “CTRL+ALT+R” or click the cute “Cow” icon in my Menubar and immediately add tasks to my RTM account.

Screencast of the Process

(Note that the video has narration – be sure you’re sound is enabled)

  1. Download Fluid from
  2. Download the RTM Menubar Icon from Flickr
  3. Copy this URL

Once you’ve downloaded Fluid and the RTM icon from Flickr, open RTM and choose: * URL: * Name: RTM Add Task * Location: Applications * Icon: The Icon you downloaded from Flickr

After choosing create, go to the Application menu and choose Preferences, then select the “General” and select the Global Shortcut.

Next, go back to the Application menu and choose “Convert to MenuExtra SSB”, choose OK on the prompt, and you’re done.

The Next Internet Revolution – Coming Very Very Soon

For years browsers have included options for “User Defined Styles”, allowing users to define a custom style sheet. But recently there has been massive innovation in allowing website users to customize the underlying sites.

The core of this innovation is XML and CSS, which has succeeded in finally separating the content from the presentation of websites. This is for practical purposes fully realized. Now for the next revolution.

The Revolution: User Scripting Websites

When we visit YouTube, Google, NY Times, or any other website, we’re never quite satisfied. The site always could have been better. It could have been easier to navigate. It could have been less cluttered. It could have included some key feature that would have made the site so much more useful. Like every engineering problem, the solution has always been possible – but the cost has outweighed the value, so modification of websites has not been wide spread.

Greasemonkey/Userscripts are leading the way into a new future. It can be commercialized. This will be bigger than Peer-to-Peer. Bigger than BitTorrent. Once this is integrated into every frequently used browser (IE, Firefox, Safari, Opera) UserScripts will become as important as XML RPC is to the modern internet.

User Scripts allow users to customize the look of any given website to match their preferences. Moreover, User Scripts allow the customization of the way that the given website actually works! For example, want Google Reader to look more like iTunes?

Default Google Reader in Safari

Google Reader Customized with “Mac OS X Snow Leopard” User Skin

Want to download .MPEG4 videos directly from YouTube?

Default YouTube in Safari

YouTube Customized with YouTube Perfect

Not only does this provide the ability to download FLV or MPG4 videos directly from Safari, it provides the ability to automatically select “HD”, to turn off the “Auto-Start” and even to change the color of the buttons!

Want to get rid of all the adds on the page you’re reading and focus only the content in a big, pleasant to read font? Usually the only rescue is to hit the “Print” button and try getting a reasonable page.

However, thanks to the “Readability” experiment, you can save yourself from any website and just focus on what you want to read – in a style that is most comfortable on your eyes.

Consider how many people enjoy “tuning” cars? Adjusting the suspension, the exhaust system, the interior, the lighting. Look at how much people customize their icons, their desktops. Once you can customize the software that you use, online, in an easy way, it’s going to unleash a revolution unlike any that have been seen in traditional software development to date.

  1. Some customizations can be very efficient, saving users time or bandwidth
  2. Customizations can change the feel to match the needs of certain groups of users (teens, employees of a specific company, seniors, students at a specific university)
  3. The “cost” of customization will be much lower than what’s ever been seen in software because the changes are done automatically on the client side at runtime
  4. The scale of such customizations will be vast. Imagine if Windows, Office, and Internet Explorer were released as Free Open Source software in 2000 – we would have hundreds of different versions of each. This will be even bigger!

Working WordPress

I’ve been using WordPress for my blog for 5 years, and it’s been working great. Over that time, I’ve encountered some issues and have some suggestions for you.

I used Ecto for offline editing for a long time. It’s picture uploading, especially for Thumbnails is still superior to MarsEdit, but Ecto has bugs that haven’t been fixed for ages and no update has been released for over a year.

I used re-CAPTCHA to overcome the army of web robots automatically submitting comments on my Blog, but this makes posting a comment for normal people irritating. I recently switched to Antispam Bee and haven’t gotten any new SPAM.

Occasionally an army of bots will start a distributed attack on your WordPress blog hoping for a blog that hasn’t been patched to prevent security issues. I’ve found removing the “WordPress HTTP Header” has stopped many of the bots from even looking at my blog.

Roaming on China Unicom in Taiwan

If you are a China Unicom user roaming in Taiwan, and you want to contact a friend in Taipei who’s number is 999-888-777, To send a text message you have to use: +00886-999-888-777 but to make a phone call to the same friend you have to press +886-999-888-777. So, you’re address book is basically useless.

Int’l Text Message: + 00 [country code] [number]
Int’l Dialing while Roaming Overseas + [country code] [number]


我用了中国移动,用了快四年。从前没觉得好,但相对来说平稳。 为用3G服务我换到了中国联通。这个联通服3G服务的确很快,而186号码选择不错,但其它方面都没联通那么承受。


2)“12593″。如你得打国际电话,移动的12593非常优惠。联通的“10193”也不错,但是无法跟3G服务一起用,所以就能通过“17900的美加直通车”,但是这种每次打电话浪费30秒钟在输入电话号码,原来的12593不用等 - 就存号码在练习簿里。


4)国际长途加“+00”。这个很麻烦因为反对国际标准。国际标准电话号码是:+ 国家号 区号 本地号,但联通是“+00国家号”。所以,如同步你的电话簿到联通的手机,而也同步到移动或AT&T或其它公司的手机,永远无法同步。这个真麻烦。

Additionally, China Unicom has supposedly purchased 500,000 iPhones that it expects to resell to customers in China, but I don’t think this is possible with the pricing plan that they’ve created. See iPhone @ CHU.

For a 3GS that does not have Wifi and is locked to China Unicom, if you sign up for a 2 year contract, you can spend: 386元 ($56) or 586元 ($86) per month you can get an iPhone for 1799元 ($264) or 99元 ($15). However, there is a deposit of 5200元 ($794) or 6900元 ($1014).

Meanwhile, for a real 3GS iPhone from Hong Kong – the official Wifi Enabled “Apple Unlocked” version that you can use with China Mobile, China Unicom, or any other carrier on the planet is HK$ 5388 ($695 / 4747元).

Apparently the target is the “186元” per month, on a 2 year contract which gives you an iPhone for 3500元. If they could move the 225/month phone down to 1999元, I think they could move their target quota.

Without the change, I expect the grey market from Apple Hong Kong will take the most market share.