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 Start-ChocoBuild { | |
[cmdletBinding()] | |
Param( | |
[Parameter()] | |
[ValidateSet('Debug','Official')] | |
[String] | |
$Type = 'Debug' | |
) | |
process { |
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
#Thomas Rayner is awesome. Everyone should be like Thomas. Mostly ganked from here: https://thomasrayner.ca/open-file-dialog-box-in-powershell/ | |
function Open-FileDialog { | |
[cmdletBinding()] | |
param( | |
[Parameter()] | |
[ValidateScript({Test-Path $_})] | |
[String] | |
$InitialDirectory | |
) | |
Add-Type -AssemblyName System.Windows.Forms |
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
<?xml version="1.0" encoding="utf-8"?> | |
<Page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Name="LetsEncrypt" Description="Front End for SSL Cert generation based on Let's Encrypt" Authenticated="false" ShowInNavigation="true" ShowNavigation="true"> | |
<Components> | |
<Form Id="6594b4c1-92a7-4190-831c-88d36efd5530" Title="Certificate Details" Description="Enter Details for the certificate here" SuccessTitle="Certificate Generated!" SuccessDescription="You'll receive an email with your Certificate within 2 minutes." RefreshComponents="true"> | |
<Target Name="New-LetsEncryptCertificate.ps1" Type="script"> | |
<Fields> | |
<Field Name="CertificateDnsName" Tooltip="Enter the Subject of the certificate you wish to generate. Supports Wildcard" Value="example.foo.org" Type="textbox" Required="false" /> | |
<Field Name="PFXPassphrase" Tooltip="This is the password on the certificate used to import it on other systems. DO NOT LOSE THIS ONCE YOU SE |
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
$ErrorActionPreference = 'Stop'; | |
$pp = Get-PackageParameters | |
$packageName= 'sql-server-express' | |
$url = '' | |
$url64 = 'https://download.microsoft.com/download/8/4/c/84c6c430-e0f5-476d-bf43-eaaa222a72e0/SQLEXPR_x64_ENU.exe' | |
$checksum = 'a0086387cd525be62f4d64af4654b2f4778bc98d' | |
if($pp['InstallPath']){ |
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
$JenkinsHome = "C:\Program Files (x86)\Jenkins" | |
$JenkinsConfigPath = Join-Path $JenkinsHome "config.xml" | |
$JenkinsPlugins = @{ | |
'cloudbees-folder' = '6.15' | |
'trilead-api' = '1.0.13' | |
'antisamy-markup-formatter' = '2.1' | |
'structs' = '1.23' | |
'workflow-step-api' = '2.23' | |
'token-macro' = '2.13' | |
'build-timeout' = '1.20' |
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 Remove-ChocoTemplateComment { | |
<# | |
.SYNOPSIS | |
Removes code comments from a templated choco package. | |
.DESCRIPTION | |
Removes code comments from a templated choco package. | |
.PARAMETER Script | |
The script to remove comments from. |
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
<# | |
.SYNOPSIS | |
Creates a packages.config file from installed choco packages | |
.PARAMETER SourceFriendlyName | |
The friendly name of an available choco source on the system. This will explicity set the source in the config file | |
such that installation on the new system will come from this source. | |
.PARAMETER OutputFile | |
The config file to save output too. Must end in '.config'. |
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 Open-GitRepo { | |
<# | |
.SYNOPSIS | |
Changes your $pwd to the directory of the requested repo name | |
.DESCRIPTION | |
Changes your $pwd to the directory of the requested repo name | |
.PARAMETER Repo | |
The repo to open |
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
[CmdletBinding()] | |
Param( | |
[Parameter()] | |
[String] | |
$Path = 'C:\drop' | |
) | |
process { | |
$FileFilter = '*' | |
$IncludeSubfolders = $false |
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 Get-DadJoke { | |
[cmdletBinding()] | |
Param() | |
process { | |
$header = @{ | |
Accept = "application/json" | |
} | |
$joke = Invoke-RestMethod -Uri "https://icanhazdadjoke.com/" -Method Get -Headers $header | |