conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "[CI] Add HAB_AUTH_TOKEN to at-once update test\n\nSigned-off-by: Christopher Maier <b4598f17a90ef80817bae8ad6c37249740caafb4@chef.io>\n" }, { "from": "human", "value": "# Test the at-once service update strategy\n\n$supLog = New-TemporaryFile\nStart-Supervisor -LogF...
powershell
chosen
[ { "from": "system", "value": "Fix \"cast is not valid\" in Telegram uninstall\n\nI suspect registry keys with no properties cause \"Specified cast is not valid\" in Get-ItemProperty:\r\nhttps://gist.github.com/fizmat/afa889a5a3b8783e6e4b18cf81d620a2" }, { "from": "human", "value": "$packageName...
powershell
chosen
[ { "from": "system", "value": "Put this in the right place\n" }, { "from": "human", "value": "# Stop script execution when a non-terminating error occurs\n$ErrorActionPreference = \"Stop\"\n\n$S3_SECRETS_HELPER_VERSION = \"2.1.1\"\n\nWrite-Output \"Downloading s3-secrets-helper v${S3_SECRETS_HELP...
powershell
chosen
[ { "from": "system", "value": "Add some tests for scoop config\n\n" }, { "from": "human", "value": ". \"$psscriptroot\\..\\lib\\core.ps1\"\n. \"$psscriptroot\\..\\lib\\config.ps1\"\n\ndescribe \"hashtable\" {\n $json = '{ \"one\": 1, \"two\": [ { \"a\": \"a\" }, \"b\", 2 ], \"three\": { \"four...
powershell
chosen
[ { "from": "system", "value": "Update Portainer 1.11.3 to fix certs path\n\nSigned-off-by: Stefan Scherer <2fe843265e65a9540d5df64f4bed2ee6b7ca283e@icloud.com>\n" }, { "from": "human", "value": "$ip=(Get-NetIPAddress -AddressFamily IPv4 `\n | Where-Object -FilterScript { $_.InterfaceAlias -Eq \...
powershell
chosen
[ { "from": "system", "value": "Remove extra spaces into upload ps1 and ls command\n" }, { "from": "human", "value": "Write-Host -ForegroundColor Cyan \"Generate coverage report ...\"\n\n# For: 2>&1 | % { $_.ToString() } see ..\n# http://help.appveyor.com/discussions/problems/555-accessing-another...
powershell
chosen
[ { "from": "system", "value": "Create directory if it does not exist\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 $PR...
powershell
chosen
[ { "from": "human", "value": "Add script to flatten node modules\n" }, { "from": "gpt", "value": "$dir = (get-item $PSScriptRoot).parent.FullName\nwrite-host \"Flattening npm modules from this directory: \" $dir\nif(!$dir.EndsWith('\\')){\n\t$dir = $dir + '\\'\n}\nwrite-host \"Processing root lev...
powershell
chosen
[ { "from": "human", "value": "Add new script for bumping the version on all packages\n" }, { "from": "gpt", "value": "# Bump the version of the core package with the given level.\n# Then set the new version on all other packages.\n\nparam ($BumpLevel = $(throw \"Bump level parameter is required!\...
powershell
chosen
[ { "from": "system", "value": "Add -AcceptEula param to windows updates\n" }, { "from": "human", "value": "## This configuration file uses BoxStarter to configure the system\n## and Chocolatey to install necessary packages\n\n## TODO Ensure chocolatey is installed if we're running this script dir...
powershell
chosen
[ { "from": "human", "value": "Add powershell special region connector create\n" }, { "from": "gpt", "value": "\r\nparam (\r\n [Parameter(Mandatory=$true)][string]$manager,\r\n [Parameter(Mandatory=$true)][string]$user,\r\n [Parameter(Mandatory=$true)][string]$awsAccessKey,\r\n [Param...
powershell
chosen
[ { "from": "system", "value": "Allow multiple providers for a notification\n" }, { "from": "human", "value": "function Send-ALNotification\n{\n param\n (\n [Parameter(Mandatory = $true)]\n [System.String]\n $Activity,\n\n [Parameter(Mandatory = $true)]\n [...
powershell
chosen
[ { "from": "system", "value": "Remove empty placeholder runtimes folders\n" }, { "from": "human", "value": "Param(\n [Parameter(Mandatory=$true)]\n [string]$version,\n [switch]$pre\n)\n\n$buildDate = (Get-Date).ToUniversalTime().ToString(\"yyyyMMddHHmmss\")\n$versionSuffix = \"\"\nif ($p...
powershell
chosen
[ { "from": "human", "value": "Add Offline Catalog populator script\n" }, { "from": "gpt", "value": "[CmdletBinding()]\nparam (\n\t$url = 'http://oszkapi-dev.azurewebsites.net/api/audiobooks',\n\t$file = './source.json'\n)\n\n$catalog = @()\n$audioBooks = Invoke-RestMethod $url |\nSelect -First 2\...
powershell
chosen
[ { "from": "human", "value": "Add powershell script for retreiving disk info for a hyper-v guest\n" }, { "from": "gpt", "value": "#Requires -Modules VagrantMessages\n\nparam(\n [Parameter(Mandatory=$true)]\n [string]$VmId\n)\n\ntry {\n $VM = Hyper-V\\Get-VM -Id $VmId\n Hyper-V\\Get-VM...
powershell
chosen
[ { "from": "system", "value": "Add support for lzh format. (with 7zip)\n" }, { "from": "human", "value": "function 7zip_installed { cmd_available '7z' }\n\nfunction requires_7zip($manifest, $architecture) {\n foreach($dlurl in @(url $manifest $architecture)) {\n if(file_requires_7zip $d...
powershell
chosen
[ { "from": "system", "value": "Copy Artifacts script - added nupkg\n" }, { "from": "human", "value": "param([String]$searchFolder, [String]$artifactsFolder)\n\n\n$files = Get-ChildItem \"*.pdb\" -Recurse | where { !$_.Directory.FullName -notlike \"\\obj\\\" }\n$files2 = Get-ChildItem \"*....
powershell
chosen
[ { "from": "system", "value": "Select correct MSI target architecture\n" }, { "from": "human", "value": "param(\n [Parameter(Mandatory=$true)]\n [string] $Target\n)\n\n$manifest = cargo read-manifest --manifest-path ..\\..\\..\\Cargo.toml | ConvertFrom-Json\n$version = $manifest.version.Spl...
powershell
chosen
[ { "from": "system", "value": "Apply proper scripts for creating artifacts\n" }, { "from": "human", "value": "Write-Output \"---Creating Artifacts---\"\n\n# Build web application\n\n#Set-Location .\\KenticoInspector.WebApplication\n\n#dotnet publish KenticoInspector.WebApplication.csproj /p:Publi...
powershell
chosen
[ { "from": "human", "value": "Add example script to install cert for Web Management Service\n\n" }, { "from": "gpt", "value": "# This is an example script and it will be overwritten when the next update is installed. \n# To use this script copy it to another location and modify as required\n\n# ...
powershell
chosen
[ { "from": "system", "value": "Add method for checking build status of RapidCore\n\nQuerying the AppVeyor API and then filtering for the given tag name that was provided\n" }, { "from": "human", "value": "function Test-UpdateStrategy {\n Param(\n [Parameter(Mandatory=$true)]\n [s...
powershell
chosen
[ { "from": "system", "value": "Remove unneeded buffer size setting\n" }, { "from": "human", "value": "function Run-Command([scriptblock]$Command, [switch]$Fatal, [switch]$Quiet) {\n $output = \"\"\n try {\n if ($Quiet) {\n $output = & $Command 2>&1\n } else {\n & $Command\n }...
powershell
chosen
[ { "from": "human", "value": "Add basic test to make sure 'New-PSSession' doesn't crash powershell\n" }, { "from": "gpt", "value": "\nDescribe \"New-PSSession basic test\" -Tag @(\"CI\") {\n It \"New-PSSession should not crash powershell\" {\n try {\n New-PSSession -ComputerN...
powershell
chosen
[ { "from": "system", "value": "Test coverage for Ignorable column being present for IncludeIgnorable\n" }, { "from": "human", "value": "$commandname = $MyInvocation.MyCommand.Name.Replace(\".Tests.ps1\", \"\")\nWrite-Host -Object \"Running $PSCommandpath\" -ForegroundColor Cyan\n. \"$PSScriptRoo...
powershell
chosen
[ { "from": "system", "value": "Update to install the MMA Agent\n" }, { "from": "human", "value": "Configuration SCOrchDevDomainServer\r\n{\r\n Param(\r\n )\r\n\r\n Import-DscResource -ModuleName cNetworkShare\r\n Import-DscResource -ModuleName PSDesiredStateConfiguration\r\n Import...
powershell
chosen
[ { "from": "system", "value": "Build script creates \"symbols\" nuget package.\n" }, { "from": "human", "value": "properties {\r\n $base_dir = Resolve-Path .\r\n $sln_file = \"$base_dir\\Fractions.sln\"\r\n}\r\n\r\nTask default -depends Compile\r\n\r\nTask Clean {\r\n msbuild \"/property...
powershell
chosen
[ { "from": "human", "value": "Add a script to configure nuspec\n" }, { "from": "gpt", "value": "# Working directory should be set to /source\n\n$ProjectRoot = $args[0]\n\n$assemblyInfoCmdletPath = Join-Path (Join-Path $ProjectRoot bin) AssemblyInfoCmdlet.dll\nImport-Module $assemblyInfoCmdletPath...
powershell
chosen
[ { "from": "system", "value": "Update Deployment script to try and stop if running\n" }, { "from": "human", "value": "$scriptDir = Split-Path ((Get-Variable MyInvocation -Scope 0).Value.MyCommand.Path)\n\nif(Test-Path $DeployPath)\n{\n Write-Host \"Removing Directory Found at $DeployPath\"\n ...
powershell
chosen
[ { "from": "human", "value": "Add script to clear the Windows Live Tile cache\n" }, { "from": "gpt", "value": "[CmdletBinding()]\nParam()\n\nif (![Environment]::OSVersion.Version -eq 10) {\n throw 'Script is only valid for Windows 10.'\n}\n\n$RegPath = 'HKCU:\\Software\\Microsoft\\Windows\\Cur...
powershell
chosen
[ { "from": "system", "value": "Use 1607 tag to have that image as first in manifest list\n" }, { "from": "human", "value": "$version=$(select-string -Path Dockerfile -Pattern \"ENV CONSUL_VERSION\").ToString().split()[-1]\ndocker tag consul stefanscherer/consul-windows:$version-2016\ndocker push ...
powershell
chosen
[ { "from": "system", "value": "Update to the build script.\n" }, { "from": "human", "value": "properties {\n\t$filePath = $path\n}\n\ntask default -depends Build\n\nformatTaskName {\n\tparam($taskName)\n\twrite-host $taskName -foregroundcolor Green\n}\n\ntask Build -depends Clean, Nuget-Restore ...
powershell
chosen
[ { "from": "human", "value": "Add powershell script for Get-VHD\n" }, { "from": "gpt", "value": "#Requires -Modules VagrantMessages\n\nparam(\n [Parameter(Mandatory=$true)]\n [string]$DiskFilePath\n)\n\ntry {\n $Disk = Hyper-V\\Get-VHD -path $DiskFilePath\n} catch {\n Write-ErrorMessa...
powershell
chosen
[ { "from": "human", "value": "Add sample for alert suppression verbs\n\n" }, { "from": "gpt", "value": "if ( (Get-PSSnapin -Name SwisSnapin -ErrorAction SilentlyContinue) -eq $null )\n{\n Add-PsSnapin SwisSnapin\n}\n\n$OrionServer = 'localhost'\n$Username = 'admin'\n$Password = ''\n\n$swis = ...
powershell
chosen
[ { "from": "human", "value": "Create a packaging script for WIndows\n" }, { "from": "gpt", "value": "$version = (cmake . -Bbuild/production -DCMAKE_BUILD_TYPE=Release -G \"NMake Makefiles\" | Select-String '-- inform version: ')\r\n$version = $version.ToString().Split(' ')[3]\r\n\r\n$prefix = \"i...
powershell
chosen
[ { "from": "system", "value": "Update local package caching for arbitrary use.\n" }, { "from": "human", "value": "'Adding packages...'\n\n$package_version = Get-Content \"ver.platform.txt\"\n'$package_version=' + $package_version\n\n$output_directory = \".\\built-nuget-packages\"\n'$output_direct...
powershell
chosen
[ { "from": "system", "value": "Add comment about deliberate whitespace warning" }, { "from": "human", "value": "# Produce PSAvoidUsingCmdletAliases warning that should get fixed by replacing it with the actual command\ngci . | % { } | ? { } \n\n# Produces PSAvoidUsingPlainTextForPassword warning ...
powershell
chosen
[ { "from": "system", "value": "Reduce depth for JSON conversion to maximum allowed 100\n" }, { "from": "human", "value": "param (\n[string] $filePath,\n[string] $major,\n[string] $minor,\n[string] $patch\n)\n\n# Get the task.json as a powershell object\n$task = Get-Content -Raw -Path $filePath | ...
powershell
chosen
[ { "from": "system", "value": "Fix package-command tests failing on Windows.\n\nWe have a hard-coded \"Debug\" string in our restore-tests.ps1.\n" }, { "from": "human", "value": "#\n# Copyright (c) .NET Foundation and contributors. All rights reserved.\n# Licensed under the MIT license. See LICEN...
powershell
chosen
[ { "from": "human", "value": "Build script for CI server\n" }, { "from": "gpt", "value": "Framework \"4.0x86\"\n\nTask Build-Master {\n\tInvoke-Psake default.ps1 -properties @{autoVersion = $false}\n}\n\nTask Build-Develop {\n\tInvoke-Psake default.ps1\n}" } ]
powershell
chosen
[ { "from": "system", "value": "Replace aliases with full commands\n" }, { "from": "human", "value": "$packageName = \"ChocolateyGUI\";\r\n$fileType = 'msi';\r\n$silentArgs = '/qr /norestart'\r\n$validExitCodes = @(0)\r\n\r\n$packageGuid = Get-ChildItem HKLM:\\SOFTWARE\\Classes\\Installer\\Product...
powershell
chosen
[ { "from": "system", "value": "Work around MSBuild race condition\n" }, { "from": "human", "value": "# Examine an MSBuild log and issue an error if any MSBulid warnings are discovered.\n\nparam ([string]$logFile = $(throw \"Need a build log file\"))\n$ErrorActionPreference=\"Stop\"\n\ntry\n{\n ...
powershell
chosen
[ { "from": "system", "value": "Fix Website ScreenShot Update script\n" }, { "from": "human", "value": "if ($env:configuration -eq 'Release' -and $env:appveyor_repo_tag -eq 'true')\n{\n # Switch to GitHub Pages branch\n git checkout gh-pages\n\n # Copy\n Get-ChildItem -Path 'src/UITest...
powershell
chosen
[ { "from": "system", "value": "Make sure signing doesn't fail on dev box.\n" }, { "from": "human", "value": "param($VSIXPath)\r\n\r\nif ($Env:APPVEYOR_PULL_REQUEST_NUMBER -ne $null)\r\n{\r\n return\r\n}\r\n\r\n$ToolPath = (Join-Path $PSScriptRoot '..\\packages\\Microsoft.VSSDK.Vsixsigntool.14...
powershell
chosen
[ { "from": "system", "value": "Save last object in the pipeline to a variable\n" }, { "from": "human", "value": "Write-Verbose -Message (Get-DotFilesMessage -Message 'Configuring PowerShell ...')\n\n# Default to UTF-8 encoding with Out-File\n$PSDefaultParameterValues['Out-File:Encoding'] = 'utf8'...
powershell
chosen
[ { "from": "human", "value": "Add a sample that shows settings for enabling the registration functionality.\n" }, { "from": "gpt", "value": "# DSC configuration for Pull Server and Compliance Server\n# Prerequisite: Certificate \"CN=PSDSCPullServerCert\" in \"CERT:\\LocalMachine\\MY\\\" store\n# ...
powershell
chosen
[ { "from": "system", "value": "Build and pack binaries and symbols in one command.\n" }, { "from": "human", "value": "cd .\\Schemavolution.Specification\\\ndotnet build\ndotnet pack --include-symbols\ncd ..\\\n\ncd .\\Schemavolution.DDD\\\ndotnet build\ndotnet pack --include-symbols\ncd ..\\\n\nc...
powershell
chosen
[ { "from": "human", "value": "Add update script to udpate dockerd+docker\n" }, { "from": "gpt", "value": "stop-service docker\nwget -outfile C:\\Windows\\System32\\dockerd.exe -uri https://master.dockerproject.org/windows/amd64/dockerd.exe\nwget -outfile C:\\Windows\\System32\\docker.exe -uri htt...
powershell
chosen
[ { "from": "system", "value": "Use my profile not the demo.\n" }, { "from": "human", "value": "\n# Add the git SSH agent to the PATH to avoid \"could not find ssh-agent\"\n$env:path += \";\" + (Get-Item \"Env:ProgramFiles(x86)\").Value + \"\\Git\\bin\"\n\n# Load posh-git example profile\n. 'C:\\...
powershell
chosen
[ { "from": "system", "value": "Update link to master binaries\n" }, { "from": "human", "value": "stop-service docker\n$wc = New-Object net.webclient\n$wc.Downloadfile(\"https://master.dockerproject.org/windows/amd64/dockerd.exe\", \"$env:ProgramFiles\\docker\\dockerd.exe\")\n$wc.Downloadfile(\"ht...
powershell
chosen
[ { "from": "human", "value": "Add an Appveyor powershell script\n" }, { "from": "gpt", "value": "$Script = Invoke-WebRequest 'https://raw.githubusercontent.com/ndmitchell/neil/master/misc/appveyor.ps1'\n$ScriptBlock = [Scriptblock]::Create($Script.Content)\nInvoke-Command -ScriptBlock $ScriptBloc...
powershell
chosen
[ { "from": "system", "value": "Revert \"Attempted fix for Appveyor \"error\"\"\n\nThis reverts commit b750ac1c3ed08fe074ee15f14d255bcfd19a4e6f.\n" }, { "from": "human", "value": "if (Test-Path Env:\\APPVEYOR) {\n $version = (Get-Content -Raw -Path package.json | ConvertFrom-Json).version\n ...
powershell
chosen
[ { "from": "system", "value": "Work around bug in CommandLineParser.\n" }, { "from": "human", "value": "# Copyright(c) 2017 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...
powershell
chosen
[ { "from": "system", "value": "Fix issues running Docker during Windows build.\n" }, { "from": "human", "value": "# Based on https://github.com/appveyor/ci/blob/master/scripts/docker-appveyor.psm1, adapted to use C: instead of D:\n\nRemove-SmbShare -Name C -ErrorAction SilentlyContinue -Force\n$p...
powershell
chosen
[ { "from": "human", "value": "Add a script to uninstall Windows built-in applications\n" }, { "from": "gpt", "value": "Get-AppxPackage *3d* | Remove-AppxPackage\nGet-AppxPackage *Microsoft.3DViewer* | Remove-AppxPackage\nGet-AppxPackage *messaging* | Remove-AppxPackage\nGet-AppxPackage *Microsoft...
powershell
chosen
[ { "from": "human", "value": "Add script to build and publish modules\n" }, { "from": "gpt", "value": "Write-Host \"Ensure the CSPROJ files have been updated first!\"\nWrite-Host \"Press enter in order to create and publish new package...\"\nRead-Host\n\nPush-Location .\\src\n\n$moduleDirs = Get...
powershell
chosen
[ { "from": "system", "value": "Improve docker rmi, keeping all base images\n\nSigned-off-by: Stefan Scherer <2fe843265e65a9540d5df64f4bed2ee6b7ca283e@icloud.com>\n" }, { "from": "human", "value": "$ErrorActionPreference = 'Stop';\n$files = \"\"\nWrite-Host Starting build\n\nWrite-Host Updating ba...
powershell
chosen
[ { "from": "human", "value": "Include the sp2 script for future use\n" }, { "from": "gpt", "value": "Write-Host \"Downloading Windows 7 Service Pack 2\"\n(New-Object System.Net.WebClient).DownloadFile('https://download.windowsupdate.com/d/msdownload/update/software/updt/2016/05/windows6.1-kb31255...
powershell
chosen
[ { "from": "system", "value": "Use the latest NuGet version.\n" }, { "from": "human", "value": "$toolsDirectory = '.\\tools'\nif (!(Test-Path -path $toolsDirectory )) { New-Item $toolsDirectory -Type Directory }\n\n$nuget = '.\\tools\\nuget.exe'\nif ((Test-Path $nuget) -eq $false) {\n Invoke-Web...
powershell
chosen
[ { "from": "system", "value": "Support building from Git tag\n\nShould really just replace this with an ADO trigger.\n" }, { "from": "human", "value": "$branch = [uri]::EscapeDataString($env:PSES_BRANCH)\n$headers = @{Authorization = \"Bearer $env:SYSTEM_ACCESSTOKEN\"}\n\n$buildsUrl = $env:VSTS_P...
powershell
chosen
[ { "from": "system", "value": "Update coverage filter to ignore generated annotations.\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 \"A...
powershell
chosen
[ { "from": "human", "value": "Add http url check powershell script\n" }, { "from": "gpt", "value": "#\n# check-windows-http.ps1\n#\n# DESCRIPTION:\n# This plugin checks availability of link provided as param\n#\n# OUTPUT:\n# plain text\n#\n# PLATFORMS:\n# Windows\n#\n# DEPENDENCIES:\n# ...
powershell
chosen
[ { "from": "system", "value": "Correct case of $PSUICulture special variable\n" }, { "from": "human", "value": "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License.\nDescribe \"Get-UICulture\" -Tags \"CI\" {\n It \"Should have $ PsUICulture variable be...
powershell
chosen
[ { "from": "system", "value": "Add more powershell git alias\n" }, { "from": "human", "value": "New-Alias grrr git-reset-to-remote-branch.ps1\n\nfunction _NMK_GIT_LOG_ONE_LINE { git log --oneline --decorate --graph --color=auto $args }\nNew-Alias lol _NMK_GIT_LOG_ONE_LINE\n\nfunction _NMK_GIT_PU...
powershell
chosen
[ { "from": "system", "value": "Update package.(Chrome Driver 2.16 release)" }, { "from": "human", "value": "# constants\n$version = \"2.15\"\n$driverName = \"chromedriver.exe\"\n$zipName = \"chromedriver_win32.$version.zip\"\n$downloadUrl = \"https://chromedriver.storage.googleapis.com/$version/c...
powershell
chosen
[ { "from": "system", "value": "[StandardPublishingCMS][LANG03] Change the logic to activate the language switcher feature in ALL webs\n" }, { "from": "human", "value": "# -----------------------------------------------------------------------\n# Copyright\t\t: GSoft @2014\n# Model \t\t: Cross S...
powershell
chosen
[ { "from": "system", "value": "Add shebang to pwsh script.\n" }, { "from": "human", "value": "$ErrorActionPreference = 'Stop'\nPush-Location $PSScriptRoot\ntry {\n if (-not (Test-Path ./tools/bin/Build) -or\n (Get-ChildItem ./tools/Build/* | Measure-Object LastWriteTime -Maximum).Maximum -g...
powershell
chosen
[ { "from": "system", "value": "Replace alias ipmo with full cmdlet name\n" }, { "from": "human", "value": "ipmo xDSCResourceDesigner\n\n$resProperties = @{\n Name = New-xDscResourceProperty -Description 'Name of the PS Remoting Endpoint' `\n ...
powershell
chosen
[ { "from": "human", "value": "Test - @ConstantineK - please note my use of a constant here\n" }, { "from": "gpt", "value": "Write-Host -Object \"Running $PSCommandpath\" -ForegroundColor Cyan\nDescribe \"Get-DbaRegisteredServersStore Integration Tests\" -Tags \"IntegrationTests\" {\n\tContext \...
powershell
chosen
[ { "from": "system", "value": "tests: Use new env variable for layers location\n\nConflicts:\n\ttests/run_all_tests_with_layers.ps1\n" }, { "from": "human", "value": "Param([switch]$Debug)\r\n\r\nif ($Debug) {\r\n $dPath = \"Debug\"\r\n} else {\r\n $dPath = \"Release\"\r\n}\r\n\r\necho $dPa...
powershell
chosen
[ { "from": "system", "value": "tests: Return errorcode on Windows if layer tests fail\n" }, { "from": "human", "value": "# Be sure to run \"Set-ExecutionPolicy RemoteSigned\" before running powershell scripts\n\n# Use TestExceptions to filter out tests with known problems, separated by a colon\n#...
powershell
chosen
[ { "from": "system", "value": "Refactor deployment script into function\n" }, { "from": "human", "value": "$esfSolutionDirectory = \"C:\\Sources\\esf\\source\\\"\n$mongoDBServerDirectory = \"C:\\Program Files\\MongoDB\\Server\\3.2\\bin\\\"\n$mongoDBServer = $mongoDBServerDirectory + \"mongod.exe\...
powershell
chosen
[ { "from": "system", "value": "Update SymbolSource duplicate package error\n" }, { "from": "human", "value": "param(\r\n\t$prereleaseVersion = (property prereleaseVersion \"beta-1\"),\r\n\t$ignoreNugetPushErrors = (property ignoreNugetPushErrors \"The underlying connection was closed: An unexpect...
powershell
chosen
[ { "from": "system", "value": "Correct install script to use correct place for major version.\n" }, { "from": "human", "value": "$regex = New-Object System.Text.RegularExpressions.Regex('<MajorVersion>(\\d\\.\\d)</MajorVersion>')\n$m = $regex.Match((Get-Content citest.props))\n$majorMinor = $m.Gr...
powershell
chosen
[ { "from": "system", "value": "Update PowerShell to make it compatible with AzureRM 5, remove KeyVault (too long for given time in workshop)\n" }, { "from": "human", "value": "# Check if user is already signed in\nTry {\n Get-AzureRmContext | Out-Null\n} Catch {\n if ($_ -like \"*Login-AzureRm...
powershell
chosen
[ { "from": "system", "value": "Add PSReadline handler for inserting paired parenthesis\n" }, { "from": "human", "value": "if (Get-Module -Name PSReadLine -ListAvailable) {\n if ($Host.Name -eq 'ConsoleHost') {\n Write-Verbose -Message '[dotfiles] Loading PSReadLine settings ...'\n ...
powershell
chosen
[ { "from": "system", "value": "Add suppression of warning for MS policy\n\nBecause we are using a direct invocation of ConvertTo-SecureString it triggers a warning by MS tools that secrets are not allowed to be checked in to our repository. This suppresses this warning.\n" }, { "from": "human", "...
powershell
chosen
[ { "from": "system", "value": "Mark SendGreeting module tests as slow\n" }, { "from": "human", "value": "Describe \"Send-Greeting cmdlet\" {\n It \"Should be able build the cmdlet\" {\n Remove-Item -Recurse -Force bin -ErrorAction SilentlyContinue\n dotnet restore --verbosity Err...
powershell
chosen
[ { "from": "system", "value": "Add Docker aliases: d, dc, dm\n" }, { "from": "human", "value": "sv DESKTOP (Join-Path $HOME Desktop) -Option ReadOnly, AllScope\nsv DOWNLOADS (Join-Path $HOME Downloads) -Option ReadOnly, AllScope\nsv PROFILEDIR (Split-Path $PROFILE) -Option ReadOnly, AllScope\nsv ...
powershell
chosen
[ { "from": "system", "value": "Fix powershell module to support new parameters.\n" }, { "from": "human", "value": "function Save-Configuration\n{\n\tparam\n\t(\n\t\t[Parameter(Mandatory=$true)]\n\t\t[string]$repositoryPath,\n\t\t[Parameter(ParameterSetName=\"export\",Mandatory=$true)]\n\t\t[stri...
powershell
chosen
[ { "from": "system", "value": "Use five-digit dev build suffixes\n" }, { "from": "human", "value": "Push-Location $PSScriptRoot\n\nif(Test-Path .\\artifacts) { Remove-Item .\\artifacts -Force -Recurse }\n\n& dotnet restore --no-cache\n\n$branch = @{ $true = $env:APPVEYOR_REPO_BRANCH; $false = $(g...
powershell
chosen
[ { "from": "system", "value": "Set verbose logging in aver\n" }, { "from": "human", "value": "# Create a build tag, formatted like {build}.{branch}.{sha7}\n# Use aver to patch versions of assemblies and nupkg-packages\n$sha = \"$env:APPVEYOR_REPO_COMMIT\".substring(0,7)\n$env:MY_BUILD_TAG = \"$en...
powershell
chosen
[ { "from": "system", "value": "Fix build when VS2017 is the only thing installed\n" }, { "from": "human", "value": "param($scriptRoot)\n\n$ErrorActionPreference = \"Stop\"\n$programFilesx86 = ${Env:ProgramFiles(x86)}\n$msBuild = \"$programFilesx86\\MSBuild\\14.0\\bin\\msbuild.exe\"\n$nuGet = \"$s...
powershell
chosen
[ { "from": "system", "value": "Make spec pass by resetting lastexitcode\n" }, { "from": "human", "value": "$framework = '3.5'\r\n\r\ntask default -depends AspNetCompiler\r\n\r\ntask AspNetCompiler {\r\n try {\r\n aspnet_compiler\r\n }\r\n catch [Exception]{\r\n if ($LastExitCode -ne 1) {...
powershell
chosen
[ { "from": "system", "value": "Add logic to delete old resource group (testing)\n" }, { "from": "human", "value": "param\n(\n [string]\n $ResourceGroupName\n)\n\n#Login-AzureRmAccount\n\n$rg = New-AzureRmResourceGroup -Name $ResourceGroupName -Location \"ukwest\"\nNew-AzureRmResourceGroupDe...
powershell
chosen
[ { "from": "system", "value": "Upgrade to VM version 7.0.25\n" }, { "from": "human", "value": "\n# Powershell script to pull the VM files from GitHub into the current folder.\n# Edit the following to match the version of the VM that is compatible with this image\n\nparam \n(\n [string]$VMversi...
powershell
chosen
[ { "from": "system", "value": "Fix extension for fzf release" }, { "from": "human", "value": "$ErrorActionPreference = \"Stop\"\n\n# Force bootstrap of the Nuget PackageManagement Provider; Reference: http://www.powershellgallery.com/GettingStarted?section=Get%20Started \nGet-PackageProvider -Nam...
powershell
chosen
[ { "from": "system", "value": "Build script updated to work with nuget.exe v3.\n" }, { "from": "human", "value": "\r\nPush-Location MayBee\r\n\r\nnuget pack -Build -Prop Configuration=Release -Output ..\\..\\..\\LocalNugetFeed\r\n\r\nPop-Location\r\n\r\nPush-Location MayBee.Serialization.JsonNet\...
powershell
chosen
[ { "from": "human", "value": "Add a framework for automated tests.\n" }, { "from": "gpt", "value": "<#\n Automated Tests\n\n Part of: PSql - Simple PowerShell Cmdlets for SQL Server\n Copyright (C) 2016 Jeffrey Sharp\n https://github.com/sharpjs/PSql\n\n Permission is hereby grante...
powershell
chosen
[ { "from": "system", "value": "Add AlignAssignmentRule to code formatting settings\n" }, { "from": "human", "value": "@{\n IncludeRules = @(\n 'PSPlaceOpenBrace',\n 'PSPlaceCloseBrace',\n 'PSUseConsistentIndentation',\n 'PSUseConsistentWhitespace'\n )\n\n Rule...
powershell
chosen
[ { "from": "system", "value": "Modify substrate build to use 64 bit Puppet\n" }, { "from": "human", "value": "<#\n.SYNOPSIS\n Creates a Vagrant installer.\n\n.PARAMETER OutputDir\n The directory to put the outputted substrate package.\n#>\nParam(\n [Parameter(Mandatory=$true)]\n [stri...
powershell
chosen
[ { "from": "system", "value": "Fix some incorrect build script paths\n" }, { "from": "human", "value": "Push-Location $PSScriptRoot\\..\\Couchbase.Lite\n\n$VSRegistryKey = \"HKLM:\\SOFTWARE\\WOW6432Node\\Microsoft\\VisualStudio\\SxS\\VS7\"\n$VSInstall = (Get-ItemProperty -Path $VSRegistryKey -Nam...
powershell
chosen
[ { "from": "system", "value": "Initialize the ChefDK Ruby in PowerShell.\n" }, { "from": "human", "value": "# Use the Git and posh-git from GitHub for Windows.\n# See <http://stackoverflow.com/a/12524788>\n. (Resolve-Path \"$env:LOCALAPPDATA\\GitHub\\shell.ps1\")\n. $env:github_posh_git\\profile....
powershell
chosen
[ { "from": "system", "value": "Move to shared build script.\n" }, { "from": "human", "value": "dotnet restore\ncd src\nGet-ChildItem | foreach {\n cd $_\n dotnet pack -c Release\n cd ..\n}\ncd .." }, { "from": "gpt", "value": "iex ((new-object net.webclient).DownloadString('https:/...
powershell
chosen
[ { "from": "system", "value": "Fix setting up PATH environment variable\n\nWhen adding Python to users PATH env variable use users variable value,\nnot the current process one.\n" }, { "from": "human", "value": "[CmdletBinding()]\nParam(\n [string]$pythonPath,\n [string]$pythonExePath,\n [stri...
powershell
chosen
[ { "from": "system", "value": "Update Pester test for calling native Linux commands for isssue 138\n" }, { "from": "human", "value": "Describe \"NativeLinuxCommands\" {\n It \"Should return a type of System.Object for hostname cmdlet\" {\n (hostname).GetType().BaseType | Should Be 'System.O...
powershell
chosen
[ { "from": "system", "value": "Remove Write-ChocolateyFailure and try/catch which is no longer necessary\n" }, { "from": "human", "value": "$packageName = 'ChocolateyGUI'\n$fileType = 'msi'\n$silentArgs = '/quiet'\n$scriptPath = $(Split-Path $MyInvocation.MyCommand.Path)\n$fileFullPath = Join-Pa...
powershell
chosen
[ { "from": "human", "value": "Add script to run client on school computers" }, { "from": "gpt", "value": "$original_dir = (Get-Item -Path \".\\\" -Verbose).FullName\r\ncd C:\\ProgramData\\App-V\\C87BE6C9-9379-431A-AE70-FD15E8F1AACA\\BBA5E63B-FA99-4CF9-9FA8-1991602E58BC\\root\\VFS\\ProgramFilesX64...
powershell
chosen
[ { "from": "human", "value": "Add powershell script for attaching a harddisk to a guest\n" }, { "from": "gpt", "value": "#Requires -Modules VagrantMessages\n\nparam(\n [Parameter(Mandatory=$true)]\n [string]$VmId,\n [string]$ControllerType,\n [string]$ControllerNumber,\n [string]$C...
powershell
chosen
[ { "from": "system", "value": "Add module variable for module root path\n" }, { "from": "human", "value": "<# ----------------- DEBUGGING ONLY -- REMOVED DURING BUILD ----------------- #>\n\n# Get and dot source all helper functions (internal)\nSplit-Path -Path $PSCommandPath |\n Get-ChildItem...
powershell
chosen
[ { "from": "system", "value": "Fix error that happens when all user accounts are banned" }, { "from": "human", "value": "$usernamesPath = \".\\usernames.txt\"\n$bannedpath = \".\\banned.txt\"\n$csvpath = \".\\usernames.csv\"\n$usernames = get-content -path $usernamesPath -ErrorAction Stop\n$banne...
powershell
chosen