conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Update windows_feature.ps1 fact to run on x64\n" }, { "from": "human", "value": "$features = @()\n\ntry\n{\n $features = Get-WindowsFeature |\n ? { $_.Installed } |\n Select -ExpandProperty Name\n}\ncatch {}\n\n\"windows_features=$($features -join ',')\"\n" ...
powershell
chosen
[ { "from": "system", "value": "Whitelist netcat in e2e tests\n" }, { "from": "human", "value": "# Windows updates cause the node to reboot at arbitrary times.\n& sc.exe config wuauserv start=disabled\n& sc.exe stop wuauserv\n\ncurl.exe -sLO https://github.com/kubernetes-sigs/sig-windows-tools/rel...
powershell
chosen
[ { "from": "system", "value": "Fix choco uninstall package name\n" }, { "from": "human", "value": "$packageName = 'cmder.portable'\n$toolsPath = \"$(Split-Path -parent $MyInvocation.MyCommand.Definition)\"\n$unPath = Join-Path $toolsPath 'Uninstall-ChocolateyPath.psm1'\n$installPath = \"$env:Choc...
powershell
chosen
[ { "from": "system", "value": "Fix for WFCORE-3789, CLI, powershell option handling\n" }, { "from": "human", "value": "#############################################################################\n# ##\n# WildFly CLI Scr...
powershell
chosen
[ { "from": "human", "value": "Add build local powershell to build on windows client\n" }, { "from": "gpt", "value": "# Look for config.json file\n$FILE=\".docker/build/config.json\"\nif ((Test-Path $FILE) -eq $false) {\n Write-Error \"File $FILE does not exist.\"\n}\n\n# In case you want to bui...
powershell
chosen
[ { "from": "system", "value": "Fix a bug in a test helper function\n" }, { "from": "human", "value": "Function Get-ExtentText\n{\n\tParam(\n\t[Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic.CorrectionExtent] $violation,\n\t[string] $scriptPath\n\t)\n\t$scriptContent = Get-Content -Path $scri...
powershell
chosen
[ { "from": "human", "value": "Add a basic PowerShell profile\n" }, { "from": "gpt", "value": "Import-Module PSReadLine\n\nSet-PSReadLineOption -EditMode Vi\n\nSet-PSReadlineKeyHandler -Key UpArrow -Function HistorySearchBackward\nSet-PSReadlineKeyHandler -Key DownArrow -Function HistorySearchForw...
powershell
chosen
[ { "from": "system", "value": "Fix resource group names in swap ps1 file\n" }, { "from": "human", "value": "# make sure the script stops if one of the swaps failed\n$ErrorActionPreference = \"Stop\"\n\nSelect-AzureRmSubscription -SubscriptionName \"Websites migration\"\n\n$ParametersObject = @{\...
powershell
chosen
[ { "from": "human", "value": "Add powershell equivalent of build script\n" }, { "from": "gpt", "value": "<#\n .DESCRIPTION\n Runs a docker build for the DSE version specified in the DSE_VERSION file.\n#>\n\n$scriptPath = Split-Path -parent $PSCommandPath\n\n# Use contents of DSE_VERSION fil...
powershell
chosen
[ { "from": "human", "value": "Add build script for 2022" }, { "from": "gpt", "value": "param (\n [bool]$DoNotVagrantIfy = $false\n)\n\n$here = \"$(Split-Path -parent $MyInvocation.MyCommand.Definition)\"\n\n$Timer = [Diagnostics.Stopwatch]::StartNew()\n\nif($DoNotVagrantIfy)\n{\n packer bui...
powershell
chosen
[ { "from": "human", "value": "Add PowerShell completion support for Docker\n" }, { "from": "gpt", "value": "if ($DotFilesShowScriptEntry) {\n Write-Verbose -Message (Get-DotFilesMessage -Message $PSCommandPath)\n}\n\nif (!(Get-Command -Name docker -ErrorAction Ignore)) {\n Write-Verbose -Me...
powershell
chosen
[ { "from": "system", "value": "Add logging to verion bump script\n" }, { "from": "human", "value": "\n$buildNumber = $env:APPVEYOR_BUILD_VERSION\n$buildFolder = '.'\n\nif($env:APPVEYOR_BUILD_FOLDER) {\n\t$buildFolder = $env:APPVEYOR_BUILD_FOLDER\n}\n\n$projectFilePath = Join-Path $buildFolder \"s...
powershell
chosen
[ { "from": "human", "value": "Install file for google sysprep scripts.\n" }, { "from": "gpt", "value": "# Copyright 2015 Google Inc. 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 License.\n# ...
powershell
chosen
[ { "from": "system", "value": "Update environment variables instead of writing appsettings.json.\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 L...
powershell
chosen
[ { "from": "system", "value": "Install scoop only if the cmd 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-I...
powershell
chosen
[ { "from": "system", "value": "Enable Bash on Ubuntu on Windows\n" }, { "from": "human", "value": "# Dev Machine Powershell setup - Requires Admin prompt\n\n# Chocolatey install\niex ((new-object net.webclient).DownloadString('http://bit.ly/psChocInstall'))\n\n# install applications\ncinst slack ...
powershell
chosen
[ { "from": "human", "value": "Add tests for hierarchical paths\n" }, { "from": "gpt", "value": "Describe \"Hierarchical paths\" {\n BeforeAll {\n $data = \"Hello World\"\n Setup -File testFile.txt -Content $data\n }\n\n It \"should work with Join-Path \" {\n $testPat...
powershell
chosen
[ { "from": "system", "value": "Add additional generally uninteresting AD User properties\n" }, { "from": "human", "value": "if (!(Test-IsWindows)) {\n return\n}\n\nif (!(Get-Module -Name ActiveDirectory -ListAvailable)) {\n Write-Verbose -Message '[dotfiles] Skipping ActiveDirectory setting...
powershell
chosen
[ { "from": "system", "value": "Fix out of control clean script\n" }, { "from": "human", "value": "param(\n [Parameter(Mandatory=$true)][string]$apikey)\n \n$url=\"http://mobile.nuget.couchbase.com/nuget/CI/Packages()?`$format=json\"\n$content=$(Invoke-WebRequest $url).Content\n$results = $(...
powershell
chosen
[ { "from": "system", "value": "Correct typo in chef-dk installer name\n" }, { "from": "human", "value": "# Download the chef-solo installer\r\n$chefSoloInstaller = Join-Path $tmpDir 'chef-solo.msi'\r\nWrite-Host \"Downloading chef-solo MSI to $chefSoloInstaller...\"\r\nDoFileDownload 'https://www...
powershell
chosen
[ { "from": "system", "value": "Refactor and fix for choco version\n" }, { "from": "human", "value": "Param(\r\n [Parameter(Mandatory=$true)][string]$version\r\n)\r\n\r\n$chocoInstall = 'chocolatey\\tools\\chocolateyInstall.ps1'\r\n$setup = \"build\\installers\\headset-$version-setup.exe\"\r\n\r\...
powershell
chosen
[ { "from": "system", "value": "Add 'alpha' prelease designation for version 4.8.0\n" }, { "from": "human", "value": "@{\r\n RootModule = 'psake.psm1'\r\n ModuleVersion = '4.8.0'\r\n GUID = 'cfb53216-072f-4a46-8975-ff7e6bda05a5'\r\n Author = 'James Ko...
powershell
chosen
[ { "from": "system", "value": "Refactor postbuild js/html processing script\n" }, { "from": "human", "value": "Param([Parameter(Mandatory = $True, Position = 1)][string] $dir)\n$ErrorActionPreference = \"Stop\"\n\nSet-Location $dir\n\nForEach($file in Get-ChildItem -Include *.js, *.html -Recurse)...
powershell
chosen
[ { "from": "system", "value": "Update Coverity Scan script to v7.6.0\n" }, { "from": "human", "value": "# Move to the project root folder (parent from current script folder)\n\nfunction Get-ScriptDirectory\n{ \n $Invocation = (Get-Variable MyInvocation -Scope 1).Value \n Split-Path $Invocat...
powershell
chosen
[ { "from": "human", "value": "Create script to build on windows\n" }, { "from": "gpt", "value": "docker build -q -f Dockerfile.windows.ci -t ruby-slim .\ndocker run -ti --rm -v ${PWD}:C:\\stack_master -w C:\\stack_master ruby-slim gem build stack_master.gemspec\n" } ]
powershell
chosen
[ { "from": "system", "value": "Make sure profile is sourced\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 $PROFILE\n ...
powershell
chosen
[ { "from": "system", "value": "Fix package installer to use default directory\n" }, { "from": "human", "value": "$packageName = 'PneumaticTube.portable' \n$url = 'https://github.com/hartez/PneumaticTube/releases/download/1.0.2/PneumaticTube.zip' \n\ntry { \n $binRoot = Get-BinRoot\n $installDir...
powershell
chosen
[ { "from": "system", "value": "Use netapi-helper base image for 1709\n" }, { "from": "human", "value": "$version=$(select-string -Path Dockerfile -Pattern \"ENV PROMETHEUS_VERSION\").ToString().split()[-1]\ndocker tag prometheus stefanscherer/prometheus-windows:$version-2016\ndocker push stefansc...
powershell
chosen
[ { "from": "system", "value": "Fix for it not working with windows\n" }, { "from": "human", "value": "git clone https://github.com/CorruptComputer/Officer-Beepsky\n\ncd Officer-Beepsky\n\n$token = Read-Host -Prompt 'What is the Discord token? '\n\n$owner = Read-Host -Prompt 'What is the Discord I...
powershell
chosen
[ { "from": "human", "value": "Add sync-WsusClient to force computers to check in with update server\n" }, { "from": "gpt", "value": "function sync-WsusClient {\n <#\n.SYNOPSIS\n Function to force the given computer(s) to check for updates and check in with the WSUS server\n.DESCRIPTION\n ...
powershell
chosen
[ { "from": "human", "value": "Add a script to update package\n" }, { "from": "gpt", "value": "function Update-Package\n{\n [CmdletBinding()]\n Param\n (\n # Name of the package\n [Parameter(Mandatory=$true,\n Position=0)]\n [string[]]\n $Nam...
powershell
chosen
[ { "from": "system", "value": "Fix typo in artifact script.\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$zip = \"colore.zip...
powershell
chosen
[ { "from": "system", "value": "Allow the password for the created user to be supplied at the command line.\n" }, { "from": "human", "value": "param\r\n(\r\n [Parameter(Mandatory=$true)]\r\n [string]$user\r\n)\r\n$Computer = [ADSI]\"WinNT://$Env:COMPUTERNAME,Computer\"\r\n\r\n$LocalUser = $Com...
powershell
chosen
[ { "from": "system", "value": "Set path in Publish script\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 mast...
powershell
chosen
[ { "from": "system", "value": "windows: Allow run_all_tests.ps1 to skip tests\n\nUse -TestExceptions to filter out tests with known problems.\nTest list should follow a space, separated by a colon, i.e.\n\npowershell -command .\\run_all_tests.ps1 -TestExceptions ^\nVkLayerTest.RequiredParameter:^\nVkLayerTes...
powershell
chosen
[ { "from": "human", "value": "Upgrade packges script. Keeps things up to date.\n" }, { "from": "gpt", "value": "echo \"Upgrading NCU:\"\nnpm install -g npm-check-updates\n\ncd packages\n\necho \"Upgrading ste-core:\"\ncd ste-core\nncu -u\nnpm install\ncd ..\n\necho \"Upgrading ste-events:\"\ncd s...
powershell
chosen
[ { "from": "system", "value": "Allow force of native build through an environment variable\n" }, { "from": "human", "value": "$files = git diff --name-only HEAD~1 HEAD\n\nif ($files -contains \"ImageMagick/Source/ImageMagick.commit\") {\n Write-Host \"##vso[task.setvariable variable=BuildNativ...
powershell
chosen
[ { "from": "system", "value": "Fix git function where it does not handle /.\n" }, { "from": "human", "value": "function IsDirty {\n if((git status -s --ignore-submodules=dirty).length -ne 0) {\n return 1\n }\n\n return 0\n}\n\nfunction GetCurrentGitBranch {\n $ref=git symbolic...
powershell
chosen
[ { "from": "system", "value": "Fix test results file name\n" }, { "from": "human", "value": "$env:PSModulePath = \"${PWD}\\packages;\" + $env:PSModulePath\n\n.\\paket\\paket.bootstrapper.exe\n.\\paket\\paket.exe restore\n\nImport-Module .\\PSForge.psm1\n\nInvoke-Pester -Path .\\PSForge.Tests.ps1 ...
powershell
chosen
[ { "from": "system", "value": "Include Git in base image" }, { "from": "human", "value": "$scriptName = 'buildAgent.ps1'\r\n\r\n# Common expression logging and error handling function, copied, not referenced to ensure atomic process\r\nfunction executeExpression ($expression) {\r\n\t$error.clear(...
powershell
chosen
[ { "from": "system", "value": "Comment out my profile, for now.\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. '...
powershell
chosen
[ { "from": "system", "value": "Add the exit code to the remote result\n" }, { "from": "human", "value": "param(\n [string] $server = $env:TEST_SERVER,\n [string] $userName = $env:TEST_SERVER_USER,\n [string] $password = $env:TEST_SERVER_PASS,\n [string] $serverFolder = \"dev\"\n)\n$Er...
powershell
chosen
[ { "from": "system", "value": "Extend the timeout for dailogflow tests.\n" }, { "from": "human", "value": "# Copyright(c) 2018 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 c...
powershell
chosen
[ { "from": "system", "value": "Fix pester tests on Unix\n" }, { "from": "human", "value": "\n\nif([Environment]::OSVersion.Platform -eq \"Unix\"){\n $env:PSModulePath = \"${PWD}/packages:\" + $env:PSModulePath\n mono .nuget/nuget.exe install -ExcludeVersion\n}else{\n $env:PSModulePath = ...
powershell
chosen
[ { "from": "system", "value": "Split long line to improve future parallel updates\n\nWhen each exported member is on a new line, multiple PR can be created\nsimultaneously that all add a new member in this file and still there\nwill be no merge conflict\n" }, { "from": "human", "value": "Resolve-...
powershell
chosen
[ { "from": "system", "value": "Fix multiarray import error on appveyor\n\nFix numpy multiarray import error for Python < 3.5 in appveyor builds.\nRefer to: https://github.com/matplotlib/matplotlib/issues/6115\n" }, { "from": "human", "value": "# Sample script to install Miniconda under Windows\n#...
powershell
chosen
[ { "from": "system", "value": "Use a .NET API call instead of a Win8+ cmdlet\n\nThe root cause is that Windows 7 doesn't have Get-NetIPAddress (\nsee:\nhttps://stackoverflow.com/questions/19529442/gather-ip-address-information\n)\nbut the change was to try and solve the bug that the VPN IP\naddresses\naren't...
powershell
chosen
[ { "from": "system", "value": "Add conemu and msys2 via chocolatey\n" }, { "from": "human", "value": "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))\n" }, { "from": "gpt", "value": "Set-ExecutionPolicy Unrestricted\niex ((New-Object System...
powershell
chosen
[ { "from": "human", "value": "Add MSOnline settings with ignored user properties\n" }, { "from": "gpt", "value": "if ($DotFilesShowScriptEntry) {\n Write-Verbose -Message (Get-DotFilesMessage -Message $PSCommandPath)\n}\n\nif (!(Test-IsWindows)) {\n return\n}\n\ntry {\n if (!$DotFilesFas...
powershell
chosen
[ { "from": "system", "value": "Update format and error handling\n" }, { "from": "human", "value": "function Set-RDPEnable\n{\n<#\n .SYNOPSIS\n The function Set-RDPEnable enable RDP remotely using the registry\n\n .DESCRIPTION\n The function Set-RDPEnable enable RDP remotely u...
powershell
chosen
[ { "from": "human", "value": "Add script to update subtree\n" }, { "from": "gpt", "value": "# git subtree add --prefix .github-actions https://github.com/actions/virtual-environments.git master --squash\n\ngit subtree pull --prefix .github-actions https://github.com/actions/virtual-environments.g...
powershell
chosen
[ { "from": "human", "value": "Check ESXi 6.7 support Script\n" }, { "from": "gpt", "value": "# Author: Florian Grehl - www.virten.net\n# Reference: -\n# Description: Check ESXi 6.7 support with JSON based HCL provided by www.virten.net \n# (http://www.virten.net/2016/05/vmware-hcl-in...
powershell
chosen
[ { "from": "system", "value": "Add fix for running in Terminal Services\n" }, { "from": "human", "value": "<# \n.summary\n Test suite for MSFT_xPackageResource.psm1\n#>\n[CmdletBinding()]\nparam()\n\nImport-Module $PSScriptRoot\\..\\DSCResources\\MSFT_xPackageResource\\MSFT_xPackageResource.ps...
powershell
chosen
[ { "from": "system", "value": "Rename Get-ProjectByName to Get-Projects and fix its semantics.\n\nGet-Projects will return zero or more projects under the following\ncontitions:\na) Returns zero or all solution projects selected by wildcard if the\n ProjectName parameter is specified (ProjectName passed th...
powershell
chosen
[ { "from": "system", "value": "Store bin folder from tagged build\n" }, { "from": "human", "value": "$nugetversion = $env:DOTNETR2RMLSTORE_NUGETVERSION\n\nfunction Update-NuspecVersion\n{\n Param ([string]$Version)\n \n foreach ($o in $input) \n {\n Write-output ('Updating nuspec file ' + ...
powershell
chosen
[ { "from": "system", "value": "Install Fira Code font with Chocolatey\n" }, { "from": "human", "value": "### Install handy tools and apps for my dev machine\n### Run this script from an administrative shell\n\nSet-ExecutionPolicy RemoteSigned\n\n# Install Chocolatey\nInvoke-Expression ((New-Objec...
powershell
chosen
[ { "from": "system", "value": "Update the plex install script to use chocolatey\n" }, { "from": "human", "value": "$url = \"http://ninite.com/plex/ninite.exe\"\n$file = \"plex.exe\"\n\n(New-Object net.webclient).DownloadFile($url, $file)\n\n(New-Object -com shell.application).shellExecute($file)"...
powershell
chosen
[ { "from": "system", "value": "Add svn status to powershell profile\n" }, { "from": "human", "value": "function prompt()\n{\n $host.ui.RawUI.WindowTitle = $pwd\n\n Write-Host \"\"\n Write-Host \"$pwd\" -ForegroundColor DarkBlue\n Write-Host \">\" -ForegroundColor DarkMagenta -NoNewlin...
powershell
chosen
[ { "from": "human", "value": "Add Powershell script to build content layer images\n" }, { "from": "gpt", "value": "[CmdletBinding()]\nparam\n(\n\t[Parameter(Mandatory=$True,ValueFromPipeline=$True,ValueFromPipelineByPropertyName=$True,HelpMessage=\"Name of the output image\")]\n\t[string] $Outpu...
powershell
chosen
[ { "from": "system", "value": "Rename duktape release folder on windows as the folder name changed\n" }, { "from": "human", "value": "\nInvoke-WebRequest \"https://github.com/svaarala/duktape-releases/archive/v1.4.0.zip\" -OutFile \".\\dependencies\\duktape-1.4.0.zip\"\n[System.Reflection.Assembl...
powershell
chosen
[ { "from": "system", "value": "Update script to skip uploading on pull requests" }, { "from": "human", "value": "$artifactsSearchPattern = \"./*.vsix\"\n$artifactsCollection = (Get-ChildItem $artifactsSearchPattern -Recurse)\n\n$vsixMyGetUploadEndpoint = \"https://www.myget.org/F/nanoframework-de...
powershell
chosen
[ { "from": "human", "value": "[CI] Add a Powershell script for running tests on windows\n\nSummary:\nThis diff adds a Powershell script which takes the build artifacts from\na windows cross build as an input and run some basic tests on it.\n\nThis version is simple enough to run on any Windows 10 teamcity ag...
powershell
chosen
[ { "from": "system", "value": "Add Azure Db tools (incl CosmosDB)" }, { "from": "human", "value": "###\n### Install Visual Studio Code via Chocolatey and my preferred extensions\n###\n\n$Extensions = @(\n 'ms-dotnettools.csharp',\n 'ms-vscode.powershell',\n 'ms-azuretools.vscode-docker',...
powershell
chosen
[ { "from": "human", "value": "Add example for changing NCM Profile\n" }, { "from": "gpt", "value": "Import-Module SwisPowerShell\n\n# SolarWinds connection details\n$hostname = 'localhost'\n$username = 'admin'\n$password = ''\n\n$swis = Connect-Swis -Hostname $hostname -Username $username -Passwo...
powershell
chosen
[ { "from": "system", "value": "Load https_proxy if http_proxy has been set" }, { "from": "human", "value": "$scriptName = 'buildAgent.ps1'\n\n# Common expression logging and error handling function, copied, not referenced to ensure atomic process\nfunction executeExpression ($expression) {\n\t$er...
powershell
chosen
[ { "from": "human", "value": "Create ps script for common system logs.\n" }, { "from": "gpt", "value": "$scriptLocation = [System.IO.Path]::GetDirectoryName($myInvocation.MyCommand.Definition)\n. \"$scriptLocation\\config.ps1\"\n\nsysteminfo >> \"$openstackLogs\\systeminfo.log\"\nwmic qfe list >>...
powershell
chosen
[ { "from": "system", "value": "Make buildscript also copy pluginbase to VS folder\n" }, { "from": "human", "value": "cd 'Visual Studio Project Template C#'\n& 'C:\\Program Files\\7-Zip\\7z.exe' a -tzip NppPlugin.zip *\ncd ..\n& 'C:\\Program Files\\7-Zip\\7z.exe' a -tzip c:\\temp\\nppDemoAndProjec...
powershell
chosen
[ { "from": "human", "value": "Add a script to which build contains a changese/commit\n" }, { "from": "gpt", "value": "##-----------------------------------------------------------------------\n## <copyright file=\"Get-BuildContainingChangeset.ps1\">(c) Richard Fennell. </copyright>\n##-----------...
powershell
chosen
[ { "from": "human", "value": "Add %UserProfile%\\bin to %PATH% environment variable\n\nThis is necessary for Windows Credential Manager\n" }, { "from": "gpt", "value": "# file : extend-PATH-environment-variable.ps1\n# author : bryjamus <bryjamus@gmail.com>\n# license : MIT\n\n# This script:\n...
powershell
chosen
[ { "from": "system", "value": "tests: Allow filtering loader tests on Windows\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# i.e. ru...
powershell
chosen
[ { "from": "human", "value": "Add build script for pushing packages to NuGet.org\n" }, { "from": "gpt", "value": "[CmdletBinding()]\nParam([Parameter(Mandatory=$True)][Version]$versionNumber)\n\n# Move to the project root folder (parent from current script folder)\n\nfunction Get-ScriptDirectory\...
powershell
chosen
[ { "from": "system", "value": "Upgrade to use v7.0.3 VM by default\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]$...
powershell
chosen
[ { "from": "human", "value": "Add ability to update an APIM Api from a release\n" }, { "from": "gpt", "value": "<#\n.SYNOPSIS\nUpdate an APIM API with a swagger definition\n\n.PARAMETER ResourceGroupName\nThe name of the resource group that contains the APIM instnace\n\n.PARAMETER InstanceName\nT...
powershell
chosen
[ { "from": "system", "value": "Rename 'Dropbox' folder to 'My Dropbox'\n" }, { "from": "human", "value": "param(\n[string]$a\n)\n<# \n.\\go.ps1 \"Text Comment for Commit\"\n\n\tMake sure to have a \"My Dropbox\" link in the Documents Library\n#>\nif (!$a)\n{ \n\t$a = Read-Host 'comment: or (<cr> ...
powershell
chosen
[ { "from": "system", "value": "Add publishing API keys to Whiskey.\n" }, { "from": "human", "value": "[CmdletBinding(DefaultParameterSetName='Build')]\r\nparam(\r\n [Parameter(Mandatory=$true,ParameterSetName='Clean')]\r\n [Switch]\r\n # Runs the build in clean mode, which removes any fi...
powershell
chosen
[ { "from": "system", "value": "Extend Get-MSBuildProject to return the .user project.\n\nAlso fix the Get-ProjectFromName and Get-MSBuildProject parameters to\nmatch the ProjectName property.\n" }, { "from": "human", "value": "<#\nVS+MSBuild.psm1 - Visual Studio and MSBuild utilities.\n\nCopyrigh...
powershell
chosen
[ { "from": "system", "value": "Fix ExecutionPolicy tests to -Skip instead of return\n" }, { "from": "human", "value": "Describe \"ExecutionPolicy\" {\n # We check against Windows because Linux and OS X behavior is the same\n $isWindows = [System.Runtime.InteropServices.RuntimeInformation]::...
powershell
chosen
[ { "from": "system", "value": "Update chocolatey package's zip URL\n" }, { "from": "human", "value": "Install-ChocolateyZipPackage 'bytemark-client' 'http://repo.bytemark.co.uk/bytemark-client/windows/bytemark-0.4.268.zip' \"$(Split-Path -parent $MyInvocation.MyCommand.Definition)\"\r\n" }, ...
powershell
chosen
[ { "from": "human", "value": "Add PowerShell script to run program.\n" }, { "from": "gpt", "value": "$mainClass = \"com.how_hard_can_it_be.primes.App\"\n\n$classPathElements=$(cat classpath.txt | ss -NotMatch '^[ \t]*#|^[ \t]*$')\nwrite-debug \"classPathElements = $classPathElements\"\n$classPath...
powershell
chosen
[ { "from": "system", "value": "Revert \"http - NuGet path test\"\n\nThis reverts commit bbe02093b3859ecaaa54e8e55f0387bb95d0795e.\n" }, { "from": "human", "value": "$root = (split-path -parent $PSScriptRoot)\n\nWrite-Host \"ROOT - \" + $root -ForegroundColor Magenta\n\n$version = [System.Reflecti...
powershell
chosen
[ { "from": "system", "value": "Fix npm installer command again\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 = [System.IO.Compression.Compressio...
powershell
chosen
[ { "from": "system", "value": "Add Windows path for cmake test bundle dependency\n\nSigned-off-by: Jaymala Sinha <a04666c8f252cd920997ac90b34d2eff29d09ccc@chef.io>\n" }, { "from": "human", "value": "echo \"--- system details\"\n$Properties = 'Caption', 'CSName', 'Version', 'BuildType', 'OSArchite...
powershell
chosen
[ { "from": "human", "value": "Add tests for `scoop reset scoop` command\n" }, { "from": "gpt", "value": "set-alias scoop \"$psscriptroot/../bin/scoop.ps1\"\n\ndescribe \"'scoop reset scoop'\" {\n beforeall {\n remove-item \"~/.bashrc.scoop\" -ea ignore\n }\n\n function alias_count {\n (g...
powershell
chosen
[ { "from": "system", "value": "Revert new line from commit dc834cc28f\n\nThis matches how cmd looks in conemu for cmder and PS seems to add some\npadding around command output so I really don't see what the extra new\nline is doing.\n\nSaving dat precious vertical space.\n" }, { "from": "human", ...
powershell
chosen
[ { "from": "system", "value": "Update build to include web.config and clean bin/ folder\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 = [System....
powershell
chosen
[ { "from": "system", "value": "Use gitversion environment variables for script\n" }, { "from": "human", "value": "function NugetPack([bool] $pre) \n{\n $Version = gitversion /output json /showvariable MajorMinorPatch\n if ($pre)\n {\n echo \"Creating pre-release package...\"\n ...
powershell
chosen
[ { "from": "system", "value": "Enhance the cr alias to allow specifying branches.\n" }, { "from": "human", "value": "$proj = (Get-Content .\\GitReview\\GitReview.csproj) -as [Xml]\n$url = $proj.Project.ProjectExtensions.VisualStudio.FlavorProperties.WebProjectProperties.IISUrl.TrimEnd('/') + '/ne...
powershell
chosen
[ { "from": "human", "value": "Add configuration to support SPFx (SharePoint Framework) development" }, { "from": "gpt", "value": "#Script Name: New-EasyDevWorkstation-SPFx.ps1\n#Purpose: Quick and clean way to setup a simple developer workstation for building SPFx (SharePoint Framework) webparts....
powershell
chosen
[ { "from": "system", "value": "Move DotNet install after VS, probably taken care of\n" }, { "from": "human", "value": "## Download Chocolatey Package Manager\nif(-not $env:ChocolateyInstall -or -not (Test-Path \"$env:ChocolateyInstall\"))\n{\n\tiex ((new-object net.webclient).DownloadString('http...
powershell
chosen
[ { "from": "human", "value": "Add attempt at a PowerShell script (not working)\n" }, { "from": "gpt", "value": "$vimInstallDir = \"~\\vimfiles\\bundle\\fsharpbinding-vim\"\n\n$local = Get-Location\n$vimBinDir = Join-Path $local \"ftplugin\\bin\"\n$ftpluginDir = Join-Path $local \"ftplugin\"\n$aut...
powershell
chosen
[ { "from": "human", "value": "Add tests for removal of aliases\n" }, { "from": "gpt", "value": "$removeAliasList = @(\"ac\",\"compare\",\"cpp\",\"diff\",\"sleep\",\"sort\",\"start\",\"cat\",\"cp\",\"ls\",\"man\",\"mount\",\"mv\",\"ps\",\"rm\",\"rmdir\")\n$keepAliasList = @{cd=\"Set-Location\"},@{...
powershell
chosen
[ { "from": "system", "value": "Change the default machine folder for virtualbox VMs\n" }, { "from": "human", "value": "$vbox = (Get-ItemProperty -Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment' `\n -Name \"VBOX_MSI_INSTALL_PATH\").VBOX_MSI_INSTALL_PATH + \"VBoxMa...
powershell
chosen
[ { "from": "system", "value": "Fix bug with windows built script\n" }, { "from": "human", "value": "$BUILD_DIR = \"./dist\"\n$BUNDLE_DIR = \"$BUILD_DIR/improviz-win\"\nmkdir -p $BUILD_DIR\n\ngit clone --depth=1 --branch=master https://github.com/rumblesan/improviz-performance.git $BUNDLE_DIR\nrm ...
powershell
chosen
[ { "from": "system", "value": "Switch from long from double\n" }, { "from": "human", "value": "write-host \"Present working directory: $($pwd)\"\n\n$testsuites = [xml](get-content .\\test-results\\*.xml)\n$anyFailures = $FALSE\n\nforeach ($testsuite in $testsuites.testsuite) {\n\n write-host \...
powershell
chosen
[ { "from": "system", "value": "Add config files to deployment\n" }, { "from": "human", "value": "$binPath = \"..\\src\\RoslynPad\\bin\\Release\"\n$exclude =\n@(\n\t\"Xceed.Wpf.AvalonDock.Themes.Aero.dll\",\n\t\"Xceed.Wpf.AvalonDock.Themes.Metro.dll\",\n\t\"Xceed.Wpf.AvalonDock.Themes.VS2010.dll\"...
powershell
chosen
[ { "from": "system", "value": "Fix one other test file with trailing whitespace\n" }, { "from": "human", "value": "function GoodFunc\n{\n param(\n [Parameter(Mandatory=$true)]\n [ValidateNotNullOrEmpty()] \n [string]\n $Param1,\n [Parameter(Mandatory=$fal...
powershell
chosen
[ { "from": "system", "value": "Change 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).Downloa...
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; noAsync = $true}\n}\n\nTask Build-Develop {\n\tInvoke-Psake default.ps1 -properties @{noAsync = $tr...
powershell
chosen
[ { "from": "human", "value": "Add capacity test for initialsessionstate\n" }, { "from": "gpt", "value": "Describe \"InitialSessionState capacity\" -Tags CI {\n BeforeAll {\n $iss = [initialsessionstate]::CreateDefault()\n\n for ($i = 0; $i -lt 5000; $i++)\n {\n ...
powershell
chosen
[ { "from": "human", "value": "Add script to download and run Windows Console ColorTool\n" }, { "from": "gpt", "value": "# Configure the default color scheme for all Windows consoles\nWrite-Host -ForegroundColor DarkGreen \"Downloading Windows Console ColorTool...\"\n$colorurl = \"https://github....
powershell
chosen