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
if ((Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | Where-Object {$_.DisplayName -eq "Microsoft Visual Studio 2010 Shell (Isolated) - ENU"}) -ne $null) | |
{ | |
Write-Host "Microsoft Visual Studio 2010 Shell (Isolated) Redistributable Package already installed." | |
} | |
else | |
{ | |
Measure-command { | |
Write-Host "Downloading Microsoft Visual Studio 2010 Shell (Isolated) Redistributable Package..." | |
$exePath = "$($env:USERPROFILE)\VSIsoShell.exe" | |
(New-Object Net.WebClient).DownloadFile('https://download.microsoft.com/download/1/9/3/1939AD78-F8E8-4336-83F3-E2470F422C62/VSIsoShell.exe', $exePath) |
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
<Query Kind="Statements"> | |
<Namespace>System.Text.RegularExpressions</Namespace> | |
</Query> | |
Regex regex = new Regex(@"a*"); | |
Match match = regex.Match("aaaaa"); | |
if (match.Success) | |
{ | |
Console.WriteLine(match.Value); |
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
if(-not $env:APPVEYOR_HTTP_PROXY_IP) { return } | |
$mavenConfig = '<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 | |
http://maven.apache.org/xsd/settings-1.0.0.xsd"> | |
<proxies> | |
<proxy> | |
<active>true</active> | |
<protocol>http</protocol> | |
<host>' + $env:APPVEYOR_HTTP_PROXY_IP + '</host> |
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([string]$myVar ) | |
$token = '<API_Token>' | |
$headers = @{ | |
"Authorization" = "Bearer $token" | |
"Content-type" = "application/json" | |
} | |
$body = @{ |
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
# Create Base64 string cert like this (note that X509KeyStorageFlags.Exportable required to export pfx with pritave key) | |
# X509Certificate2 cert = new X509Certificate2(<path_to_pfx>, <password>, X509KeyStorageFlags.Exportable); | |
# string base64Str = Convert.ToBase64String(cert.Export(X509ContentType.Pfx)); | |
# Next store it as a secire variable named certStr in Appveyor project config | |
# Then use it during a build. | |
environment: | |
certStr: | |
secure: BWrNTKG4xirH2oPN32DOiRmnitc4S9VFYvV3wAqmA1Qsb7h92ke2YzUox8qmLWd7WJ1vu4qDjCvUweSzhGVdupg+FU8dCUMxXLN86ytGVRxCAojuXR/IyvG3J0ibxTt4ZRZc3pPinHbaz8xqe7l3uGJQDJIKlbUjglvYaptjupkEzvH8im0QOa44yFXCpZVsn/kXCCYPgA6nF7TP0YszLx0EtdNB63nWG3eOaf6CXwabOmwMzXxOZa38+vGdrC2RrRM9xnJeheTuY+FKZZ3Xxk0r4rEKQJUYj55e5mt+czaJ0YJynUMxljWgTVs/nvIMkcKirkIOFs9RxtHM+/3tEDGKDSzxG0td7hLks2tLscLxhYZBri851U3O2vRGBu6wmhYQanfB5w7eaVnV4sIJrneLnV++3EpplguiRKA1LEmQ+fpj6Gdt4Y8aGGTGm0vDflcmKdIdNAIQY0hLs4qop7VrAmlvo+RmQq3il10uhk4pOmIwXSBIuZxKRzxjgsFRJwQOHUNV/I6LM3LLPUKP7bsWSaGPloy+RUmUSU7s9oB4cFAP21XyDzusHoFu |
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
- | |
version: 2.0.0.{build}-{branch} | |
branches: | |
only: | |
- master | |
- /\d\.\d\.\d{1,3}/ #regex between "/" | |
install: | |
- ps: 'Write-host "Top config. Branch: "$env:APPVEYOR_REPO_BRANCH' |
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
# Function to determine if theres a file lock on the given file | |
Param( | |
[Parameter(Mandatory = $true)] | |
[string]$serviceName, | |
[Parameter(Mandatory = $true)] | |
[string]$appFolder | |
) | |
function Is-Any-Locked($filePaths) { | |
Foreach ($filepath in $filePaths) { |
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 ([string] $instance, [string] $port ) | |
[reflection.assembly]::LoadWithPartialName("Microsoft.SqlServer.Smo") | Out-Null | |
[reflection.assembly]::LoadWithPartialName("Microsoft.SqlServer.SqlWmiManagement") | Out-Null | |
$serverName = $env:COMPUTERNAME | |
$smo = 'Microsoft.SqlServer.Management.Smo.' | |
$wmi = new-object ($smo + 'Wmi.ManagedComputer') | |
$uri = "ManagedComputer[@Name='$serverName']/ServerInstance[@Name='$instance']/ServerProtocol[@Name='Tcp']" |
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
$token = '<API_Token>' | |
$headers = @{ | |
"Authorization" = "Bearer $token" | |
"Content-type" = "application/json" | |
} | |
$body = @{ | |
accountName="<Your_account>" | |
projectSlug="<Your_project_slug>" |
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
$token = '<API_Token>' | |
$headers = @{ | |
"Authorization" = "Bearer $token" | |
"Content-type" = "application/json" | |
} | |
#if you do not know build version and want to use latest: | |
#$buildVersion = (Invoke-RestMethod -Uri "https://ci.appveyor.com/api/projects/<Your_account>/<Your_project_slug>" -Headers $headers -Method GET).build.version |
OlderNewer