Sunday, June 14, 2015

Azure - Consuming Queue storage from .Net

Azure Queue storage is a service for storing large numbers of messages that can be accessed from anywhere in the world via authenticated calls using HTTP or HTTPS. A single queue message can be up to 64 KB in size, and a queue can contain millions of messages, up to the total capacity limit of a storage account.

Common uses of Queue storage include:
  • Creating a backlog of work to process asynchronously
  • Passing messages from an Azure Web role to an Azure Worker role
I have unit test driven repository on Github to show common uses of queue storage.

Saturday, June 13, 2015

IoT Hello World - Control LED using Raspberry Pi

I used my Raspberry Pi B+ model to control a Led just to quickly see how easy or difficult it was. It turned out to be pretty straightforward once you have the hardware thins required.

  1. A two pin Led
  2. Two wires 
After i installed Raspebian on the Pi using the standard guide that i have got. I installed WiringPi from

For reference to GPIO pin layout, i referred Connect long leg (+ve) of the LED to pin 11 (GPIO 0) and connect short leg (-ve) to any Ground (I connected to pin 6).

Note that you should also use a resistor on the ground wire to limit the amount of current being passed to the LED otherwise it might damage your LED or even the board. I learnt that usually that happens if you are going to use it for prolonged time but for my 2 sec demo it did not cause any issue without resistor. So do at your own risk.

GPIO pins can be programmatically controlled to be in either input or output mode. I saw that most of them are IN by default. I ran following to see pins status.

gpio readall

See that pin Gpio 0 is in IN mode. Change its mode to OUT as follows-

gpio mode 0 out

Now you are ready to turn on/off the light. Use the following two commands.

For turning on the light - 

gpio write 0 1

For turning off the light

gpio write 0 0

Saturday, June 06, 2015

Installing node on Raspberry PI

Add repository to PI's sources

curl -sLS | sudo bash

Install latest node

Tuesday, June 02, 2015

Save nuget feed credentials

When working we custom Nuget feeds that require authentication, Visual Studio keeps prompting for user name and passwords and you are not able to save the password. This is really frustrating. You can run following command to save your credentials to the nuget.config file.

nuget sources update -name "My Feed Name" -source "" -UserName "dev\sanjay" -Password "password"

Ensure that you have nuget.exe downloaded and your PATH variable is updated with its directory. You can download nuget.exe from following location.

This command updated the machine wide config which is located at %APPDATA%\NuGet\NuGet.Config