6 May, 2010 | Category: Tips and Tricks
Windows Server 2008 R2 does not ask for a CD key in setup, and it can be run for 30 days for free before needing to be active. You can continue to use it after 30 days trial but the system will reboot every 2 hours and run with reduced functionalities.
If you really want to evaluate or run testing on a server with Windows Server 2008 R2 installed. There are two workarounds.
Re-arm windows
Type in the following from an elevated command prompt:
slmgr.vbs –rearm
This will reset the activation expiration and the machine is good for another 30 days. You can do this up to 3 times and get 120 days free trial in total.
Read more »
Tags: Activation, Windows How to, Windows Server 2008 R2
4 May, 2010 | Category: Tips and Tricks
If you are thinking about installing Hyper-V on laptop, you need to put following into consideration. Some of Hyper-V’s design will limit laptop’s functions, these limitation are reasonable for a server operation system but would be a pain when you consider installing Hyper-V on a laptop.
You cannot connect a virtual network to a wireless network adapter
As a result, you cannot provide wireless networking capabilities to virtual machines. if you mainly use wireless NIC or all communication between the VM and the outside world would have to be through the Wireless NIC, this will turn out to be a great deal.
Power-saving features are disabled after Hyper-V role is enabled
Read more »
Tags: Hyper-V, Virtualization
27 April, 2010 | Category: Development, Productivity Tools, Tips and Tricks, Tutorial
CopySourceAsHtml is an add-in for Microsoft Visual Studio 2008 that allows you be able to quickly get your code as HTML from Visual Studio, just like being able to save it as a HTML file from the Save As dialog. It’s very helpful if you frequently post code to blog or send code in email.
I recently switched to Visual Studio 2010 and noticed this plug in is not ready for Visual Studio 2010 yet. Here is how you can get it work for Visual Studio before CopySourceAsHtml owner releases an official update to support Visual Studio 2010.
Read more »
Tags: Code, Tools, Visual Studio
16 April, 2010 | Category: Tips and Tricks
System tray icon reappears every time OneNote is started, how to turn it off?
Turn off OneNote System Tray Icon
Go to File, click options, and then click display tab, uncheck Place OneNote Icon in the Notification Area of the Taskbar.
Note: Turn of OneNote icon in taskbar also turn off OneNote Snap Tool, if you wish to use Windows key + S to bring up OneNote Snap Tool to capture screenshot, you will need to have option Place OneNote Icon in the Notification Area of the Taskbar marked.
Update 5-22 The equivalent in OneNote 2007 is Go to Tools, and click Other and then uncheck Place OneNote Icon in the Notification Area of the Taskbar
Turn on OneNote System Tray Icon
Change Place OneNote Icon in the Notification Area of the Taskbar option back to marked will get OneNote System Tray Icon back.
Tags: Office, OneNote
27 March, 2010 | Category: Development, Tips and Tricks, Tutorial
Dead code means block of code that is not reachable in application. They can cause noisy in code debugging and confuse developers. Sometimes I might spend a few hours to figure out why a breakpoint never hit.
Most of code defect is result of old function no longer used and referenced. Remove them will prevent developers from wasting time investigating wrong code. Thanks to FxCop in visual studio, now finding dead code is pretty straight forward. Read more »
Tags: Code Analysis, Development Resources, Visual Studio
25 March, 2010 | Category: Tips and Tricks
From the command prompt on your machine launch an RDP connection using: mstsc /span
This works on VISTA/WIN7. If you have a Win2K3 machine you need have Terminal Services Client 6.0 installed. You can download it here.
It’s recommended all monitors in your multi-monitor configuration be set to the same resolution.
Tags: Remote Desktop, Tips, Tools
22 March, 2010 | Category: Development, Tips and Tricks
This note is for a few quick ways to delete all blank lines from a text file.
- sed ‘/^$/d’ file > file_new
- grep -v "^$" file > file_new
- (This is for Notepad++ users) Select all text (shortcut Ctrl+A) and then click Menu TextFX -> TextFX Edit -> Delete Blank Lines

Tags: Notepad++, Tips
14 March, 2010 | Category: Tips and Tricks, Tutorial
After setup local WordPress environment, WordPress will generate a password for admin logon. The password is so strong that forget the password can easily happen. The easiest way to get admin password back is reset it again in database.
Here is the SQL command that will do it:
UPDATE ‘wp_users’ SET ‘user_pass’ = MD5(‘PASSWORD‘) WHERE ‘user_login’ =’admin’ LIMIT 1;
Note you need update red PASSWORD to the real password you want reset.
After the command succeeds, you will be able to login to WordPress with new password.
Tags: Tips, WordPress
1 March, 2010 | Category: Development, Tips and Tricks
Getting the current working directory
cd /d %~dp0
Comment: %0 is the name of the batch file. ~dp gives you the drive and path.
Tags: Batch Scripts, Command line, Tips
17 February, 2010 | Category: Tips and Tricks
Control panel applets (.CPL) is a shortcut to launch administrator tools quickly.
These are some that used frequently after new OS is setup.
- intl.cpl – Regional and Language Options
- timedate.cpl – Date and Time Properties
- inetcpl.cpl – Internet Properties
- ncpa.cpl – Network Connections
- powercfg.cpl – Power Options Properties
Tags: Command line