I hereby claim:
- I am tjrobinson on github.
- I am tjrobinson (https://keybase.io/tjrobinson) on keybase.
- I have a public key ASCdJ2JCJnqEf8zJZNdzNMrDgIlwjDMoviRhipP0YE0NuQo
To claim this, I am signing this object:
// @nuget: Moq.AutoMock -Version 2.3.0 | |
using System; | |
using Moq; | |
using Moq.AutoMock; | |
public interface IMyService | |
{ | |
string GetValue(); | |
} |
10 PRINT "HELLO" |
I hereby claim:
To claim this, I am signing this object:
Add-Type -AssemblyName System.IO.Compression.FileSystem | |
$TEMP = $([environment]::GetEnvironmentVariable("TEMP", "User")) | |
$CWD = $(Split-Path $MyInvocation.MyCommand.Path) | |
$PATH = $([environment]::GetEnvironmentVariable("PATH", "User")) | |
$git_folder = "C:\Program Files\Git" | |
$git_bin_folder = "$($git_folder)\bin" | |
$tmp_folder = "$($TEMP)\$([guid]::NewGuid())"; |
# Set environment variables for Visual Studio Command Prompt | |
# Based on: http://stackoverflow.com/questions/2124753/how-i-can-use-powershell-with-the-visual-studio-2010-command-prompt | |
$version=14 | |
pushd "c:\Program Files (x86)\Microsoft Visual Studio ${version}.0\Common7\Tools" | |
cmd /c "vsvars32.bat&set" | | |
foreach { | |
if ($_ -match "=") { | |
$v = $_.split("=") | |
set-item -force -path "ENV:\$($v[0])" -value "$($v[1])" | |
} |
function Install-PsGet { | |
$Destination = "C:\Windows\System32\WindowsPowerShell\v1.0\Modules" | |
New-Item -Path ($Destination + "\PsGet\") -ItemType Directory -Force | Out-Null | |
Write-Host 'Downloading PsGet from https://github.com/psget/psget/raw/master/PsGet/PsGet.psm1' | |
$client = (New-Object Net.WebClient) | |
$client.Proxy.Credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials | |
$client.DownloadFile("https://github.com/psget/psget/raw/master/PsGet/PsGet.psm1", $Destination + "\PsGet\PsGet.psm1") | |
Write-Host "PsGet is installed and ready to use" -Foreground Green | |
} |
# get indexes in "logstash" alias | |
$indexes = Invoke-RestMethod "http://localhost:9200/logstash/_settings" | |
# get the names of the indexes | |
$indexNames = Get-Member -InputObject $indexes -MemberType NoteProperty|%{$_.Name} | |
# foreach index check its age. If over 10 days, delete it | |
$indexNames|sort |%{ | |
$datePart = $_.Substring(9) | |
$indexAge = [datetime]::UtcNow.Date.Subtract([DateTime]::Parse($datePart)).Days |
Split-Path -parent $dte.Solution.FileName | cd | |
New-Item -ItemType Directory -Force -Path ".\licenses" | |
@( Get-Project -All | | |
? { $_.ProjectName } | | |
% { Get-Package -ProjectName $_.ProjectName } ) | | |
Sort -Unique | | |
% { $pkg = $_ ; Try { (New-Object System.Net.WebClient).DownloadFile($pkg.LicenseUrl, (Join-Path (pwd) 'licenses\') + $pkg.Id + ".html") } Catch [system.exception] { Write-Host "Could not download license for $pkg" } } |
using System; | |
using System.Collections.Generic; | |
using System.DirectoryServices.AccountManagement; | |
using System.Linq; | |
using System.Security.Claims; | |
using System.Threading.Tasks; | |
using Thinktecture.IdentityServer.Core; | |
using Thinktecture.IdentityServer.Core.Models; | |
using Thinktecture.IdentityServer.Core.Services; |
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel.DataAnnotations; | |
using System.Linq; | |
using BrockAllen.MembershipReboot; | |
namespace Acme.Users.MembershipReboot | |
{ | |
public class AcmeUserAccountService<TAccount> : UserAccountService<TAccount> |