Sunday, June 1, 2014

Firefox: New tabs position

Before Firefox 3.6, new tabs were always opened at the far right of the browser. In Firefox 3.6, when you open a new tab from the current tab, the new tab is inserted next to the current tab.

After upgrading to Firefox 3.6, I noticed it preserved the old behavior for existing profiles. Only new profiles will default to the new behavior. Good intention but as I create new profiles, I now have different profile with different behavior, which is a little bit annoying.

Luckily this feature can be enabled/disabled with a few easy steps:
1. Go to about:config
2. Filter tabs.insertRelatedAfterCurrent
3. The default value is true. Change it to false if you want the old behavior


Ref:
Open Tabs At The Right [Firefox] | gHacks Technology News

Sunday, May 11, 2014

Win7: Setup DLNA media streaming with Windows Media Player 12

I was following this how-to guide to setup DLNA media streaming with Windows Media Player 12. I ran this a few issues and here is how I resolved them.


Problem 1: Cannot turn on media streaming
I was stuck at step 4, where it won't turn on the media streaming option. Clicking "Turn on media streaming" does nothing.


Solution:
1. Run services.msc
2. Start SSDP Discovery
3. Start UPnP Device Host


Problem 2: Cannot create HomeGroup
I was getting an error "A homegroup can only be created on a home network. To change your network location settings, open Network and Sharing Center in Control Panel." But I checked and confirmed I'm on a "home" network already.


Solution:
Turns out the error message is a little bit misleading. I think Windows was confused because I also have a VirtualBox Host-Only Network. I got a different error message after disabling it. Ultimately, I fixed the problem by enabling Internet Protocol Version 6 (TCP/IPv6) for my home network.



There are also a few things you should be aware:
1. Your network location must be set to Home (duh)
2. Only one homegroup is allowed on the network. If a homegroup already exists, you will be asked to join it.
3. The Peer Networking Grouping and HomeGroup Provider‌ services must be running
4. Windows Media Player 12 does not support streaming subtitles (i.e. *.ass files). I ended up using PS3 Media Server instead


Ref:
Cannot "Turn on media streaming" - another Windows 7 user with - Microsoft Community
Why can't I create a homegroup?
Can't create homegroup - Microsoft Community
Can't Create a homegroup - Windows 7 Help Forums

Sunday, May 4, 2014

DIY: Rekey a Schlage deadbolt

I recently learned how to rekey Schlage deadbolts. With a screw driver and a rekey kit (around $10), you can rekey a lock without calling a lock smith!

Rekey kit I used:
Prime-Line Products E 2402 Schlage Type C Re-Keying Kit, 5 Pin

It come with 3 keys and allow you to rekey up to 6 locks. It came with instruction as well, but video tutorials are extremely helpful
Re-Keying a Schlage Entry Knob and Deadbolt
How to Re-key a Schlage Deadbolt | Mr. Locksmith Video

According to Amazon customer Mr. H, "If you want to know if you have a 5 pin lock, count the number of depressions on your house key. There should be five."

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