This file contains hidden or 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
function Invoke-ParallelPowershellFiles | |
{ | |
[CmdletBinding()] | |
param( | |
[hashtable]$PowershellFiles, | |
[int]$NumberOfFilesToRunInParallel, | |
[string]$LogDirectory = ((Get-Location).Path) | |
) | |
if (!$NumberOfFilesToRunInParallel) |
This file contains hidden or 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 System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Management.Automation; | |
using System.Threading; | |
[Cmdlet(VerbsLifecycle.Invoke, "Process")] | |
public sealed class InvokeProcessCommand : Cmdlet | |
{ | |
private bool isProcessFinishedOrTimedOut; |
This file contains hidden or 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
keytool -importkeystore -srckeystore C:\path_to_pfx.pfx -srcstoretype pkcs12 -destkeystore C:\path_to_keystore |
This file contains hidden or 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
# Test if type is loaded | |
if (-not ([System.Management.Automation.PSTypeName]'FixedIssues').Type) | |
{ | |
# ... | |
} | |
# Convert array to string | |
$array | Out-String | |
# Access internet in powershell through proxy server |
This file contains hidden or 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
Run in command line: | |
set JAVA_OPTS=-Dsvnkit.http.methods=NTLM |
This file contains hidden or 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
:: set these variables to match TeamCity environment | |
SET TEAMCITY_DATA_PATH=D:\Config\TeamCity | |
SET TEAMCITY_DATA_BACKUP=D:\Temp\TeamCity | |
SET TEAMCITY_HOME=C:\TeamCity | |
SET TEAMCITY_BACKUP_FILE=D:\Config\TeamCity\TeamCity_Backup_xxx_xxx.zip | |
:: maintainDB expects these directories to be empty or absent. | |
move /Y %TEAMCITY_DATA_PATH%\config %TEAMCITY_DATA_BACKUP%\config | |
move /Y %TEAMCITY_DATA_PATH%\system %TEAMCITY_DATA_BACKUP%\system |
This file contains hidden or 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
Seq Read | Seq Write | 512K Read | 512K Write | 4K Read | 4K Write | 4K QD32 Read | 4K QD32 Write | Total: | |||
---|---|---|---|---|---|---|---|---|---|---|---|
Gizmo Drive 2.7.9, part of Gizmo Central | 5626 | 6216 | 4281 | 4476 | 89.79 | 170.7 | 150.1 | 141 | 21150.59 | ||
Bond Disc 1.0.4.0 | 6984 | 7481 | 7530 | 8086 | 1352 | 946.7 | 968.3 | 324.2 | 33672.2 | ||
Gilisoft RAMDisk 4.7 | 7493 | 8069 | 7259 | 7608 | 1061 | 751 | 829.4 | 226.3 | 33296.7 | ||
Primo Ramdisk Standard Edition 5.6.0 (Direct IO) | 6673 | 7135 | 6562 | 6865 | 929.2 | 706.5 | 143.4 | 121.3 | 29135.4 | ||
SuperSpeed RamDisk 11.6 | 6028 | 6409 | 4796 | 4908 | 552.3 | 440.3 | 465.8 | 163.4 | 23762.8 | ||
Dataram RAMDisk 4.0.0 | 6581 | 6904 | 5698 | 5749 | 218.1 | 175.4 | 203.1 | 110.1 | 25638.7 | ||
VSuite Ramdisk Free Edition 1.18.1531.1240 (SCSI) | 6868 | 7453 | 5396 | 5713 | 153.7 | 147.2 | 149.5 | 142.5 | 26022.9 | ||
ImDisk 1.5.6 | 5345 | 5729 | 4220 | 4283 | 81.33 | 75.06 | 170 | 140.3 | 20043.69 | ||
Gavotte Ramdisk 1.1.0 | 7915 | 8342 | 7289 | 7471 | 504.7 | 430.3 | 436.8 | 183.2 | 32572 |
This file contains hidden or 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 void RenameFiles(string directory, string fileMatch, string replacement) | |
{ | |
foreach (string file in Directory.GetFiles(directory)) | |
{ | |
File.Move(file, Path.Combine(Path.GetDirectoryName(file), System.Text.RegularExpressions.Regex.Replace(Path.GetFileName(file), fileMatch, replacement))); | |
} | |
} |
This file contains hidden or 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
<!-- Belongs under ProjectReference. Means the assembly is not referenced in the output assembly. --> | |
<ReferenceOutputAssembly>false</ReferenceOutputAssembly> | |
<!-- Hard links: | |
http://atombrenner.blogspot.com.au/2011/11/speed-up-your-build-with.html | |
https://gist.github.com/jstangroome/734259 | |
--> | |
<CreateHardLinksForAdditionalFilesIfPossible>true</CreateHardLinksForAdditionalFilesIfPossible> | |
<CreateHardLinksForCopyAdditionalFilesIfPossible>true</CreateHardLinksForCopyAdditionalFilesIfPossible> | |
<CreateHardLinksForCopyFilesToOutputDirectoryIfPossible>true</CreateHardLinksForCopyFilesToOutputDirectoryIfPossible> |
This file contains hidden or 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 System; | |
using System.IO; | |
using System.Linq; | |
using System.Reflection; | |
using Castle.DynamicProxy; | |
private static void BuildProxyAssembly(string assemblyPath) | |
{ | |
string assemblyName = Path.GetFileNameWithoutExtension(assemblyPath) + ".Proxies"; | |
string modulePath = Path.Combine(Path.GetDirectoryName(assemblyPath), assemblyName + ".dll"); |