GitHub Tips


, ,

  1. Config GitHub with Putty/Pageant
    1. Install Putty from here, run PuTTY.exe and create a new SSH session to “’ and save it
    2. run putty.exe -> In the “host name” field type . In the “Saved Sessions” field, give it the name and click “Save” -> Click on the “Open” button and accept the server cert.(Very important step to accept the server cert)
    3. Run PUTTYGEN.EXE generate a pair of public/priviate key pair, put your email to key comment field, copy the public key content to a text file(like ‘yourpublickey.txt’), save the private key to a text file(like ‘yourprivatekey.ppk’) at the same folder(like: c:\ssh)
    4. Click Conversation menu and choose Export OpenSSH key as “%userprofile%\.ssh\id_rsa“, save the public key as “%userprofile%\.ssh\
    5. Create a shortcut of Pageant.exe with parameter like this: ‘C:\Putty\PAGEANT.EXE c:\ssh\yourprivatekey.ppk’
    6. Run the Pageant.exe shortcut, load the ‘yourprivatekey.ppk’ file, the pageant should be run successfully with a system tray icon
    7. Install git from here, in my case, with the following configuration choices:
      • Select components window: choose all defaults
      • Adjusting your PATH environment window: Run Git and included Unix tools from the Windows Command Prompt(which by using all cygwin tools)
      • Choosing the SSH executable window: Use (tortoise) Plink and indicate the PLINK.EXE path
      • Configuring the line ending conversions window: Checkout as-is, commit as-is
    8. Sign up a new account at or sign in with your existing account, add ssh-key by using the content of ‘yourpublickey.txt’
    9. Now open ‘git bash'(Which installed at step E), and you should be able to run all git commands now
  2. GitHub Tips
    1. Review last commit in current branch
      1. git show -1
      2. git log -1

Very useful windows shortcuts which can run from command line or explorer


Run commands

Calc – Calculator
Cfgwiz32 – ISDN Configuration Wizard
Charmap – Character Map
Chkdisk – Repair damaged files
Cleanmgr – Cleans up hard drives
Clipbrd – Windows Clipboard viewer
Cmd – Opens a new Command Window (cmd.exe)
Control – Displays Control Panel
Dcomcnfg – DCOM user security
Debug – Assembly language programming tool
Defrag – Defragmentation tool
Drwatson – Records programs crash & snapshots
Dxdiag – DirectX Diagnostic Utility
Explorer – Windows Explorer
Fontview – Graphical font viewer
Ftp – ftp.exe program
Hostname – Returns Computer’s name
Ipconfig – Displays IP configuration for all network adapters
Jview – Microsoft Command-line Loader for Java classes
MMC – Microsoft Management Console
Msconfig – Configuration to edit startup files
Msinfo32 – Microsoft System Information Utility
Nbtstat – Displays stats and current connections using NetBios over TCP/IP
Netstat – Displays all active network connections
Nslookup – Returns your local DNS server
Odbcad32 – ODBC Data Source Administrator
Ping – Sends data to a specified host/IP
Regedit – registry Editor
Regsvr32 – register/de-register DLL/OCX/ActiveX
Regwiz – Reistration wizard
Sfc /scannow – Sytem File Checker
Sndrec32 – Sound Recorder
Sndvol32 – Volume control for soundcard
Sysedit – Edit system startup files (config.sys, autoexec.bat, win.ini, etc.)
Systeminfo – display various system information in text console
Taskmgr – Task manager
Telnet – Telnet program
Taskkill – kill processes using command line interface
Tskill – reduced version of Taskkill from Windows XP Home
Tracert – Traces and displays all paths required to reach an internet host
Winchat – simple chat program for Windows networks
Winipcfg – Displays IP configuration

Management Consoles

certmgr.msc – Certificate Manager
ciadv.msc – Indexing Service
compmgmt.msc – Computer management
devmgmt.msc – Device Manager
dfrg.msc – Defragment
diskmgmt.msc – Disk Management
fsmgmt.msc – Folder Sharing Management
eventvwr.msc – Event Viewer
gpedit.msc – Group Policy -XP Pro only
iis.msc – Internet Information Services
lusrmgr.msc – Local Users and Groups
mscorcfg.msc – Net configurations
ntmsmgr.msc – Removable Storage
perfmon.msc – Performance Manager
secpol.msc – Local Security Policy
services.msc – System Services
wmimgmt.msc – Windows Management

Control Panel Shortcuts

access.cpl – Accessibility Options
hdwwiz.cpl – Add New Hardware Wizard
appwiz.cpl – dd/Remove Programs
timedate.cpl – Date and Time Properties
desk.cpl – Display Properties
inetcpl.cpl – Internet Properties
joy.cpl – Joystick Properties
main.cpl keboard – Keyboard Properties
main.cpl – Mouse Properties
ncpa.cpl – Network Connections
ncpl.cpl – Network Properties
telephon.cpl – Phone and Modem options
powercfg.cpl – Power Management
intl.cpl – Regional settings
mmsys.cpl sounds – Sound Properties
mmsys.cpl – Sounds and Audio Device Properties
sysdm.cpl – System Properties
nusrmgr.cpl – User settings
firewall.cpl – Firewall Settings (sp2)
wscui.cpl – Security Center (sp2)

Windows Environment Commands

%ALLUSERSPROFILE% – Open the All User’s Profile
%HomeDrive% – Opens your home drive e.g. C:\
%UserProfile% – Opens you User’s Profile
%temp% Opens – temporary file Folder
%systemroot% – Opens Windows folder

Wupdmgr – Takes you to Microsoft Windows Update

If Microsoft Office installed:

winword – Microsoft Word
excel – Microsoft Excel
powerpnt – Microsoft PowerPoint
msaccess – Microsoft Access
outlook – Microsoft Outlook
ois – Microsoft Picture Manager

Credit belongs to: this post from superuser

Microsoft Pairwise Testing Tool: PICT


, , ,

When a massive conditions combined together and impossible to test all combinations, there is a testing method called pairwise testing(also known as All-pairs testing) we can use to test these possible combinations in a certain way.

In order to test all-paired combinations, we need to have a tool to generate the test data, by far my favorite tool is Microsoft PICT command line tool, and here is an article introduced the concept very clearly

This is a light-weight all pairs generating tool and it’s pretty easy to use, only for windows platform though.

Unable to start VirtualBox after upgraded from 4.1.12 to 4.2.18


, , , ,

I have a Ubuntu virtualbox vm which is on virtualbox version 4.1.12, today I have upgraded to the newest version 4.2.18, and then the vm won’t be able to start, check the VBoxSVC.log(at “%HOMEDRIVE%%HOMEPATH%\.VirtualBox\” found out the following errors like:

ERROR [COM]: aRC=VBOX_E_OBJECT_NOT_FOUND (0x80bb0001) aIID={29989373-b111-4654-8493-2e1176cba890} aComponent={Medium} aText={Property ‘Special/GUI/Hints’ does not exist}, preserve=false

Dig the internet a little bit, seems related to the Guest Additions, revert the vm to previous saved snapshot(which still works), upgrade the Guest Additions from 4.1.12 to 4.2.8, reboot, the vm works again

Cool website( can transfer regex to graphic chart


, ,

I used to create a test case related a US SSN text field data validation, there is a Regex(Regexp or Regular Expression):

"^(?!000)([0-6]\d{2}|7([0-6]\d|7[012]))([ -]?)(?!00)\d\d\3(?!0000)\d{4}$"

which defined the input validation, I figured it out at the beginning, but after one month later when I look back the documentation, there is only “!@#$%%^” in my head.

And here is a very cool site ( could transfer the Regex to a much easier understandable graphic chart like this:


Update: forgot to mention, the expression need to be in JavaScript style

Export Google Reader feeds Step by Step


, , , , , , , , , ,

I guess everyone already knew that Google Reader Service will be terminated by July, so I just created this step by step instructions to export all my feeds for backup through Google Takeout service(hope this one won’t be terminated :P)

Here it is:

  1. Navigate to Google Reader SettingsGoogle Reader Export Feeds Step by Step 01
  2. Select “Import/Export” tab, then choose “Download your data through Takeout”Google Reader Export Feeds Step by Step 02
  3. Then will be redirected to takeout page with reader data generatingGoogle Reader Export Feeds Step by Step 03
  4. Wait the process reach 100%, then click “Create Archive”Google Reader Export Feeds Step by Step 04
  5. Now the Reader data can be downloaded as a zip fileGoogle Reader Export Feeds Step by Step 05
  6. The zip file should include all reader data you haveGoogle Reader Export Feeds Step by Step 06

Now you’ll be able to import your reader feeds to an alternative like feedly

Selenium Tips


, ,

Mark a few Selenium tips:

  1. Generate and Store current date in “YYYYMMDD” format

    And the javascript code is here:

    javascript{ d=new Date(); d.getFullYear().toString()+((d.getMonth()+1)<10?"0"+(d.getMonth()+1).toString():(d.getMonth()+1))+(d.getDate()<10?"0"+d.getDate().toString():d.getDate().toString()); }
  2. Override Untrusted SSL Self Certificates

Config sharing clipboard between guest Ubuntu 13.04 (Raring Ringtail) and host Windows 2008 R2


, ,

After finished installation of Ubuntu 13.04(Raring Ringtail) in VirtualBox, found out that by default the clipboard is not shared between the host(Windows Server 2008 R2) and the guest(Ubuntu 13.04 Raring Ringtail)

Here are the fix steps:

  1. In VirtualBox guest window, navigate to: Devices -> “Install guest additions…”, finish the installation
  2. Now navigate to: Machine -> Settings -> General Tab -> Advanced tab -> Now should appear “Shared Clipboard” option, select “Bidirectional”, click “OK”

Now should be able to copy/paste text between the guest and the host

Add Customized Workitem(like: Change Request) to Requirement Category in Team Foundation Server 2012


, , , , , ,

By default, After you created a project in Microsoft Team Foundation Server 2012, “Requirement Categor” only contains “User Story” as its member, then when you attempt to “Add existing requirements to a test plan”, only the “User Story” workitem will be acceptable.

In most case, when there is Change Request issued to the team, QA will need to have test case associated with it as well, which expect to add Change Request as requirement and can be added to a test plan.

We can achieve this by the following steps(need to obtain TFS administration permission first):

  1. Export Work Item Type Categories to a xml file:
    run the following command form “Developer Command Prompt for VS2012”:

    c:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE>witadmin exportcategories /collection:http://TFSServer:8080/tfs/yourcollection /p:myproject /f:myproject-original.xml
  2. Modify the xml file and add Change Request as member of Requirement Category, which should like this:
    <CATEGORY name="Requirement Category" refname="Microsoft.RequirementCategory">
      <DEFAULTWORKITEMTYPE name="User Story"/>
      <WORKITEMTYPE name="Change Request"/>

    and save the modified xml as “myproject-modified.xml”

  3. Import the modified Work Item Type Categories xml file back to the project:
    C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE>witadmin importcategories /collection:http://TFSServer:8080/tfs/yourcollection /p:myproject /f:myproject-modified.xml

Restart your Test Manager 2012, you should be able to add Change Request to a test plan now

Reference: Customize the Categories for Work Item Types [witadmin]