11.27.2012

git differencing

i can never remember these, and unfortunately i don't use git often enough to adequately drill it into my head.

To get a name and status difference of what changed between two branches, use this:

git diff --name-status master..branch

To compare two files from different branches, use this:

git difftool branch1:file branch2:file

11.16.2012

Windows 7 64 laptop not entering sleep


I was having trouble with my laptop not going to sleep after the time setting in power options.  After some search, I read that running a power usage report might help identify the problem.

Running the following command from an Administrator shell:

powercfg -energy -output %USERPROFILE%\Desktop\Energy_Report.html

pointed out my audio card was making system requests such that sleep would never trigger.  I updated the drivers on my card and the audio card is no longer holding up the sleep timer.

11.13.2012

symbolic links on NTFS

I had no idea NTFS supported symbolic links.  I know there are shortcuts, but these aren't the same as full blown symlinks.  The reason I thought this is because anytime I tried to ln -s in my Ubuntu VM on a directory that was shared with windows, I'd always get:

ln: failed to create symbolic link './link': Operation not supported.

I was expressing my frustrations to a co-worker who mentioned the mklink command in windows.  Sure enough, minimizing my VM and launching CMD I was able to use mklink to create a symlink in the directory I wanted.  The VM sees it as a regular directory but thats ok for my purposes.  The syntax is a bit different than the posix command ln:

mklink /D <link_name> <link_target>

for directories or

mklink <link_name> <link_target> 

for files.

11.09.2012

Installation of MySQL hangs when 'starting service' during instance configuration

Re installing MySQL is a giant pain in the neck.  Make sure all previous instances of MySQL are completely off the machine.  For windows this means registry entries, service entries, install locations under Program Files, and temporaty application data under Users\...\AppData\MySQL.

Use the System Event Log on Windows to help troubleshoot installation hangs.

Clearing the registry and removing all traces of MySQL resulted in a clean installation.

11.08.2012

Determine which IIS sharepoint process is which

Sharepoint uses IIS pooled application processes to do its bidding.  Unfortunately, these all show up as w3wp.exe in taskmanager which makes killing or attaching to the right process a bit like russian roulette.

To see a nice list of all sharepoint related processes, use the following command:
C:\Windows\System32\inetsrv>appcmd list wp

This will display a nice description of all the IIS processes including the sharepoint instance that is bound to port 80.  The output of this command lists the process' PID so just use that when killing or attaching with a debugger.


11.06.2012

Deploying Sharepoint Project from Visual Studio 2010 results in "Error: Object reference not set to an instance of an object."

When trying to deploy a Sharepoint 2010 project from Visual Studio 2010 I got the error: "Error: Object reference not set to an instance of an object" immediately with no other output in the build window.  Increasing the verbosity of the build output didn't help.

Turns out this was because I didn't have Package directory checked into subversion.  Adding this directory and the files underneath it (Package.package and Package.Template.xml) and svn updating my projected fixed the issue.