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.ComponentModel.DataAnnotations; | |
| using System.Text.Json; | |
| using System.Text.Json.Serialization; | |
| // ReSharper disable PropertyCanBeMadeInitOnly.Global | |
| // ReSharper disable ClassNeverInstantiated.Global | |
| // ReSharper disable UnusedAutoPropertyAccessor.Global | |
| // ReSharper disable InconsistentNaming | |
| #pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable. |
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
| // Small modification of https://stackoverflow.com/a/62533775/2631967 | |
| JToken SerializeConfiguration(IConfiguration config) | |
| { | |
| var obj = new JObject(); | |
| foreach (var child in config.GetChildren()) | |
| { | |
| if (child.Path.EndsWith(":0")) | |
| { | |
| var arr = new JArray(); |
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
| <# | |
| .SYNOPSIS | |
| Create or update an octopus variable | |
| .DESCRIPTION | |
| Registers a machine as an octopus tentacle and will unregister any existing same-named tentacle. | |
| .PARAMETER projectName | |
| The name of the project in Octopus | |
| .PARAMETER variableName | |
| The name of the variable to be created/updated | |
| .PARAMETER machineRoles |
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
| # Usage: powershell ExtractInitialDatabaseScript.ps1 "SERVERNAME" "DATABASE" "C:\<YourOutputPath>" | |
| function GenerateDBScript([string]$ServerName, [string]$Database, [string]$scriptpath) { | |
| $outFile = "$scriptpath\$($Database)_Inital_setup.sql" | |
| if (-not (Test-Path $scriptpath)) { | |
| [System.IO.Directory]::CreateDirectory($scriptpath) | |
| } | |
| If (Test-Path $outFile) { | |
| Remove-Item $outFile | |
| } |
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.Data; | |
| using System.Runtime.Remoting.Messaging; | |
| using System.Threading.Tasks; | |
| namespace RedisClientPrototype | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) |