Monday, April 5, 2010

Adventures when moving to GIT

I’ve been on Git hub a few times but never actually set this up on my laptop.  Following some Open Source work with a group of friends I finally got the point to the solution.  Distribution of the repositories and the ability to pick and choose the areas you want to take into your own, was such a simple and effective way to share code I decided to adopt it for most of my local development.

I am however not the best with the command line interface so when I heard that the tortoise group had got together and created an integrated windows version, I had to give it a go.

Setup

Download the software from Google code and run the MSI file worked first time without any issue.  You will however need to restart your PC/Laptop following the installation.

image

Following an reset you’ll get some extra options in your stadard windows explorer.

Connection to an existing repository

I already had an existing GitHub repository so it was a simple matter of connecting up to this.  First create a folder on your drive (in my case I called it Development) on your C Drive.  Right click on the empty directory and select Git Clone.

Select the URL on git hub of the git file and project you want to connect too, in this case the NXMPP code project.

image

Click Ok.

image

All going well you can click Close and have a copy of the code on your PC.

image

Pushing a change

So supposing you’ve a change to make to this code, how can you get it back to the cloud repository?  I’ve made a very simple change to one of the tests to illustrate the changes in one file.

image

Here in explorer you can see that Git has realised that there was a change to one of the files.

image

Right click the file and select “Diff” will bring up the a description of the changes.

Now lets say that change needs to be placed back into the repository, simply right click the file or directory and select Git Commit.  This will place the code back into the repository.

I’m looking forward to getting more into this very simple and interesting product.

Thursday, April 1, 2010

Resetting the Admin password on a Windows 2003 VM when you forget what it was.

Today I had a problem remembering the Administrator password on a VM I had created a long time ago.  Although I had created another Admin level account for myself, the VM was not on the domain so I could not even use my own account.  Luckily some came to my rescue with his magic Linux boot file which can remove the password.

Step 1

Download the Offline NT Password & Registry Editor from their website.  I used version v080526 as v080802 did not seem to be working correctly.  Unzip the ISO file 080526.iso to your local drive.

Open up the instructions page on their site.

Step 2

Start your VM and mount the ISO file by right clicking on the icon on the bottom left of the screen and selecting “Capture" ISO Image”.

Now shut down and restart the VM.

Step 3

At this point you can follow the instructions page on the site or just do the following for a quick overview.

  1. Press <Enter> to select the first disk partition
  2. Press <Enter> to select the default configuration directory
  3. Press <Enter> to select option 1; “Password Reset”.
  4. Press <Enter> to select “Edit user data and password”
  5. Press <Enter> to select the “Administrator” username or enter which ever you wish
  6. Enter “1” for option “Clear (blank) user password” and press Enter.  There are other options available if needed.
  7. Enter “!” to quit
  8. enter “q” to quit
  9. enter “y” to write the changes to the disk
  10. Enter “n” to try again option.

Now unmount the ISO by right clicking the icon and selecting “Release 080526.iso” and restart the VM.  You should now be able to login without having a password.