conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Package script modified to generate proper ZIP file name\n" }, { "from": "human", "value": "$ErrorActionPreference = \"Stop\"\n\n$rootFolder = \"..\"\n$sourceFolder = \"$rootFolder\\Source\"\n$buildFolder = \"$rootFolder\\build\"\n$packageFolder = \"$rootFolder\\pac...
powershell
chosen
[ { "from": "system", "value": "Update nuget command line parameters\n" }, { "from": "human", "value": "param([String]$key)\n\n$span = New-TimeSpan -Start 2010/1/1 -End (Get-Date)\n$version = \"beta-\" + $span.Days.ToString() + ($span.Hours * 60 + $span.Minutes).ToString(\"0000\")\n& dotnet restor...
powershell
chosen
[ { "from": "system", "value": "Update go path on windows for telegraf" }, { "from": "human", "value": "$ErrorActionPreference = \"stop\"\r\nNew-Item -ItemType Directory \"$env:PKG_PATH/bin\"\r\nnew-item -Path \"c:\\gopath\\src\\github.com\\influxdata\" -type directory\r\ncopy-item -recurse -Path...
powershell
chosen
[ { "from": "system", "value": "Revert rebooting to make sure registry changes take effect\n" }, { "from": "human", "value": "Write-Host \"Installing chocolatey\"\nSet-ExecutionPolicy Unrestricted\niex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))\n\nWrit...
powershell
chosen
[ { "from": "system", "value": "Update powershell script to add relative executable path from MS Config file\n" }, { "from": "human", "value": "$installedapps = get-AppxPackage\n$invalidNames = '*ms-resource*', '*DisplayName*'\n$aumidList = @()\n\nforeach ($app in $installedapps)\n{\n try {\n ...
powershell
chosen
[ { "from": "system", "value": "Tweak git, was hanging the build\n" }, { "from": "human", "value": "## Development Tools - Git\n\nchoco install git --package-parameters= \"/GitAndUnixToolsOnPath /WindowsTerminal /NoShellIntegration /NoGuiHereIntegration /NoShellHereIntegration\"\nchoco install Tor...
powershell
chosen
[ { "from": "human", "value": "Add script for clean release from VS project\n" }, { "from": "gpt", "value": "Copy-Item .\\Release\\* .\\Final\\ -Recurse\nrm .\\Final\\*vshost*\nrm .\\Final\\*.pdb\nCompress-Archive -Path .\\Final\\* -DestinationPath release.zip\nWrite-Host \"SHA256 :\"(Get-FileHash...
powershell
chosen
[ { "from": "human", "value": "Add script to automate pushing nuget packages.\n" }, { "from": "gpt", "value": "# Copyright (c) Microsoft. All rights reserved.\n# Licensed under the MIT license. See LICENSE file in the project root for full license information.\n$pkg_source=$args[0]\n$feed_path=$ar...
powershell
chosen
[ { "from": "system", "value": "Fix incorrect file ending for nuget package.\n" }, { "from": "human", "value": "[CmdletBinding()]\nParam(\n [Parameter(Mandatory=$True)]\n [string]$Platform,\n\n [Parameter(Mandatory=$True)]\n [string]$Configuration\n)\n\n$binStub = $Configuration\n\n$zi...
powershell
chosen
[ { "from": "system", "value": "Update tab completion test for PowerShell\n\nTo avoid over-specify testing.\n" }, { "from": "human", "value": "if (Get-Command -Name rustup -ErrorAction Stop) {\n\t# Enable rustup tab completion\n\trustup completions powershell | Out-String | Invoke-Expression\n}\n\...
powershell
chosen
[ { "from": "system", "value": "Change script to inject build number to DM library file for .Net Core platform.\n" }, { "from": "human", "value": "Function UpdateVersionInFile\n{\n Param ([string]$path, [string]$prefix, [string]$suffix, [int]$verNum)\n\n if ($env:BUILD_NUMBER)\n {\n\n ...
powershell
chosen
[ { "from": "system", "value": "Modify ci build versioning scheme" }, { "from": "human", "value": "$ErrorActionPreference = \"Stop\"\n$scriptpath = $MyInvocation.MyCommand.Path\n$dir = Split-Path $scriptpath\nPush-Location $dir\n\n\nsv version $env:APPVEYOR_BUILD_NUMBER\n#sv version \"1-debug\"\n\...
powershell
chosen
[ { "from": "system", "value": "Update to latest windows_2016_docker box\n" }, { "from": "human", "value": "Write-Host \"Add Registry to hosts\"\n$ip = \"192.168.38.100\"\n# I know this could be done with vagrant-hostmanager\nAdd-Content C:\\Windows\\system32\\drivers\\etc\\hosts \"`r`n$ip registr...
powershell
chosen
[ { "from": "system", "value": "Add Unit Test for Get-Culture\n" }, { "from": "human", "value": "Describe \"Get-Culture\" {\n\n It \"Should return a type of CultureInfo for Get-Culture cmdlet\" {\n\n\t(Get-Culture).GetType() | Should Be CultureInfo\n\n }\n\n It \"Should have $ culture var...
powershell
chosen
[ { "from": "system", "value": "Add failing test for UsePSCredentialType rule\n" }, { "from": "human", "value": "Import-Module PSScriptAnalyzer\n$violationMessage = \"The Credential parameter in 'Credential' must be of type PSCredential. For PowerShell 4.0 and earlier, please define a credential ...
powershell
chosen
[ { "from": "system", "value": "Fix the approval script for paths with square brackets\n" }, { "from": "human", "value": "param (\n $SolutionRoot = \"$PSScriptRoot/..\",\n $TestResultDirectory = \"$SolutionRoot/src/WpfMath.Tests/TestResults\"\n)\n\nSet-StrictMode -Version Latest\n$ErrorActio...
powershell
chosen
[ { "from": "system", "value": "Fix ModuleName for project tests\n" }, { "from": "human", "value": "$projectRoot = Resolve-Path \"$PSScriptRoot\\..\"\n$script:ModuleName = 'MyModule'\n$moduleRoot = \"$projectRoot\\$ModuleName\"\n\nDescribe \"PSScriptAnalyzer rule-sets\" -Tag Build {\n\n $Rules ...
powershell
chosen
[ { "from": "system", "value": "Add PSMisleadingBacktick to PSSA settings file.\n\nThis is to keep the PSSA settings file in sync with the default rules enabled in PSES. This helps the user know what the \"defaults\" are.\n" }, { "from": "human", "value": "# The PowerShell Script Analyzer will ge...
powershell
chosen
[ { "from": "system", "value": "Exclude coverage of xunit from code coverage\n" }, { "from": "human", "value": "$output = \"$PSScriptRoot\\coverage.xml\"\nIf (Test-Path $output) {\n\tRemove-Item $output -Force\n}\n\ndotnet test -f netcoreapp2.0 /p:CollectCoverage=true /p:CoverletOutputFormat=openc...
powershell
chosen
[ { "from": "system", "value": "Add include VB project files\n\nIf not desired, feel free to ignore this proposal. Used info found in this StackOverflow answer to include multiple filetypes: http://stackoverflow.com/a/18626464/945456" }, { "from": "human", "value": "# http://stackoverflow.com/a/10...
powershell
chosen
[ { "from": "system", "value": "Update link to dart prerequisites installer\n" }, { "from": "human", "value": "function ExecuteCommand($command, $command_args)\n{\n Write-Host $command $command_args\n Start-Process -FilePath $command -ArgumentList $command_args -Wait -Passthru\n}\n\nfunction Ins...
powershell
chosen
[ { "from": "system", "value": "Modify Pester test for New-Object\n" }, { "from": "human", "value": "Describe \"New-Object\" {\n It \"should create an object with 4 fields\" {\n\t$o = New-Object psobject\n\t$val = $o.GetType()\n\n\t$val.IsPublic | Should Not BeNullOrEmpty\n\t$val.Name ...
powershell
chosen
[ { "from": "system", "value": "Update the test with the optional copy for the 'System.Runtime 4.1.0' error requirement subsystem.\n" }, { "from": "human", "value": "$location = Split-Path $MyInvocation.MyCommand.Path;\n\nPowerShell -NoProfile -Command {\n param (\n [String] $location\n...
powershell
chosen
[ { "from": "system", "value": "Disable Set-PSDebug tests on AppVeyor\n\nThese pass locally, just not with AppVeyor's host.\n" }, { "from": "human", "value": "Describe \"Set-PSDebug\" {\n Context \"Tracing can be used\" {\n AfterEach {\n Set-PSDebug -Off\n }\n\n ...
powershell
chosen
[ { "from": "system", "value": "Build only the version that is on the CI\n" }, { "from": "human", "value": "#\r\n# Simple script to build the nuget package\r\n# when run from the continuous integration server. The result\r\n# of this guy will be become a build artifact.\r\n#\r\nparam([int] $BuildN...
powershell
chosen
[ { "from": "system", "value": "Write the file directly into C:\n" }, { "from": "human", "value": "param\r\n(\r\n [string]$cloudbaseinitdir\r\n)\r\n\r\n$patch_code = @'\r\nimport os\r\nfrom cloudbaseinit.original_shell import main\r\ntry:\r\n main()\r\nfinally:\r\n user_path = os.path.exp...
powershell
chosen
[ { "from": "human", "value": "Add script to build a production hex image along with an extracted config.txt file with the build ID info.\n" }, { "from": "gpt", "value": "[CmdletBinding()]\r\nParam(\r\n [Parameter(Position=1)]$IARRoot = \"${env:ProgramFiles(x86)}\\IAR Systems\\Embedded Workbenc...
powershell
chosen
[ { "from": "system", "value": "Change call to be able to upgrade pip\n" }, { "from": "human", "value": "$url = \"https://download.microsoft.com/download/7/9/6/796EF2E4-801B-4FC4-AB28-B59FBF6D907B/VCForPython27.msi\"\n$output = \"C:\\nitor\\VCForPython27.msi\"\n(New-Object System.Net.WebClient).Do...
powershell
chosen
[ { "from": "system", "value": "Fix for missing script folder variable for Windows Server disk resize" }, { "from": "human", "value": "# resize disk\n& $scriptFolder\\disk-resize.ps1\n\n# reboot\nRestart-Computer" }, { "from": "gpt", "value": "# get script folder\n$scriptFolder = Split...
powershell
chosen
[ { "from": "system", "value": "Fix ensure refer environment on Windows\n" }, { "from": "human", "value": "#requires -v 3\nparam($action)\n$erroractionpreference = 'stop' # quit if anything goes wrong\n\n$straps=\"console dart go mongo node\"\n$scoop_packs=\"git-flow graphviz hugo\"\n$node_packs=\...
powershell
chosen
[ { "from": "system", "value": "windows: Return exit status from test script\n" }, { "from": "human", "value": "# Be sure to run \"Set-ExecutionPolicy RemoteSigned\" before running powershell scripts\r\n\r\nParam([switch]$Debug)\r\n\r\nif ($Debug) {\r\n $dPath = \"Debug\"\r\n} else {\r\n $dP...
powershell
chosen
[ { "from": "system", "value": "Change guid length since file names are too long for project files created during functional tests.\n\n--HG--\nextra : rebase_source : 7e8ea059bfd6f7358ec42eea5745b66bf6494eb4\n" }, { "from": "human", "value": "function New-Guid {\r\n [System.Guid]::NewGuid().ToS...
powershell
chosen
[ { "from": "human", "value": "Add script to publish docs\n\nIssue #8\n" }, { "from": "gpt", "value": "New-Item C:\\temp\\docs\\ -Force -ItemType Directory\nCopy-Item .\\docs\\build\\Html\\default\\* C:\\temp\\docs\\\n\ngit checkout gh-pages -f\nRemove-Item .\\* -Recurse -Exclude .git\\*, CNAME\nC...
powershell
chosen
[ { "from": "system", "value": "Fix service check script, now it works\n" }, { "from": "human", "value": "#\n# check-windows-service.ps1\n#\n# DESCRIPTION:\n# This plugin checks whether a User-inputted Windows service is running or not.\n#\n# OUTPUT:\n# plain text\n#\n# PLATFORMS:\n# Windo...
powershell
chosen
[ { "from": "human", "value": "Add Github Pages publish script\n\n" }, { "from": "gpt", "value": "\r\nfunction Main {\r\n\r\n # checkout gh-pages\r\n git checkout gh-pages\r\n\r\n # get the latest version\r\n git pull origin gh-pages\r\n\r\n # reset the last \"Publish\" commit\r\n ...
powershell
chosen
[ { "from": "system", "value": "Add `ln -s` function to PowerShell\n" }, { "from": "human", "value": "if (Get-Module PSReadLine) {\n Set-PSReadLineOption -EditMode Emacs\n}\n\nImport-Module posh-git -ErrorAction SilentlyContinue\nif (Get-Module posh-git) {\n $GitPromptSettings.DefaultPromptAbbre...
powershell
chosen
[ { "from": "system", "value": "Fix call to dotnet run.\n" }, { "from": "human", "value": "# Copyright(c) 2016 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\n# use this file except in compliance with the License. You may obtain a copy of\n# the Li...
powershell
chosen
[ { "from": "system", "value": "Fix the build running error that no concolse runner was found.\nThe error was due to test runner version update from 2.1 to 2.2. File path need to update to newer version too.\n" }, { "from": "human", "value": "If ($args.Length -ne 0)\n{\n\t$env:NeoctrlArgs=\"$args\...
powershell
chosen
[ { "from": "system", "value": "Fix the passing of parameters to function.\n" }, { "from": "human", "value": "# Look for any tracebacks in the code\r\n$osArch = (Get-WmiObject Win32_OperatingSystem).OSArchitecture\r\nif($osArch -eq \"64-bit\")\r\n{\r\n\r\n $programFilesDir = ${ENV:ProgramFiles(x...
powershell
chosen
[ { "from": "system", "value": "Remove deprecated calls to chocolatey functions\n\n+ remove no more needed try/catch\nhttps://github.com/chocolatey/choco/wiki/HelpersReference#error--success-functions\n" }, { "from": "human", "value": "try {\n $sysDrive = $env:SystemDrive\n $gittfsPath = \"$sysD...
powershell
chosen
[ { "from": "human", "value": "Add script to generate NuGet packages\n" }, { "from": "gpt", "value": "C\u0000:\u0000\\\u0000W\u0000i\u0000n\u0000d\u0000o\u0000w\u0000s\u0000\\\u0000M\u0000i\u0000c\u0000r\u0000o\u0000s\u0000o\u0000f\u0000t\u0000.\u0000N\u0000E\u0000T\u0000\\\u0000F\u0000r\u0000a\u0...
powershell
chosen
[ { "from": "system", "value": "Add checksum to chocolatey package.\n" }, { "from": "human", "value": "$ErrorActionPreference = \"Stop\"\n\n$packageName = 'SQL Notebook'\n$installerType = 'msi'\n$url = 'https://sqlnotebook.com/install/SQLNotebook_0_6_0.msi'\n$silentArgs = '/quiet'\n$validExitCodes...
powershell
chosen
[ { "from": "system", "value": "Use special input mode for opencover arguments.\n" }, { "from": "human", "value": "[CmdletBinding()]\nParam(\n [Parameter(Mandatory=$True)]\n [string]$Platform,\n\n [Parameter(Mandatory=$True)]\n [string]$Configuration\n)\n\nIf ($Platform -ne \"Any CPU\"...
powershell
chosen
[ { "from": "system", "value": "Add Auto Resolve Git for Windows Install, add git to PATH\n" }, { "from": "human", "value": "<#############################################################################\n# PathLoader.ps1\n# Note: Clang Auto Build Environment\n# Date:2016.01.02\n# Author:Force...
powershell
chosen
[ { "from": "human", "value": "Add tests for powershell -? parsing\n\nAnd all other accepted forms.\n" }, { "from": "gpt", "value": "Describe \"CoreConsoleHost unit tests\" {\n $powershell = Join-Path -Path $PsHome -ChildPath \"powershell\"\n\n Context \"Command-line parsing\" {\n\n f...
powershell
chosen
[ { "from": "human", "value": "Fix the network during the first install\n" }, { "from": "gpt", "value": "# You cannot enable Windows PowerShell Remoting on network connections that are set to Public\n# Spin through all the network locations and if they are set to Public, set them to Private\n# usi...
powershell
chosen
[ { "from": "system", "value": "Fix package restore for solution packages.\n" }, { "from": "human", "value": "param(\n [int]$buildNumber = 0\n )\n\nif(Test-Path Env:\\APPVEYOR_BUILD_NUMBER){\n $buildNumber = [int]$Env:APPVEYOR_BUILD_NUMBER\n Write-Host \"Using APPVEYOR_BUILD_NUMBER\"\n...
powershell
chosen
[ { "from": "human", "value": "Fix - Updating the VersionPrefix element that produces the version to the NuGet package.\n" }, { "from": "gpt", "value": "Function Get-ScriptDirectory { Split-Path -parent $PSCommandPath }\r\n\r\n$attribute = Get-Content \"$(Get-ScriptDirectory)\\Properties\\Assembly...
powershell
chosen
[ { "from": "system", "value": "Remove '*' when passing string to Find-Frecent\n\nThis prevented exact matches from actually matching." }, { "from": "human", "value": "#\n# Fasdr.ArgumentCompleters.ps1\n#\nfunction FasdrCompletion {\n param($commandName, $parameterName, $wordToComplete, $comman...
powershell
chosen
[ { "from": "system", "value": "Fix the Get-Item Pester test\n\nFailed because we renamed the test directory.\n" }, { "from": "human", "value": "$here = Split-Path -Parent $MyInvocation.MyCommand.Path\n\nDescribe \"Get-Item\" {\n It \"Should list all the items in the current working directory ...
powershell
chosen
[ { "from": "system", "value": "Make npm path more robust for 32 and 64 bit build machines\n" }, { "from": "human", "value": "Param(\n [string]$zipPath\n)\n\nfunction ZipFiles( $zipfilename, $sourcedir )\n{\n Add-Type -Assembly System.IO.Compression.FileSystem\n $compressionLevel = [Syste...
powershell
chosen
[ { "from": "system", "value": "Fix occaisonaly out of memory errors in video test.\n\nSplitting the 'dotnet test' command into two separate 'dotnet build' and 'dotnet test --no-build' commands reduces the peak memory usage by about 190 MB. Go figure.\n" }, { "from": "human", "value": "# Copyrigh...
powershell
chosen
[ { "from": "system", "value": "Change test instance to 2" }, { "from": "human", "value": "$commandname = $MyInvocation.MyCommand.Name.Replace(\".ps1\",\"\")\r\nWrite-Host -Object \"Running $PSCommandpath\" -ForegroundColor Cyan\r\n. \"$PSScriptRoot\\constants.ps1\"\r\n\r\nDescribe \"$commandname ...
powershell
chosen
[ { "from": "system", "value": "Use saltproject.io domain instead of saltstack.com\n" }, { "from": "human", "value": "# Powershell supports only TLS 1.0 by default. Add support for TLS 1.2 and TLS 1.3\n[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]'Tls12,Tls...
powershell
chosen
[ { "from": "system", "value": "Install curl, wget and 7zip with chocolatey\n" }, { "from": "human", "value": "if (Test-Path $PROFILE) {\n $file = Get-Item $PROFILE -Force -ea 0\n $symlink = $file.Attributes -band [IO.FileAttributes]::ReparsePoint\n if (-Not $symlink) {\n Remove-It...
powershell
chosen
[ { "from": "system", "value": "ci: Increment timeout for Datastore tests\n" }, { "from": "human", "value": "# Copyright(c) 2020 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\n# use this file except in compliance with the License. You may obtain a ...
powershell
chosen
[ { "from": "system", "value": "Add regression test for Get-Process -IncludeUserName\n" }, { "from": "human", "value": "Describe \"Get-Process\" {\n # These tests are no good, please replace!\n It \"Should return a type of Object[] for Get-Process cmdlet\" -Pending:$IsOSX {\n (Get-Pro...
powershell
chosen
[ { "from": "human", "value": "Add Windows integration test for Docker\n" }, { "from": "gpt", "value": "# Copyright 2019 The Kubernetes Authors All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the Li...
powershell
chosen
[ { "from": "system", "value": "Make sure psake gets install as a system prereq!\n" }, { "from": "human", "value": "#requires -RunAsAdministrator\n\n# Make sure all the system level prerequisites that require Admin rights are installed.\n\n# Chocolately: Used to install subsequent dependencies.\ni...
powershell
chosen
[ { "from": "system", "value": "Switch the physical directory of an IIS web site.\n" }, { "from": "human", "value": "<#\n.DESCRIPTION\n Swirch the physal director of an IIS Website.\n#>\n$WebAdministrationModule = 'WebAdministration'\n\nIf ( ! (Get-module $WebAdministrationModule )) {\n Wri...
powershell
chosen
[ { "from": "system", "value": "Improve version number of installer, keep patch number in case of stable build, add 1000 and build number in case of nightly build.\n" }, { "from": "human", "value": " param (\n [string]$build\n )\n\n$launcherExe = \"../RXL.WPFClient/bin/Release/RXL.exe\"\n$versi...
powershell
chosen
[ { "from": "system", "value": "Fix correcting .nuspec file format\n" }, { "from": "human", "value": "$nuspec = (ls $env:APPVEYOR_BUILD_FOLDER -Recurse).Where{ $_.Extension -eq \".nuspec\"} | Select -First 1\n[xml]$xml = Get-Content $nuspec.FullName\n$number = $xml.package.metadata.version\n$stag...
powershell
chosen
[ { "from": "human", "value": "Add test to verify formatter implementation\n" }, { "from": "gpt", "value": "$directory = Split-Path -Parent $MyInvocation.MyCommand.Path\n$testRootDirectory = Split-Path -Parent $directory\n\nImport-Module PSScriptAnalyzer\nImport-Module (Join-Path $testRootDirector...
powershell
chosen
[ { "from": "system", "value": "Install scoop and run concfg by default\n" }, { "from": "human", "value": "if (Test-Path $PROFILE) {\n $file = Get-Item $PROFILE -Force -ea 0\n $symlink = $file.Attributes -band [IO.FileAttributes]::ReparsePoint\n if (-Not $symlink) {\n Remove-Item $...
powershell
chosen
[ { "from": "system", "value": "Increase legibility: add comments, use line continuations\n" }, { "from": "human", "value": "# requires:\n# chocolateypackageupdater\n# >=ketarin-1.8.5\n\n$vars = \"version\",\"url\",\"url64\",\"checksum\",\"checksumx64\",\"nopush\"\n$hash = @{}\n\nforeach ($var i...
powershell
chosen
[ { "from": "system", "value": "Add MSBuild and fix path\n" }, { "from": "human", "value": "Copy-Item .\\Release\\* .\\Final\\ -Recurse\nrm .\\Final\\*vshost*\nrm .\\Final\\*.pdb\nCompress-Archive -Path .\\Final\\* -DestinationPath release.zip\nWrite-Host \"SHA256 :\"(Get-FileHash -Algorithm SHA25...
powershell
chosen
[ { "from": "system", "value": "Fix path for publishing pkgs\n" }, { "from": "human", "value": "param (\n [Parameter(Mandatory=$true)][string]$apiKey\n)\n\n$branch = invoke-expression \"git branch --show-current\"\n\nif ($branch -ne 'master') {\n Write-Error \"Publishing only allowed from ma...
powershell
chosen
[ { "from": "system", "value": "Add source parameter to nuget\n" }, { "from": "human", "value": "param([String]$key)\n\n$span = New-TimeSpan -Start 2010/1/1 -End (Get-Date)\n$version = \"beta-\" + $span.Days.ToString() + ($span.Hours * 60 + $span.Minutes).ToString(\"0000\")\n& dotnet restore\ncd ....
powershell
chosen
[ { "from": "system", "value": "Fix artifacts zip file structure\n" }, { "from": "human", "value": "\n# Definition for build\n$Module = 'ISEPresenter'\n$Source = \"C:\\Projects\\$Module\"\n\n# Extract module version\n$ModuleVersion = (Invoke-Expression -Command (Get-Content -Path \"$Source\\bin\\...
powershell
chosen
[ { "from": "human", "value": "Add PowerShell completion support for AWS CLI\n" }, { "from": "gpt", "value": "if (!(Get-Command -Name aws -ErrorAction Ignore)) {\n Write-Verbose -Message (Get-DotFilesMessage -Message 'Skipping AWS CLI settings as unable to locate aws.')\n return\n}\n\nWrite-...
powershell
chosen
[ { "from": "system", "value": "Revert \"Use native powershell way to create dir if it doesn't exist\"\n" }, { "from": "human", "value": "$packageName = '{{PackageName}}'\n$url = '{{DownloadUrl}}'\n$checksum = '{{Checksum}}'\n$checksumType = 'sha1'\n$toolsDir = \"$(Split-Path -parent $MyInvocation...
powershell
chosen
[ { "from": "system", "value": "PS1: Improve error handling of cd\n" }, { "from": "human", "value": "# Provides linux like aliases\n\nRemove-Item -ErrorAction SilentlyContinue alias:\\cd\nRemove-Item -ErrorAction SilentlyContinue alias:\\pwd\nRemove-Item -ErrorAction SilentlyContinue alias:\\which...
powershell
chosen
[ { "from": "system", "value": "Remove trailing whitespace in expected file since this gets fixed now" }, { "from": "human", "value": "# Produce PSAvoidUsingCmdletAliases and PSAvoidTrailingWhitespace warnings that should get fixed by replacing it with the actual command\nGet-ChildItem . | ForEac...
powershell
chosen
[ { "from": "system", "value": "Update test runner PS script\n" }, { "from": "human", "value": "# This is the test runner for all test projects.\n# It gets all test projects and run each project.\n# This PowerShel script runs all test projects.\n\n$projects = Get-ChildItem .\\test | ?{$_.PsIsConta...
powershell
chosen
[ { "from": "system", "value": "Put correct exe name in powershell installer.\n" }, { "from": "human", "value": "$fullpath = (Get-Item -Path \".\\\" -Verbose).FullName\r\n$cred = Get-Credential -Message \"This service requires domain privledges.\"\r\nNew-Service -Name \"ScheduledTaskAlertService\"...
powershell
chosen
[ { "from": "system", "value": "Add colorised prompts for windows!\n" }, { "from": "human", "value": "function Get-GitBranch\r\n{\r\n\t$branch = git branch -a 2> $null | Where-Object {$_ -match \"^\\*\"}\r\n\tif ($branch -eq $null) {\r\n\t\treturn $null\r\n\t}\r\n\t\r\n\t$branch = $branch.Substrin...
powershell
chosen
[ { "from": "human", "value": "Add template bootstrap script for windows\n\n\nFormer-commit-id: 7c817c3de22078553620712b0ea2e88f28387e94\nFormer-commit-id: a973df0020cf04a5b0df5784e7eb18aec928b588\nFormer-commit-id: 4e65216ebf154fe3022082e6440565f10c3684b9" }, { "from": "gpt", "value": "#User vari...
powershell
chosen
[ { "from": "system", "value": "Set TAR_URL in bal windows specs\n\n[#173116599]\n" }, { "from": "human", "value": "$ErrorActionPreference = \"Stop\";\n$env:GOPATH=\"C:\\go-\" + (-join ((48..57) + (97..122) | Get-Random -Count 6 | % {[char]$_}))\ntrap { $host.SetShouldExit(1); cmd.exe /c rd /q /s...
powershell
chosen
[ { "from": "system", "value": "Remove explicit import of PSScriptAnalyzer module\n" }, { "from": "human", "value": "Import-Module PSScriptAnalyzer\n$directory = Split-Path -Parent $MyInvocation.MyCommand.Path\n$ruleName = 'PSDSCUseIdenticalMandatoryParametersForDSC'\n$resourceBasepath = \"$direct...
powershell
chosen
[ { "from": "system", "value": "Exclude .git folder when deploying dev build\n" }, { "from": "human", "value": "param([switch]$Release)\n\n$script:thisDir = split-path $MyInvocation.MyCommand.Path -parent\n\n. (join-path $script:thisDir \"Config.ps1\")\n\nif(!$?){\n\twrite-error \"Could not read c...
powershell
chosen
[ { "from": "system", "value": "Tweak the Chocolatey package installation file\n" }, { "from": "human", "value": "$ErrorActionPreference = 'Stop';\n$toolsDir = \"$(Split-Path -parent $MyInvocation.MyCommand.Definition)\"\n$nuspecPath = \"$(Join-Path (Split-Path -parent $toolsDir) ($env:Chocola...
powershell
chosen
[ { "from": "system", "value": "Remove mention of format file since this is done in code now\n" }, { "from": "human", "value": "@{\r\nGUID=\"766204A6-330E-4263-A7AB-46C87AFC366C\"\r\nAuthor=\"Microsoft Corporation\"\r\nCompanyName=\"Microsoft Corporation\"\r\nCopyright=\" Microsoft Corporation. Al...
powershell
chosen
[ { "from": "system", "value": "Add Powershell Prompt And Colors\n" }, { "from": "human", "value": "Set-PSReadLineOption -EditMode \"Vi\" -Colors @{\n Command = [ConsoleColor]::White\n Comment = [ConsoleColor]::White\n ContinuationPrompt = [ConsoleColor]::White\n DefaultToken = [Consol...
powershell
chosen
[ { "from": "system", "value": "Add test for Add-Type System.Runtime.Serialization.Primitives.dll TPA\n" }, { "from": "human", "value": "$guid = [Guid]::NewGuid().ToString().Replace(\"-\",\"\")\n\nDescribe \"Add-Type\" {\n It \"Should not throw given a simple class definition\" {\n { Add...
powershell
chosen
[ { "from": "human", "value": "Add tests for Error stream\n" }, { "from": "gpt", "value": "Describe \"Native streams behavior with PowerShell\" -Tags 'CI' {\n $powershell = Join-Path -Path $PsHome -ChildPath \"powershell\"\n\n Context \"Error stream\" {\n # we are using powershell its...
powershell
chosen
[ { "from": "system", "value": "Refresh env before trying to do nvm install\n" }, { "from": "human", "value": "## Development Tools - Node.JS & Yarn\r\n\r\nchoco install nvm\r\n\r\nchoco install yarn\r\n\r\nnvm install latest\r\n\r\nchoco install visualstudio2019-workload-node" }, { "from"...
powershell
chosen
[ { "from": "system", "value": "Fix base URL to point to temporary location\n" }, { "from": "human", "value": "Login-AzureRmAccount\n\nSelect-AzureRmSubscription -SubscriptionName \"Your Subscription Name\"\n\n$AdminPassword = ConvertTo-SecureString -String \"VerySecure@1234\" -AsPlainText -Force\...
powershell
chosen
[ { "from": "human", "value": "Install script that creates EventLog source\n" }, { "from": "gpt", "value": "# make sure these path are correct for your environment\n$TfsFolder = \"$env:ProgramFiles\\Microsoft Team Foundation Server 12.0\"\n$PluginsFolder = \"$TfsFolder\\Application Tier\\Web Servi...
powershell
chosen
[ { "from": "human", "value": "Add Language Primitive Pester Test\n" }, { "from": "gpt", "value": "Describe \"Language Primitive Tests\" -Tags \"CI\" {\n It \"Equality comparison with string and non-numeric type should not be culture sensitive\" {\n $date = [datetime]'2005,3,10'\n ...
powershell
chosen
[ { "from": "system", "value": "Update Windows Openssl download version for Packer\n- 'b' version started giving a 404 error a couple days ago\n- correct URL is now for 'c' version\n\nCo-authored-by: Ivan Godwin <f018c4a89f4cc4267a24bfbb09062c1ca2a0df0f@pivotal.io>\n" }, { "from": "human", "value"...
powershell
chosen
[ { "from": "system", "value": "Fix test looking for session to be started instead of stopped.\n" }, { "from": "human", "value": "$CommandName = $MyInvocation.MyCommand.Name.Replace(\".Tests.ps1\", \"\")\nWrite-Host -Object \"Running $PSCommandpath\" -ForegroundColor Cyan\n. \"$PSScriptRoot\\cons...
powershell
chosen
[ { "from": "system", "value": "Fix path in build script\n" }, { "from": "human", "value": "Push-Location $PSScriptRoot\n\nif(Test-Path .\\artifacts) { Remove-Item .\\artifacts -Force -Recurse }\n\n& dotnet restore\n\n$revision = @{ $true = $env:APPVEYOR_BUILD_NUMBER; $false = 1 }[$env:APPVEYOR_BU...
powershell
chosen
[ { "from": "system", "value": "Fix interpolation of git SHA in powershell command\n\nSigned-off-by: Stephen Levine <72d5489bdb659bea8b15ba0173fe796f11329883@pivotallabs.com>\n" }, { "from": "human", "value": "$APP_CONST_FILE = $(split-path $MyInvocation.MyCommand.Definition) + \"\\..\\src\\cf\\ap...
powershell
chosen
[ { "from": "system", "value": "Set timeout for windows tests to 15 minutes\n\nCo-authored-by: Danail Branekov <43f82d874965b9fe2876a1a864fffde1e64d6143@gmail.com>\n" }, { "from": "human", "value": "$ErrorActionPreference = \"Stop\";\ntrap { $host.SetShouldExit(1) }\n\ncd gr-release-develop\n\n$en...
powershell
chosen
[ { "from": "human", "value": "Add possible solution for .gitconfig symlink problem\n" }, { "from": "gpt", "value": "# A symlink doesn't for .gitconfig work:\n# whenever gitconfig is updated through git, the file gets overwritten and the symlink broken\n# This script could be a solution...\n\nfunc...
powershell
chosen
[ { "from": "human", "value": "Add script to check number of open files, useful for detecting\nCryptolocker\n" }, { "from": "gpt", "value": "# Powershell used for monitoring the number of open files for each user.\n# Windows Only.\n# Useful for detecting malware such as cryptolocker that encrypt f...
powershell
chosen
[ { "from": "system", "value": "Update fix based on comments for Select-XML Pester Test\n" }, { "from": "human", "value": "\nDescribe \"Select-XML DRT Unit Tests\" -Tags DRT{\n\t\n\tBeforeAll {\n\t\t$testfile = Join-Path -Path $TestDrive -ChildPath \"testfile.xml\"\n\t\t$xmlContent = @\"\n<?xml ve...
powershell
chosen
[ { "from": "system", "value": "Use path relative to the script folder\n" }, { "from": "human", "value": ".\u0000.\u0000\\\u0000p\u0000a\u0000c\u0000k\u0000a\u0000g\u0000e\u0000s\u0000\\\u0000P\u0000e\u0000r\u0000s\u0000i\u0000m\u0000m\u0000o\u0000n\u0000.\u0000C\u0000o\u0000n\u0000s\u0000o\u0000l...
powershell
chosen
[ { "from": "system", "value": "Exclude classes containing only constants from test coverage.\n" }, { "from": "human", "value": "[CmdletBinding()]\nParam(\n [Parameter(Mandatory=$True)]\n [string]$Platform,\n\n [Parameter(Mandatory=$True)]\n [string]$Configuration\n)\n\nIf ($Platform -...
powershell
chosen
[ { "from": "system", "value": "Add chromium support vm setting\n\nAdd chromium support vm setting.\r\nRequired for GitHub desktop 2.9.4 and higher." }, { "from": "human", "value": "#\n# GitHub Dekstop post snapshot script\n# https://github.com/turboapps/turbome/tree/master/github/githubdesktop\n#...
powershell
chosen