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
public static class BatchEnumerableExtensions | |
{ | |
public static IEnumerable<IList<T>> InBatchesOf<T>(this IEnumerable<T> items, int batchSize) | |
{ | |
var batch = new List<T>(batchSize); | |
foreach (var item in items) | |
{ | |
batch.Add(item); |
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
{ | |
// Use IntelliSense to find out which attributes exist for C# debugging | |
// Use hover for the description of the existing attributes | |
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": ".NET Core Attach", | |
"type": "coreclr", | |
"request": "attach", |
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
$BaseDir = "c:\k" | |
cd $BaseDir | |
$computerInfo = Get-ComputerInfo | |
$windowsBase = if ($computerInfo.WindowsVersion -eq "1709") { | |
"microsoft/nanoserver:1709" | |
} elseif ( ($computerInfo.WindowsVersion -eq "1803") -and ($computerInfo.WindowsBuildLabEx.StartsWith("17134")) ) { | |
"microsoft/nanoserver:1803" | |
} else { | |
# This is a temporary workaround. As of May 2018, Windows Server Insider builds still report 1803 which is wrong. |
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
#/bin/bash | |
bucketname="node-configs" | |
bucketId=`storj list-buckets | grep "Name: $bucketname" | awk '{ print $2}'` | |
bucketfiles=`storj list-files "$bucketId"` | |
for file in * | |
do | |
echo $file |
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
param( | |
[Parameter(Mandatory = $true)] | |
[string] $csprojPath, | |
[Parameter(Mandatory = $true)] | |
[string] $newVersion | |
) | |
Write-Host "Starting process of generating new version number for the csproj" |
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
ipmo PKI | |
$name = [GUID]::NewGuid() | |
$cerFile = "$env:TEMP\$name.cer" | |
$certs = Get-ChildItem Cert:\LocalMachine\My -DnsName localhost -SSLServerAuthentication | ? {($_.FriendlyName -eq 'IIS Express Development Certificate') -and ($_.SignatureAlgorithm.FriendlyName -ieq 'sha256RSA') -and ($_.EnhancedKeyUsageList.Count -eq 1)} | |
if ($certs.Count -eq 0) | |
{ | |
Write-Error 'Cannot find any SHA256 certificate generated by IIS Express. Please make sure that the latest version of IIS Express is installed.' | |
} | |
else | |
{ |
This file has been truncated, but you can view the full file.
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
[18C8:18E8][2014-09-06T15:02:33]i001: Burn v3.7.3117.0, Windows v6.3 (Build 9600: Service Pack 0), path: C:\Users\Elan\Downloads\VS2013.3.exe, cmdline: '' | |
[18C8:18E8][2014-09-06T15:02:33]i000: Initializing string variable 'EditionDisplayName' to value '#loc.vsupdatededitiondisplayname' | |
[18C8:18E8][2014-09-06T15:02:33]i000: Initializing string variable 'FactorMsi' to value '1.3' | |
[18C8:18E8][2014-09-06T15:02:33]i000: Initializing numeric variable 'MoreLanguageFwlinkId' to value '376932' | |
[18C8:18E8][2014-09-06T15:02:33]i000: Initializing numeric variable 'PrivacyAgreementFwlinkId' to value '376910' | |
[18C8:18E8][2014-09-06T15:02:33]i000: Initializing numeric variable 'PrivacyStatementFwlinkId' to value '376910' | |
[18C8:18E8][2014-09-06T15:02:33]i000: Initializing numeric variable 'MinOsLevelFwlinkId' to value '376920' | |
[18C8:18E8][2014-09-06T15:02:33]i000: Initializing numeric variable 'SolutionFwlinkId' to value '376911' |
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
Task flushingTask = null; | |
public override Task FlushAsync(CancellationToken cancellationToken) | |
{ | |
Interlocked.CompareExchange( | |
ref flushingTask, | |
Task.Delay(200, cancellationToken).ContinueWith( | |
async (t) => | |
{ | |
await write.FlushAsync(cancellationToken); |
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
$webFolder = "$env:systemdrive\inetpub\jabbr" | |
$appPoolName = "JabbR" | |
$siteName = "JabbR" | |
$dbServer = ".\SQLEXPRESS" | |
$dbName = "JabbR" | |
$fileSource = "http://teamcity.codebetter.com/repository/download/bt980/.lastSuccessful/site.zip?guest=1" | |
$tempFile = "$env:temp\jabbr.zip" | |
$identity = "IIS AppPool\$appPoolName" |
NewerOlder