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
| { | |
| "installChannelUri": ".\\ChannelManifest.json", | |
| "channelUri": "https://aka.ms/vs/15/release/channel", | |
| "installCatalogUri": ".\\Catalog.json", | |
| "channelId": "VisualStudio.15.Release", | |
| "productId": "Microsoft.VisualStudio.Product.Enterprise", | |
| "includeRecommended": true, | |
| "includeOptional": true, | |
| "productKey": "AAAAABBBBBCCCCCDDDDDEEEEE", |
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
| #!/bin/bash | |
| # | |
| # transcode-video.sh | |
| # | |
| # Copyright (c) 2013-2015 Don Melton | |
| # | |
| about() { | |
| cat <<EOF | |
| $program 5.13 of April 8, 2015 |
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
| function Reset-BuildOutput { | |
| [CmdletBinding(SupportsShouldProcess = $true)] | |
| param( | |
| [Parameter(Position = 0, Mandatory, ValueFromPipeline)][ValidateScript( {Test-Path $_ -PathType Leaf})][string] $projectFile | |
| ) | |
| $xml = [xml](Get-Content (Resolve-Path $projectFile)) | |
| $debugProperties = $xml.DocumentElement.PropertyGroup | Where-Object { $_.Condition -match 'Debug' } | Where-Object { $_.OutputPath -notmatch 'bin' } | |
| $releaseProperties = $xml.DocumentElement.PropertyGroup | Where-Object { $_.Condition -match 'Release' } | Where-Object { $_.OutputPath -notmatch 'bin' } |
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
| /// <summary> | |
| /// Maps a Dictionary of key<string>, value<object> to | |
| /// an object of type T where T has to be a class, | |
| /// with the assumption that all mappings are done | |
| /// to T's public properties | |
| /// </summary> | |
| /// <typeparam name="T"></typeparam> | |
| /// <param name="source"></param> | |
| /// <param name="targetObject"></param> | |
| public void Map<T>(Dictionary<string, object> source, ref T targetObject) where T : new() |
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 Newtonsoft.Json; | |
| using System; | |
| using System.Collections.Specialized; | |
| using System.Net; | |
| using System.Text; | |
| //A simple C# class to post messages to a Slack channel | |
| //Note: This class uses the Newtonsoft Json.NET serializer available via NuGet | |
| public class SlackClient | |
| { |
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
| function Compress-Packages { | |
| param( | |
| [string] $sourcePath, | |
| [string] $destinationPath, | |
| [string] $zipFile | |
| ) | |
| if (Test-Path $destinationPath) { | |
| Remove-Item $destinationPath -Recurse -Force -ErrorAction SilentlyContinue | Out-Null | |
| } |
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
| $excludeFiles = $('update.ps1', 'chocolateyInstall.ps1', '*.nupkg') | |
| # packageDir is defined in the individual update script | |
| Push-Location $packageDir | |
| function global:au_BeforeUpdate { | |
| if ([System.IO.Directory]::Exists($settingsDir) -and $settingsZip) { | |
| Compress-Archive -Path $settingsDir -DestinationPath $settingsZip -Force | |
| } | |
| } |
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 | |
| # New-CertificateRequest subdomain.domain.com | |
| # New-CertificateRequest subdomain1.domain.com, subdomain2.domain.com, subdomain3.domain.com | |
| # New-CertificateRequest subdomain1.domain.com, subdomain2.domain.com, subdomain3.domain.com 'C:\Requests' | |
| function New-CertificateRequest { | |
| [CmdletBinding()] | |
| param( | |
| [Parameter(Position = 0, Mandatory)][string[]] $hostHeaders, | |
| [Parameter(Position = 1)][string] $outputDir = 'C:\Requests' | |
| ) |
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
| function Get-ProcessOnPort { | |
| [CmdletBinding()] | |
| param( | |
| [Parameter(Position = 0, Mandatory = $true)][int32] $portNumber | |
| ) | |
| Get-NetTCPConnection -State Listen -LocalPort $portNumber -ErrorAction SilentlyContinue | ` | |
| Select-Object -First 1 -ExpandProperty OwningProcess | ` | |
| Select-Object @{Name = "Id"; Expression = {$_} } | ` | |
| Get-Process | ` |