Monthly Archives: %sJuly 2014

Opinionated AngularJS styleguide for teams

Excellent article explaining different styles of writing angularjs modules, controllers: http://toddmotto.com/opinionated-angular-js-styleguide-for-teams/

By |July 24th, 2014|Coding|0 Comments

Using Azure Powershell to start and stop a VM

Using an Azure VM is a convenient way to test new software without having to corrupt your own terminal or using more resources for a virtual instance using Virtual Box, VMWare, etc.

As you may already know if a VM is stopped there are no charges for computing cost. However you will still incur a charge for the storage used by the VM (which is significantly less). Using a powershell script to manage the state of these VMs are helpful. I have the shutdown powershell script on a scheduler that runs nightly.

In order to use azure powershell you must do the following:

  • Install Azure PowerShell.
  • Connect to your subscription within Azure Powershell

Fortunately Microsoft has documented this process in an article located at: http://azure.microsoft.com/en-us/documentation/articles/install-configure-powershell

After installing feel free to try the following code (make sure to replace “MY_COMPUTER” with the name of your VM:

By |July 16th, 2014|Coding|0 Comments

Generating a certificate and private key using openssl

Sometimes you need to generate a quick certificate to test your app. Using openssl you can easily accomplish this, take a look at my example below:

Got a question? Send me a message on twitter: @tekguy

By |July 8th, 2014|Coding|0 Comments

Logging off WS-Federation by creating a wsignout1.0 message

Recently I integrated my web app with Azure ACS but was having a difficult time signing out of ACS (deleting my cookie off the .accesscontrol.windows.net server). The following code will create a wsignout1.0 message. Essentially it will construct a url with the action parameter set to “wsignout1.0”. An additional parameter “wreply” allows you to specify a url to redirect to after you have been signed out:

Got a question? Send me a message on twitter: @tekguy

By |July 5th, 2014|Coding|0 Comments