I hereby claim:
- I am richardslater on github.
- I am richardslater (https://keybase.io/richardslater) on keybase.
- I have a public key ASB4g0VO17PTCu6I51OBo5Jy2TZh_LksBGxKZlNXndD2UQo
To claim this, I am signing this object:
public class X509CertificateRepository { | |
public IEnumerable<X509Certificate2> FindBySubjectName(StoreName storeName, StoreLocation storeLocation, string subject) { | |
var store = new X509Store(storeName, storeLocation); | |
store.Open(OpenFlags.ReadOnly); | |
var certificates = store.Certificates.Find(X509FindType.FindBySubjectName, subject, validOnly: false); | |
foreach (var certificate in certificates) { | |
yield return certificate; | |
} | |
store.Close(); | |
} |
public static class BulkEditCheckBoxExtensions | |
{ | |
public static MvcHtmlString BulkEditCheckBoxFor<TModel, TProperty>( | |
this HtmlHelper<TModel> htmlHelper, Expression<Func<TModel, TProperty>> expression) | |
where TModel : IBulkEditViewModel | |
{ | |
var metadata = ModelMetadata.FromLambdaExpression(expression, htmlHelper.ViewData); | |
var model = htmlHelper.ViewData.Model as IBulkEditViewModel; | |
var modelPropertyName = metadata.PropertyName; |
var accountName = Properties.Settings.Default.StorageAccountName; | |
var accountKey = Properties.Settings.Default.AccessKey; | |
var containerName = Properties.Settings.Default.ContainerName; | |
var blobName = Properties.Settings.Default.Blob; | |
var credentials = new StorageCredentials(accountName, accountKey); | |
var account = new CloudStorageAccount(credentials, useHttps: true); | |
var client = account.CreateCloudBlobClient(); | |
var container = client.GetContainerReference(containerName); |
$deployments = Get-AzureService | | |
Select-Object ServiceName | | |
Get-AzureDeployment | |
$instances = $deployments | | |
Select-Object ServiceName,Slot -ExpandProperty RoleInstanceList | |
$instances | | |
Select-Object ServiceName,Slot,RoleName | | |
Group-Object RoleName,ServiceName,Slot -NoElement | | |
Where-Object {$_.Count -gt 1} | | |
Select-Object Count,@{Name="RoleName"; Expression={$_.Name.Split(',')[0].Trim()}},@{Name="ServiceName";Expression={$_.Name.Split(',')[1].Trim()}},@{Name="Slot";Expression={$_.Name.Split(',')[2].Trim()}} | |
Get-AzureService | | |
Get-AzureRole -Slot Production -InstanceDetails | | |
ForEach-Object { | |
Get-AzureRemoteDesktopFile ` | |
-Name $_.InstanceName ` | |
-ServiceName $_.ServiceName ` | |
-LocalPath (Join-Path "C:\RDP" ($_.InstanceName + ".rdp")) | |
} |
# ************************************************************************************************* | |
# * Configure-CapacityMetrics * | |
# ************************************************************************************************* | |
# * Description: Configures Capacity metrics * | |
# * Author: Richard Slater <richard.slater@amido.co.uk> * | |
# * Date: 2013.02.02 * | |
# * Prerequisites: WAPPSCmdlets (https://www.windowsazure.com/en-us/manage/downloads/) * | |
# ************************************************************************************************* | |
Set-StorageServicePropertiesForAnalytics -ServiceName "Blob" -StorageAccountName "<Storage Account Name>" -StorageAccountKey "<Storage Account Key>" -MetricsEnabled -MetricsRetentionPolicyDays 7 -MetricsRetentionPolicyEnabl |
<!-- Azure Region: europewest --> | |
<add ipAddress="157.55.9.112" subnetMask="255.255.255.240" allowed="true" /> | |
<add ipAddress="157.55.12.0" subnetMask="255.255.255.240" allowed="true" /> | |
<add ipAddress="157.55.10.0" subnetMask="255.255.255.224" allowed="true" /> | |
<add ipAddress="157.55.10.32" subnetMask="255.255.255.224" allowed="true" /> | |
<add ipAddress="157.55.10.64" subnetMask="255.255.255.192" allowed="true" /> | |
<add ipAddress="65.52.128.0" subnetMask="255.255.224.0" allowed="true" /> | |
<add ipAddress="94.245.97.0" subnetMask="255.255.255.0" allowed="true" /> | |
<add ipAddress="137.116.192.0" subnetMask="255.255.224.0" allowed="true" /> | |
<add ipAddress="157.55.8.64" subnetMask="255.255.255.192" allowed="true" /> |
//This script enables underwater effects. Attach to main camera. | |
//Define variables | |
var underwaterLevel = 7; | |
//The scene's default fog settings | |
private var defaultFog; | |
private var defaultFogColor; | |
private var defaultFogDensity; | |
private var defaultSkybox; |
I hereby claim:
To claim this, I am signing this object:
function Test-Url($Target) { | |
$result = $null; | |
try { | |
$result = Invoke-Webrequest -Uri $Target -MaximumRedirection 0 -UseBasicParsing -ErrorAction SilentlyContinue | |
} catch {} | |
return $result | ` | |
Select-Object @{name='Result';expression={$mark}}, ` | |
@{name='Target';expression={$Target}}, ` | |
StatusCode, ` | |
@{name='Redirect';expression={if (($_.StatusCode -gt 300) -And ($_.StatusCode -lt 399)) { $result.Headers["Location"] } else { $null }}} |