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
interface AutocompleteProps<T> { | |
items: T[]; | |
value?: string; | |
onChange?(e: React.ChangeEvent<HTMLInputElement>, value: string): void; | |
onSelect?(value: string, item: T): void; | |
shouldItemRender?(item: T, value: string): boolean; | |
isItemSelectable?(item: T): boolean; | |
sortItems?(itemA: T, itemB: T, value: string): -1 | 0 | 1; | |
getItemValue(item: T): string; | |
renderItem(item: T, isHighlighted?: boolean, styles?: React.CSSProperties): JSX.Element; |
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
<Target Name="PreBuild" BeforeTargets="PreBuildEvent"> | |
<Error Text="A package is referenced more than once, check the csproj and remove the duplicate reference." Condition="@(PackageReference->Count()) != @(PackageReference->Distinct()->Count())" /> | |
</Target> |
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
# You can get this dll from your Octopus Server/Tentacle installation directory or from | |
# https://www.nuget.org/packages/Octopus.Client/ | |
Add-Type -Path 'C:\Program Files\Octopus Deploy\Tentacle\Octopus.Client.dll' | |
$apikey = 'API-CHANGEME' # Get this from your profile | |
$octopusURI = 'http://localhost:8065' # Your server address | |
$projectName = 'A new project' # The namne of the project you want to disable ARC on | |
$endpoint = new-object Octopus.Client.OctopusServerEndpoint $octopusURI,$apikey | |
$repository = new-object Octopus.Client.OctopusRepository $endpoint |
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
# This script requires DeploymentStepPackageRequirement which is scheduled for release in Octopus 4.2 | |
# You can this dll from your Octopus Server/Tentacle installation directory or from | |
# https://www.nuget.org/packages/Octopus.Client/ | |
Add-Type -Path 'C:\path\to\client\lib\Octopus.Client.dll' | |
$apikey = 'API-YOURAPIKEY' # Get this from your profile | |
$octopusURI = 'http://localhost:8065' # Your server address | |
# create the connection to the Octopus Server |
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 | |
# check if we are already rebooting and exit | |
if [ -f /home/pi/heartbeat/rebooting ] ; then | |
exit 0 | |
fi | |
# ping and exit on success | |
ping -c 1 -w 5 8.8.8.8 &> /dev/null | |
if [ "$?" = 0 ] ; then |
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
$testFolder = "C:\dev\Calamari\source\Calamari.Tests" | |
Function Convert-ToXunit { | |
Param( | |
[System.IO.FileInfo]$file | |
) | |
$result = (Get-Content $file.FullName -Raw) ` | |
-replace 'using NUnit.Framework;', 'using Xunit;' ` | |
-replace '\[Test\]', '[Fact]' ` |
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 exists (select column_name from INFORMATION_SCHEMA.columns where TABLE_SCHEMA = 'dbo' and table_name = 'Deployment' and column_name = 'ChannelId') | |
BEGIN | |
ALTER TABLE dbo.Deployment ADD ChannelId nvarchar(50) NULL | |
END | |
GO | |
| |
-- Update column from json blob. Try to extract rather than joining on Release since it may have changed. | |
UPDATE dbo.Deployment | |
SET ChannelId = c.Id | |
FROM dbo.Deployment d INNER JOIN dbo.Channel c ON d.[JSON] LIKE '%"ChannelID":"' + c.Id + '"%' |
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
#CHANGE ME! | |
$OctopusAzureModulePath = "C:\Octopus\master\Calamari\Azure\1.0.20160602.084032\AzurePowershell" | |
$AzureRMModules = @( | |
"AzureRM.ApiManagement", | |
"AzureRM.Automation", | |
"AzureRM.Backup", | |
"AzureRM.Batch", | |
"AzureRM.Compute", | |
"AzureRM.DataFactories", |
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 | |
echo installing mono | |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF | |
echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list | |
sudo apt-get update | |
sudo apt-get install -y mono-complete | |
function createMachine() { | |
username=t-$RANDOM |
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
// nuget in Nancy and Nancy.Hosting.Self | |
void Main() | |
{ | |
using (var host = new Nancy.Hosting.Self.NancyHost(new Uri("http://localhost:8080"), new LinqpadNancyBootstrapper())) | |
{ | |
host.Start(); | |
Console.ReadLine(); | |
} | |
} |
NewerOlder