Skip to content

Instantly share code, notes, and snippets.

View scottcowan's full-sized avatar

Scott Cowan scottcowan

View GitHub Profile
@DamianMac
DamianMac / gist:cab420adb9f9a915b028
Created October 30, 2014 04:13
Create a release with Octopus Client API
var server = "http://yourserveraddress:8065/"; //Your server and IP address
var apiKey = "API-XXXXXXXXXXXXXXXXXXXXXXXXX"; // Get this from your 'profile' page in the Octopus web portal
var endpoint = new OctopusServerEndpoint(server, apiKey);
var repository = new OctopusRepository(endpoint);
var projectId = "projects-225"; //your project id
//This pulls out the info you need, the same call that's made on the Create Release page in the UI
var template = repository.Client.Get<Octopus.Client.Model.ReleaseTemplateResource>("/api/deploymentprocesses/deploymentprocess-" + projectId + "/template");
@tumtumtum
tumtumtum / gist:0afed0f962517f0eb02e
Created July 3, 2015 15:43
Repackage cspkg file with replacement web.config
function ZipFiles( $zipfilename, $sourcedir )
{
Add-Type -Assembly System.IO.Compression.FileSystem
Add-Type -Assembly System.IO.Compression
$archive = [System.IO.Compression.ZipFile]::Open($zipfilename, [System.IO.Compression.ZipArchiveMode]::Create);
try
{
$files = [System.IO.Directory]::GetFiles($sourceDir, "*.*", [System.IO.SearchOption]::AllDirectories)
@niklasvincent
niklasvincent / validate-cloudformation.sh
Last active October 3, 2018 12:43
Validate CloudFormation during build
#!/bin/bash
# Add this script to your cloudformation directory (we have ours in the project root).
# Then set up a build step in Team City that executes the custom script:
#
# [[ -f ./cloudformation/validate-cloudformation.sh ]] && ./cloudformation/validate-cloudformation.sh
#
# That way branches without the script will still build.
#
# Make sure your CI user has the following policy attached to it for AWS:
@davidwhitney
davidwhitney / install.ps1
Last active June 21, 2024 06:18
WinGet Install Script
winget install Notepad++.Notepad++
winget install 7zip.7zip
winget install dotPDN.PaintDotNet
winget install Microsoft.DotNet.SDK.3_1
winget install Microsoft.DotNet.SDK.5
winget install Microsoft.DotNet.SDK.6
winget install Microsoft.DotNet.SDK.7
winget install Microsoft.DotNet.SDK.8
winget install Microsoft.DotNet.SDK.Preview