This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$vms = Get-azurevm | ?{ $_.Status -eq "StoppedDeallocated"} | |
$jobs = @() | |
foreach ($vm in $vms) | |
{ | |
$params = @($vm.Name, $vm.ServiceName) | |
$job = Start-Job -ScriptBlock { | |
param($ComputerName, $ServiceName) | |
start-Azurevm -Name $ComputerName -ServiceName $ServiceName | |
} -ArgumentList $params | |
$jobs = $jobs + $job |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<GridView Grid.Row="1" ItemsSource="{Binding Popular}" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Wrapper for the cache factory to create a DataCache from Authentication token and discovery url | |
/// </summary> | |
/// <param name="token"></param> | |
/// <param name="discoveryurl"></param> | |
/// <returns></returns> | |
private DataCache CacheFactoryWrapper(string token, string discoveryurl) | |
{ | |
DataCacheFactoryConfiguration config = new DataCacheFactoryConfiguration(); | |
config.AutoDiscoverProperty = new DataCacheAutoDiscoverProperty(true, discoveryurl); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
configuration IISInstall | |
{ | |
node ("localhost") | |
{ | |
WindowsFeature IIS | |
{ | |
Ensure = "Present" | |
Name = "Web-Server" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
configuration IISInstall | |
{ | |
node ("localhost") | |
{ | |
WindowsFeature IIS | |
{ | |
Ensure = "Present" | |
Name = "Web-Server" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Get the open requests being handled by IIS | |
$req = Get-WebRequest | |
while ($req.Count -gt 0) | |
{ | |
#Wait if there are some | |
Write-Host "Waiting for request, current inflight: " $req.Count | |
Start-Sleep -Seconds 2 | |
#Check again for sessions | |
$req = Get-WebRequest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Configuration myChocoConfig | |
{ | |
$PackagesToInstall = @('foxitreader','spotify', 'git'); | |
Import-DscResource -Module cChoco | |
Node "localhost" | |
{ | |
cChocoInstaller installChoco |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var bandHelper = new BandReativeExtensionsWrapper(); | |
stream = await bandHelper.GetHeartRateStream(); | |
var hrSubscription = stream | |
.Buffer(new TimeSpan(0, 0, 10)) | |
.Select(x => | |
{ | |
var avg = x.Average(y => y.SensorReading.HeartRate); | |
return avg; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.Band; | |
using Microsoft.Band.Sensors; | |
using Microsoft.Band.Tiles; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Reactive.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using Windows.UI.Popups; |
OlderNewer