Thursday, April 3, 2014

Monday, December 9, 2013

Win7 x64: Chinese Hand Writing applet is missing in IME Pad


I'm using a Windows 7 x64 OS. As shown in the screenshot above, there is no Chinese Hand Writing applet for some reasons, so I have been using the Japanese one as a workaround...

Today, I finally decided to look into it. Surprisingly, I'm not alone. And luckily, Chris Wong has found a solution for us!


Solution:
1. Remove all Chinese keyboard

2. Open the Start menu

3. Type cmd -> Right click -> Run as administrator

4. Run the following command:
regsvr32 c:\Windows\System32\IME\IMETC10\applets\IMTCCAC.dll


5. Restart the computer

6. Add the Chinese (Traditional) - New Phonetic keyboard

7. Launch the IME Pad

8. Click on the app icon on the title bar -> Applet Menu -> Users Settings...

9. Hand Writing (CH) should now be available


Reference:
Chinese Handwriting Applet missing in IME Pad on 64-bit Windows 7 - Microsoft Community

Saturday, October 5, 2013

Git: Change the author info in your repository's history

Warning:
This action is destructive to your repository's history. It's best to do this on a clone, just in case. Also beware that this should not be performed on a repository that has been shared with others. Use at your own risk.

1. create a shell script in your repository, e.g gistfile1.sh
2. copy the following code
#!/bin/sh

git filter-branch --env-filter '

an="$GIT_AUTHOR_NAME"
am="$GIT_AUTHOR_EMAIL"
cn="$GIT_COMMITTER_NAME"
cm="$GIT_COMMITTER_EMAIL"

if [ "$GIT_COMMITTER_EMAIL" = "your@email.to.match" ]
then
    cn="Your New Committer Name"
    cm="Your New Committer Email"
fi
if [ "$GIT_AUTHOR_EMAIL" = "your@email.to.match" ]
then
    an="Your New Author Name"
    am="Your New Author Email"
fi

export GIT_AUTHOR_NAME="$an"
export GIT_AUTHOR_EMAIL="$am"
export GIT_COMMITTER_NAME="$cn"
export GIT_COMMITTER_EMAIL="$cm"
'

3. modify the names and emails to the appropriate values
4. execute the script


Ref:
Keeping your email address private · GitHub Help
Changing author info · GitHub Help
Remove sensitive data · GitHub Help
Setting your username in git · GitHub Help

Tuesday, September 17, 2013

Convert Mercurial to Git Repository

Prerequisite:
* MSysGit
* Python 2.7
* Mercurial for Python 2.7
* fast-export

Steps:
Execute the following in Git Bash:
cd ~
git clone git://repo.or.cz/fast-export.git
git init git_repo
cd git_repo
~/fast-export/hg-fast-export.sh -r /path_to_old_mercurial_repo
git checkout HEAD

Ref:
Converting Mercurial folder to a Git repository - Stack Overflow

Sunday, August 25, 2013

Android: This version of the application is not configured for billing through Google Play

Problem:
I followed the training class to setup the TrivialDrive sample for Google Play In-app Billing API Version 3. When I try to make a purchase, it shows

This version of the application is not configured for billing through Google Play. Check the help center for more information


Solution:
Sign your app with your release certificate.

Ref:
android - This version of the application is not configured for billing through Google Play - Stack Overflow

Saturday, July 13, 2013

GAE: Download your Google App Engine source files

1. navigate to your Google App Engine installation directory, e.g.
  C:\Program Files(x86)\Google\google_appengine
2. shift + right click -> Open command window here

3. run the following command:
  appcfg.py download_app -A <your_app_id> -V <your_app_version> <output-dir>

Note:
Only the developer who uploaded the code and the application owner(s) can download it

Ref:
Uploading, Downloading, and Managing a Python App - Google App Engine
Command-Line Arguments - Google App Engine
 

Sunday, June 30, 2013

Firefox: Rearrange profile order


Although the profile manager does not provide any UI options to rearrange the profiles, it can be changed easily by editing the config file.

1. close Firefox
2. browse to %AppData%\Mozilla\Firefox
3. open profiles.ini
4. rearrange the profiles by renaming the section, e.g. [Profile0], to the desired order