conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Install requirements with pip on appveyor.\n"
},
{
"from": "human",
"value": "# Sample script to install Python and pip under Windows\n# Authors: Olivier Grisel and Kyle Kastner\n# License: CC0 1.0 Universal: http://creativecommons.org/publicdomain/zero/1.0/\n\n$GET... | powershell | chosen |
[
{
"from": "human",
"value": "Add script to configure windows 10"
},
{
"from": "gpt",
"value": "# To use this:\n# 1. Enable running scripts (must be run as an administrator):\n# Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force\n# 2. Unblock this file:\n# Unblock-File -Path ./configure-win... | powershell | chosen |
[
{
"from": "system",
"value": "Remove the Unity3D.DLLs PS module if its loaded.\n"
},
{
"from": "human",
"value": "param($installPath, $toolsPath, $package, $project)\n\nImport-Module (Join-Path $toolsPath Unity3D.DLLs.psd1)"
},
{
"from": "gpt",
"value": "# Copyright (c) 2013 Precisio... | powershell | chosen |
[
{
"from": "human",
"value": "windows-wix: Add a simple helper script\n"
},
{
"from": "gpt",
"value": "# TODO: This script should be replaced with wixproj and/or CPack.\n# TODO: Add Debug mode to override CompressionLevel with \"none\".\n\n# Sample command:\n# .\\build.ps1 -Arch x64 -Version 0.4.... | powershell | chosen |
[
{
"from": "system",
"value": "Use unzip instead of .NET\n"
},
{
"from": "human",
"value": "Write-Host \"Installing chocolatey\"\nSet-ExecutionPolicy Unrestricted\niex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))\n\nWrite-Host \"Installing git\"\nchoco ... | powershell | chosen |
[
{
"from": "system",
"value": "Make sure IIS websockets is installed\n"
},
{
"from": "human",
"value": "$ScriptPath = Split-Path -Parent $MyInvocation.MyCommand.Definition\n\n& \"$ScriptPath\\PowerShellProfile\\Microsoft.PowerShell_profile.ps1\"\n\n## Development Tools for .NET\n\nchoco install V... | powershell | chosen |
[
{
"from": "system",
"value": "Update registry 2.5.1, but still does not work inside a container\n"
},
{
"from": "human",
"value": "mkdir -p C:\\registry-v2\ndocker run -d -p 5000:5000 -v \"C:\\registry-v2:C:\\registry\" stefanscherer/registry-windows:2.4.1\n"
},
{
"from": "gpt",
"val... | 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": "human",
"value": "Add a script to install the PowerShell profile\n"
},
{
"from": "gpt",
"value": "# Overwrite the current PowerShell profile, and hardlink that path to the\n# profile in this repo.\nRemove-Item $profile\nNew-Item -ItemType HardLink -Path $profile -Target \"$PSScriptRoo... | powershell | chosen |
[
{
"from": "system",
"value": "Correct default config file name for nginx\n"
},
{
"from": "human",
"value": "$ErrorActionPreference = \"stop\"\nNew-Item -ItemType Directory -Path \"$env:PKG_PATH/etc/\", \"$env:PKG_PATH/etc/dcos-adminrouter/\"\nNew-Item -ItemType Directory -Path \"$env:PKG_PATH/et... | powershell | chosen |
[
{
"from": "human",
"value": "Add script to update MRTK version across all files\n"
},
{
"from": "gpt",
"value": "<#\r\n.SYNOPSIS\r\n Updates Mixed Reality Toolkit version (i.e. major.minor.patch) across all known files.\r\n#>\r\nparam(\r\n [Parameter(Position=0,mandatory=$true)]\r\n [st... | powershell | chosen |
[
{
"from": "system",
"value": "Update PS script to improve version generation\n\n+semver: minor"
},
{
"from": "human",
"value": "$publishVersion = $Env:GitVersion_MajorMinorPatch+\".\"+$Env:GitVersion_BuildMetaData\n\n# Regular expression pattern to find the version in the build number \n# and th... | powershell | chosen |
[
{
"from": "system",
"value": "Add new PSScriptAnalyzer rule options\n"
},
{
"from": "human",
"value": "@{\n IncludeRules = @('*')\n\n Rules = @{\n # The statement assignment alignment check applies to the hashtable\n # assignment itself and not just its properties.\n P... | powershell | chosen |
[
{
"from": "system",
"value": "Extend Vision Test timeout, because it has been timing out lately.\n\nChange-Id: I449f7eb9420d52a6c68e5730eb63df3bfbb44e67\n"
},
{
"from": "human",
"value": "# Copyright(c) 2017 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you ... | powershell | chosen |
[
{
"from": "system",
"value": "Fix the regex used for detecting the Output Window reference\n"
},
{
"from": "human",
"value": "param($installPath, $toolsPath, $package, $project)\n\nforeach ($reference in $project.Object.References)\n{\n\tswitch -regex ($reference.Name.ToLowerInvariant())\n\t{\n... | powershell | chosen |
[
{
"from": "system",
"value": "Remove 2016 tag, order in manifest list has been fixed\n"
},
{
"from": "human",
"value": "$ErrorActionPreference = 'Stop'\n$ProgressPreference = 'SilentlyContinue'\n\n$dockerVersion=\"18.02.0-ce\"\n\nWrite-Host \"Installing Docker CLI $dockerVersion\"\ndocker pull s... | powershell | chosen |
[
{
"from": "system",
"value": "Create package directory if not exists\n"
},
{
"from": "human",
"value": "Task Default -depends Test\n\nTask Build {\n Exec { msbuild \"NPloy.sln\" }\n Exec { & copy NPloy.Console\\bin\\debug\\NPloy.Console.exe NPloy.Console\\bin\\debug\\NPloy.exe}\n Exec { & ... | powershell | chosen |
[
{
"from": "system",
"value": "Install Insomnia REST API client\n\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-Object Sy... | powershell | chosen |
[
{
"from": "system",
"value": "Add test for PlaceOpenBrace rule\n"
},
{
"from": "human",
"value": "Import-Module PSScriptAnalyzer\n$ruleName = \"PlaceOpenBrace\"\n\nDescribe \"PlaceOpenBrace\" {\n Context \"\" {\n It \"\" {\n }\n }\n}\n"
},
{
"from": "gpt",
"value... | powershell | chosen |
[
{
"from": "system",
"value": "Build script - license file name case fix\n"
},
{
"from": "human",
"value": "param(\n\t[string]$Configuration,\n\t[string]$Version\n)\n\nWrite-Host \"Configuration: $Configuration\"\nWrite-Host \"Version: $Version\"\n\n$ErrorActionPreference = \"Stop\"\n\nWrite-Host... | powershell | chosen |
[
{
"from": "human",
"value": "Add setting preset for OTBS formatting\n"
},
{
"from": "gpt",
"value": "@{\n IncludeRules = @(\n 'PSPlaceOpenBrace',\n 'PSPlaceCloseBrace',\n 'PSUseConsistentWhitespace',\n 'PSUseConsistentIndentation',\n 'PSAlignAssignmentStatem... | powershell | chosen |
[
{
"from": "system",
"value": "Use dotnet nuget instead of nuget\n"
},
{
"from": "human",
"value": "param([String]$Version=\"0.0.0\");\n\nForEach ($category in \"Core\", \"Modules\", \"Bundles\")\n{\n ForEach ($folder in (Get-ChildItem -Path $category -Directory))\n {\n dotnet pack $... | powershell | chosen |
[
{
"from": "system",
"value": "Add Set-GkeCluster to list of beta cmdlets\n"
},
{
"from": "human",
"value": "# List of beta cmdlets.\n$cmdletsToBeExported = @(\"Get-GcLogEntry\", \"New-GcLogEntry\", \"New-GcLogMonitoredResource\",\n \"Get-GcLog\", \"Remove-GcLog\", \"New-G... | powershell | chosen |
[
{
"from": "system",
"value": "tests(Compute): Increase the overall timeout for the full test run.\n- If several instances of tests are running in parallel, the usage export bucket tests will need to retry some, and that will consume time.\n"
},
{
"from": "human",
"value": "# Copyright 2021 Googl... | powershell | chosen |
[
{
"from": "system",
"value": "Make sure to convert the whole object back to the JSON file\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 $filePat... | powershell | chosen |
[
{
"from": "system",
"value": "Add f.lux because it was killing my eyes\n"
},
{
"from": "human",
"value": "## This configuration file uses BoxStarter to configure the system\n## and Chocolatey to install necessary packages\n\nWrite-Output \"Starting Common Configuration and Installs\"\n\nchoco fe... | powershell | chosen |
[
{
"from": "system",
"value": "Call bootstrap.ps1 when installing Mesos on Windows\n"
},
{
"from": "human",
"value": "param (\n [string]$path_to_packages = \"c:\\d2iq\\dcos\\packages\",\n [string]$path_to_dcos_bin = \"c:\\d2iq\\dcos\\bin\",\n [string]$path_to_dcos_conf = \"c:\\d2iq\\dcos... | powershell | chosen |
[
{
"from": "human",
"value": "Add Pester test for Remove-Module\n"
},
{
"from": "gpt",
"value": "Describe \"Remove-Module\" {\n $moduleName = \"Microsoft.PowerShell.Platform\"\n \n BeforeEach {\n Import-Module -Name $moduleName -Force\n (Get-Module -Name $moduleName).Name ... | powershell | chosen |
[
{
"from": "human",
"value": "Test for invoke-dbacycelerrorlog\nLocally this test fails will see if Appveyor gets same result\n"
},
{
"from": "gpt",
"value": "$CommandName = $MyInvocation.MyCommand.Name.Replace(\".ps1\", \"\")\nWrite-Host -Object \"Running $PSCommandPath\" -ForegroundColor Cyan\n... | powershell | chosen |
[
{
"from": "system",
"value": "Fix bug if cascade root path didn't exist\n"
},
{
"from": "human",
"value": ". .\\System\\Invoke-Pipeline.ps1\n\n# Invokes a \"Cascade\" of pipelines. All pipelines contained in $pipelinePath are executed in order\n# Then, after each root pipeline exists, all pipel... | powershell | chosen |
[
{
"from": "system",
"value": "Fix: Remove carriage return from digest file\n"
},
{
"from": "human",
"value": "$ErrorActionPreference = \"Stop\"\n\n$VersionOutput = $(cargo run --release --target=x86_64-pc-windows-msvc -- -V)\nCopy-Item ..\\..\\target\\x86_64-pc-windows-msvc\\release\\indentex.ex... | powershell | chosen |
[
{
"from": "human",
"value": "Add script to import enron data.\n"
},
{
"from": "gpt",
"value": "# Extract the ZIP if not already extracted\n$BackupPath = Join-Path $PSScriptRoot \"..\\enron.zip\"\n$Destination = Join-Path $PSScriptRoot \"..\\_enron\"\n\nif ((Test-Path $BackupPath) -eq $false)\n{\... | powershell | chosen |
[
{
"from": "system",
"value": "Set network connection type to private.\n"
},
{
"from": "human",
"value": "Enable-PSRemoting -Force\nwinrm quickconfig -q\nwinrm quickconfig -transport:http\nwinrm set winrm/config '@{MaxTimeoutms=\"1800000\"}'\nwinrm set winrm/config/winrs '@{MaxMemoryPerShellMB=\"... | powershell | chosen |
[
{
"from": "system",
"value": "Update default parameters for PSWinVitals v0.5.0\n"
},
{
"from": "human",
"value": "if ($DotFilesShowScriptEntry) {\n Write-Verbose -Message (Get-DotFilesMessage -Message $PSCommandPath)\n}\n\nif (!(Test-IsWindows)) {\n return\n}\n\ntry {\n if (!$DotFilesFa... | powershell | chosen |
[
{
"from": "human",
"value": "Create script to build Windows solutions\n\nBased on the script we were using on TeamCity, this script creates the Windows solutions so on the server we can make a simple call to it.\n"
},
{
"from": "gpt",
"value": "## Parameters\n# platform: WindowsStore | Windows... | powershell | chosen |
[
{
"from": "human",
"value": "Add script for enabling autocomplete in PowerShell v3\n"
},
{
"from": "gpt",
"value": "$Completion_clc = {\n \n param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)\n\n (invoke-expression \"$parameterName --generate-bash-comple... | powershell | chosen |
[
{
"from": "system",
"value": "Increase the default number of array elements to enumerate in PoSh\n"
},
{
"from": "human",
"value": "# Default to UTF-8 encoding with Out-File\n$PSDefaultParameterValues['Out-File:Encoding'] = 'utf8'\n\n# Our custom prompt with various integrations\nFunction Prompt... | powershell | chosen |
[
{
"from": "system",
"value": "Replace with unicode copyright symbol.\n"
},
{
"from": "human",
"value": "function Set-Project-Properties($version) {\n write-host \"$version\"\n\n set-regenerated-file \"$pwd/Directory.Build.props\" @\"\n<Project>\n <PropertyGroup>\n <Version>$versi... | powershell | chosen |
[
{
"from": "system",
"value": "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 \"SqlAlertService\" -DisplayName ... | powershell | chosen |
[
{
"from": "system",
"value": "Update source parameter for 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\n... | powershell | chosen |
[
{
"from": "human",
"value": "Add ps module for appveyor integration\n"
},
{
"from": "gpt",
"value": "function Edit-ReplaceByFormat {\r\n param(\r\n [string] $fileToReplace,\r\n [string] $contentToReplace,\r\n [string] $replaceTo\r\n )\r\n\r\n Write-Output \"Start re... | powershell | chosen |
[
{
"from": "system",
"value": "Remove Preview 4 specific hack\n"
},
{
"from": "human",
"value": "set-variable -name LastExitCode 0\nset-strictmode -version 2.0\n$ErrorActionPreference=\"Stop\"\n\n$CPCLocation=\"C:/CPC\"\n\n./build/scripts/cleanup_perf.ps1 $CPCLocation\n\nif ( -not $? )\n{\n ec... | powershell | chosen |
[
{
"from": "system",
"value": "Fix build script to terminate on errors\n"
},
{
"from": "human",
"value": "# Restore our NuGet packages\nnuget sources Add -Name CitiesSkylines -Source $env:NUGET_CSL_URL -UserName $env:NUGET_CSL_USERNAME -Password $env:NUGET_CSL_PASSWORD -Verbosity quiet -NonIntera... | powershell | chosen |
[
{
"from": "human",
"value": "Add a file that contains helper functions for tests\n"
},
{
"from": "gpt",
"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-Conten... | powershell | chosen |
[
{
"from": "human",
"value": "tests: Add importable tests for Buckets\n\n"
},
{
"from": "gpt",
"value": "if([String]::IsNullOrEmpty($MyInvocation.PSScriptRoot)) {\n Write-Error 'This script should not be called directly! It has to be imported from a buckets test file!'\n exit 1\n}\n\n. \"$p... | powershell | chosen |
[
{
"from": "system",
"value": "Add dump $env:Configuration for appveyor troubleshooting\n"
},
{
"from": "human",
"value": "# Dump info for https://github.com/xunit/xunit/issues/1345#issuecomment-335274948\n dir -r -fi *.deps.json | select FullName\n\n$testProjects = ( \"LogJam.UnitTests\", \"Log... | powershell | chosen |
[
{
"from": "system",
"value": "Add Unit Test for Export-FormatData\n"
},
{
"from": "human",
"value": "Describe \"Export-FormatData\" {\n\n Context \"Check Export-FormatData can be called validly.\" {\n\tIt \"Should be able to be called without error\" {\n\t { Get-FormatData | Export-FormatD... | powershell | chosen |
[
{
"from": "human",
"value": "Add Join-XmlFiles and Add-VersionToNuspec script\n"
},
{
"from": "gpt",
"value": "function Join-XmlElements([System.Xml.XmlElement]$Template, [System.Xml.XmlElement]$Source, [System.Xml.XmlDocument]$TemplateDocument, [System.Xml.XmlDocument]$SourceDocument)\n{\n ... | powershell | chosen |
[
{
"from": "system",
"value": "Check HKEY_CURRENT_USER in addition to HKEY_LOCAL_MACHINE\n"
},
{
"from": "human",
"value": "function FindInstalledApplication\n{\n param($appName, $appVersion)\n \n if ((Get-WmiObject win32_operatingsystem).OSArchitecture -notmatch '64') \n { \n $keys= ... | powershell | chosen |
[
{
"from": "human",
"value": "Add script for windows requirements\n"
},
{
"from": "gpt",
"value": "# =============================================================================\n# Install the basic requirements for Windows software\n# ============================================================... | powershell | chosen |
[
{
"from": "system",
"value": "Stop .Net Core SDK installation on failure\n"
},
{
"from": "human",
"value": "$installerName = \"installer.exe\"\n\nWrite-Host \"Downloading .Net Core SDK\"\nInvoke-WebRequest -Uri \"https://go.microsoft.com/fwlink/?LinkID=809122\" -OutFile $installerName\n\nWrite-H... | powershell | chosen |
[
{
"from": "system",
"value": "Increment patch version on unstable builds.\n"
},
{
"from": "human",
"value": "\n# figure out the correct nuget package version (depends on whether this is a release or not)\n$version = \"$env:NUGET_RELEASE_VERSION\"\nif (\"$env:APPVEYOR_REPO_TAG\" -ne \"true\") # n... | powershell | chosen |
[
{
"from": "system",
"value": "Fix issue with using variable in 7z\n"
},
{
"from": "human",
"value": "Write-Output \"---Creating Artifacts---\"\n\n# Build web application\nSet-Location .\\KenticoInspector.WebApplication\ndotnet publish KenticoInspector.WebApplication.csproj /p:PublishDir=..\\publ... | powershell | chosen |
[
{
"from": "system",
"value": "Replace the double quotes in the source code too.\n"
},
{
"from": "human",
"value": "# Copyright(c) 2018 Google LLC.\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 o... | powershell | chosen |
[
{
"from": "human",
"value": "Add a helpful powershell script\n"
},
{
"from": "gpt",
"value": "#Set-AdUserPwd -user \"user\" -oldpwd (ConvertTo-SecureString -AsPlainText \"P@ssw0rd\" -Force) -newpwd (ConvertTo-SecureString -AsPlainText \"P@ssw0rd\" -Force)\n\nFunction Set-AdUserPwd\n{\n Param(... | powershell | chosen |
[
{
"from": "human",
"value": "Move script to msgpack repo\n"
},
{
"from": "gpt",
"value": "$globalJson = Get-Content -Raw -Path global.json | ConvertFrom-Json\n$version = $globalJson.Sdk.Version\n\nWrite-Host \"##teamcity[setParameter name='DotnetCoreVersion' value='$version']\""
}
] | powershell | chosen |
[
{
"from": "system",
"value": "Use Invoke-Expression instead of iex\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 $PRO... | 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 \"exists in compilation with different binary hash\... | powershell | chosen |
[
{
"from": "system",
"value": "Fix package location in build script\n"
},
{
"from": "human",
"value": "# Restore our NuGet packages\nnuget sources Add -Name CitiesSkylines -Source $env:NUGET_CSL_URL -UserName $env:NUGET_CSL_USERNAME -Password $env:NUGET_CSL_PASSWORD -Verbosity quiet -NonInteracti... | powershell | chosen |
[
{
"from": "human",
"value": "Add script to get Android package name of a unity project\n"
},
{
"from": "gpt",
"value": "c\u0000a\u0000t\u0000 \u0000.\u0000\\\u0000P\u0000r\u0000o\u0000j\u0000e\u0000c\u0000t\u0000S\u0000e\u0000t\u0000t\u0000i\u0000n\u0000g\u0000s\u0000\\\u0000P\u0000r\u0000o\u000... | powershell | chosen |
[
{
"from": "human",
"value": "Add script for cleaning up dead (orphaned) containers\n"
},
{
"from": "gpt",
"value": "\nImport-Module WebAdministration\n\n$sites = Get-ChildItem IIS:\\Sites\n$appPools = Get-ChildItem IIS:\\AppPools\n\n$sites |\n\tWhere-Object { $_.Name -ne 'Containerizer' } |\n\tR... | powershell | chosen |
[
{
"from": "human",
"value": "Add Powershell script to update external ID from AD\n"
},
{
"from": "gpt",
"value": "# For all nodes in UpGuard, update the external id by pulling the LDAP DN from AD\n# You will be prompted for credentials to query AD\n\nparam (\n [string]$ApiKey = '',\n [stri... | powershell | chosen |
[
{
"from": "system",
"value": "Add test to verify correction for negative whitespace\n"
},
{
"from": "human",
"value": "$directory = Split-Path -Parent $MyInvocation.MyCommand.Path\n$testRootDirectory = Split-Path -Parent $directory\n\nImport-Module PSScriptAnalyzer\nImport-Module (Join-Path $te... | powershell | chosen |
[
{
"from": "system",
"value": "Use native powershell way to create dir if it doesn't exist"
},
{
"from": "human",
"value": "$packageName = '{{PackageName}}'\n$url = '{{DownloadUrl}}'\n$checksum = '{{Checksum}}'\n$checksumType = 'sha1'\n$toolsDir = \"$(Split-Path -parent $MyInvocation.MyCommand.De... | powershell | chosen |
[
{
"from": "system",
"value": "Add missing comment to Invoke-GitChildDir\n"
},
{
"from": "human",
"value": "Function Invoke-GitChildDir {\n [CmdletBinding()]\n Param(\n [Parameter(Mandatory)]\n [String]$Command,\n\n [ValidateNotNullOrEmpty()]\n [String]$Path\n ... | powershell | chosen |
[
{
"from": "system",
"value": "Add addtional logging to make it clear it's a polyfill\n"
},
{
"from": "human",
"value": "Write-Host \"Ensconce - Powershell4Polyfill Loading\"\n\nfunction Clear-DnsClientCache()\n{\n\t$ProcessInfo = New-Object System.Diagnostics.ProcessStartInfo\n\t$ProcessInfo.Fil... | powershell | chosen |
[
{
"from": "system",
"value": "Add comment RE: redis-desktop-manager install\n"
},
{
"from": "human",
"value": "$ScriptPath = Split-Path -Parent $MyInvocation.MyCommand.Definition\n\n& \"$ScriptPath\\PowerShellProfile\\Microsoft.PowerShell_profile.ps1\"\n\n## Developer Tools\n\nchoco install grep... | powershell | chosen |
[
{
"from": "system",
"value": "Allow specifying the version number\n"
},
{
"from": "human",
"value": "get-childitem -recurse bin -Directory | remove-item -recurse\nget-childitem -recurse obj -Directory | remove-item -recurse\n\n$packages = join-path (get-location) \"packages\"\nif (test-path $pac... | powershell | chosen |
[
{
"from": "human",
"value": "Add test for case insensitive query dictionary assembly\n"
},
{
"from": "gpt",
"value": "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License.\n\nDescribe \".NET type with members with names differing only by name\" {\n Bef... | powershell | chosen |
[
{
"from": "system",
"value": "Verify the coverage artifact exists before attempting to delete it.\n"
},
{
"from": "human",
"value": ". $PSScriptRoot\\variables.ps1\n\n$openCover = \"c:\\OpenCover\\OpenCover.Console.exe\"\n\n$filter = '-filter:\"+[GravatarHelper*]*'\n\nRemove-Item $artifactDirect... | powershell | chosen |
[
{
"from": "system",
"value": "Use native powershell for unzipping\n"
},
{
"from": "human",
"value": "Write-Host \"Installing chocolatey\"\nSet-ExecutionPolicy Unrestricted\niex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))\n\nWrite-Host \"Installing unz... | 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$tmpDirectory = $TestDrive\n\t$testfilename = \"testfile.xml\"\n\t$testfile = Join-Path -Path $tmpDirectory -ChildPath $... | powershell | chosen |
[
{
"from": "system",
"value": "Remove any already existing coverage exports\n\n"
},
{
"from": "human",
"value": "$rootPath = (Get-Item -Path \".\\\" -Verbose).FullName\n\ndotnet restore\n\nSet-Location 'src\\Stranne.VasttrafikNET.Tests'\n\n$resultsFile = $rootPath + '\\artifacts\\Stranne.Vasttraf... | powershell | chosen |
[
{
"from": "human",
"value": "Add TEPP for Agent Alerts\n"
},
{
"from": "gpt",
"value": "#region Initialize Cache\nif (-not [Sqlcollaborative.Dbatools.TabExpansion.TabExpansionHost]::Cache[\"alert\"]) {\n\t[Sqlcollaborative.Dbatools.TabExpansion.TabExpansionHost]::Cache[\"alert\"] = @{ }\n}\n#en... | powershell | chosen |
[
{
"from": "system",
"value": "Update golang to 1.9.3 in windows gqts\n\n[#154592362]\n\nSigned-off-by: Tom Godkin <891065477085d2c72591451bb326b2b4358b6dfb@pivotal.io>\n"
},
{
"from": "human",
"value": "$ErrorActionPreference = \"Stop\";\ntrap { $host.SetShouldExit(1) }\n\ncd gr-release-develop\... | powershell | chosen |
[
{
"from": "system",
"value": "Add PS command to add transformation config to csproj\n"
},
{
"from": "human",
"value": "function Add-Transformation($pattern, $values, $output){\n$project = Get-Project\n$buildProject = @([Microsoft.Build.Evaluation.ProjectCollection]::GlobalProjectCollection.GetL... | powershell | chosen |
[
{
"from": "human",
"value": "Load a module if it is not present.\n"
},
{
"from": "gpt",
"value": "<#\n.DESCRIPTION\n Swirch the physal director of an IIS Website.\n#>\n$WebAdministrationModule = 'WebAdministration'\n\nIf ( ! (Get-module $WebAdministrationModule )) {\n Write-Host \"Loading... | powershell | chosen |
[
{
"from": "system",
"value": "Hide non-zero exit code from dnu build.\n"
},
{
"from": "human",
"value": "Param(\n [switch] $Verbose\n)\n\nIf (!$Verbose) {\n $quietFlag = '--quiet'\n}\nElse {\n $quietFlag = ''\n}\n\n$dnu = Get-Command dnu\n\n& $dnu build 'src\\HTTPlease*' 'test\\HTTPleas... | powershell | chosen |
[
{
"from": "system",
"value": "Add distributive files to ZIP archive.\n"
},
{
"from": "human",
"value": "#requires -Version 3.0\n\n$outputPath = \"$PSScriptRoot\\Distr\"\n\nImport-Module \"$PSScriptRoot\\Scripts\\BuildHelpers.psm1\"\n\nInitialize-BuildVariables\nInvoke-NugetRestore \"$PSScriptRoo... | powershell | chosen |
[
{
"from": "system",
"value": "Allow local people and not all"
},
{
"from": "human",
"value": "Set-Item -Path WSMan:\\localhost\\Client\\TrustedHosts -Value '*'\n$url = \"https://raw.githubusercontent.com/MaxDistructo/ShellScripts/master/Comic%20Sans%20MS.reg\"\n$output = \"c:\\ComicSansMS.reg\"\... | powershell | chosen |
[
{
"from": "system",
"value": "Make VSTS responsible for padding the build number\n"
},
{
"from": "human",
"value": "#\n# Set-UmbracoContinuousVersion\n# Sets the Umbraco version for continuous integration\n#\n# -Version <version>\n# where <version> is a Semver valid version\n# eg 1.2.3, 1... | powershell | chosen |
[
{
"from": "system",
"value": "Add nssm stop signal if terminating\n"
},
{
"from": "human",
"value": "# Stop script execution when a non-terminating error occurs\n$ErrorActionPreference = \"Stop\"\n\nWrite-Output \"terminate-instance: waiting for 10 seconds to allow agent logs to drain to Cloudwa... | powershell | chosen |
[
{
"from": "system",
"value": "Fix .NET Core completion support in PowerShell\n"
},
{
"from": "human",
"value": "if (!(Get-Command -Name dotnet -ErrorAction Ignore)) {\n Write-Verbose -Message (Get-DotFilesMessage -Message 'Skipping .NET Core settings as unable to locate dotnet.')\n return\... | powershell | chosen |
[
{
"from": "system",
"value": "Install Git Credential Manager for Windows\n\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... | powershell | chosen |
[
{
"from": "system",
"value": "Add ability to have script in subfolder\n"
},
{
"from": "human",
"value": "$excel = new-object -comobject excel.application\n\n$workbook = $excel.workbooks.open(\"Dinosaur.xlsm\")\n$worksheet = $workbook.worksheets.item(1)\n$excel.Run(\"SortAndExport\")\n$workbook.s... | powershell | chosen |
[
{
"from": "system",
"value": "Revert script to generic format\n"
},
{
"from": "human",
"value": "PowerShell -NoProfile -Command {\n $folder = 'C:\\sources\\serviceable-objects\\Examples\\TestHttpCompositionConsoleApp\\bin\\Debug\\netcoreapp1.0';\n Set-Location -Path $folder;\n Import-M... | powershell | chosen |
[
{
"from": "system",
"value": "Revert the docker command trap\n"
},
{
"from": "human",
"value": "if ($null -eq (Get-Command \"docker.exe\" -ErrorAction SilentlyContinue)) {\n Write-Error 'Docker cannot be found. Make sure it is installed and added to the path.'\n Start-Process -FilePath 'https:... | powershell | chosen |
[
{
"from": "system",
"value": "Update module, load helper functions\n"
},
{
"from": "human",
"value": "\n# Get and dot source all helper functions (private)\n# Split-Path -Path $PSCommandPath |\n# Join-Path -ChildPath 'Helpers' |\n# Get-ChildItem -Include '*.ps1' -Exclude '*.Tests.*' ... | powershell | chosen |
[
{
"from": "system",
"value": "Exit Code 3010 is ok as a exit code\n"
},
{
"from": "human",
"value": "$packageName = \"dotnet\"\r\n$installerType = \"EXE\"\r\n$installerArgs = \"/passive /norestart\"\r\n$url = \"http://download.microsoft.com/download/E/2/1/E21644B5-2DF2-47C2-91BD-63C560427900/NDP... | powershell | chosen |
[
{
"from": "human",
"value": "Add install android sdk script\n"
},
{
"from": "gpt",
"value": "$AndroidToolPath = \"${env:ProgramFiles(x86)}\\Android\\android-sdk\\tools\\android\" \n#$AndroidToolPath = \"$env:localappdata\\Android\\android-sdk\\tools\\android\"\n\nFunction Get-AndroidSDKs() { \n ... | powershell | chosen |
[
{
"from": "system",
"value": "Use 7z to zip contents\n"
},
{
"from": "human",
"value": "$temp_directory = \"$env:APPVEYOR_BUILD_FOLDER\\Deploy\\Portable\\~TEMP\"\nNew-Item \"$temp_directory\" -type directory\n\n$zip_archive = \"$env:APPVEYOR_BUILD_FOLDER\\Deploy\\Portable\\Tabster $env:APPVEYOR_... | powershell | chosen |
[
{
"from": "human",
"value": "Add verify and bundle script.\n"
},
{
"from": "gpt",
"value": "Write-Host \"mvn clean verify -DskipTests=true -P sonatype-oss-release\"\nmvn clean verify -DskipTests=true -P sonatype-oss-release\n\nWrite-Host \"Packaging into bundle.jar...\"\ncd ./target\njar -cvf b... | powershell | chosen |
[
{
"from": "human",
"value": "Add NuGet pkgs publish script\n"
},
{
"from": "gpt",
"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": "Fix incorrect variable to track exit code\n"
},
{
"from": "human",
"value": "dotnet --version\n\n$buildExitCode=0\n\nWrite-Output \"*** Restoring packages\"\ndotnet restore\n$buildExitCode = $LASTEXITCODE\nif ($buildExitCode -ne 0){\n Write-Output \"*** Restore f... | powershell | chosen |
[
{
"from": "system",
"value": "Update hugo docker powershell script for 0.18.1"
},
{
"from": "human",
"value": "# You will need to make sure you have your C drive (or whatever drive you have the devopsdays code on) shared in Docker\n\n$MyPath = $PSScriptRoot\n\ndocker stop hugo-server\ndocker rm ... | powershell | chosen |
[
{
"from": "system",
"value": "Use conference simple on statistics\n"
},
{
"from": "human",
"value": "$scenes = 'cornell-move-cone', 'sponza-hole', 'conference';\n$ilpsolver = '..\\x64\\Debug\\ILPSolver.exe';\n$triesPerScene = 10;\n\nforeach ($scene in $scenes) {\n\tfor($i=1; $i -le $triesPerScen... | powershell | chosen |
[
{
"from": "system",
"value": "Fix handling of -h and -v parameter\n\n"
},
{
"from": "human",
"value": "#requires -v 3\nparam($cmd)\n\nset-strictmode -off\n\n. \"$psscriptroot\\..\\lib\\core.ps1\"\n. \"$psscriptroot\\..\\lib\\git.ps1\"\n. \"$psscriptroot\\..\\lib\\buckets.ps1\"\n. (relpath '..\\l... | powershell | chosen |
[
{
"from": "system",
"value": "Tag base images if latest tag is lost\n"
},
{
"from": "human",
"value": "\"Updating docker engine\"\ndocker version\n\"Stopping docker service\"\nstop-service docker\nif (!(Test-Path C:\\windows\\system32\\docker-orig.exe)) {\n \"Saving docker original docker engin... | powershell | chosen |
[
{
"from": "system",
"value": "Fix support for multi-tenant DSM\n"
},
{
"from": "human",
"value": "\r\nparam (\r\n [Parameter(Mandatory=$true)][string]$manager,\r\n [Parameter(Mandatory=$true)][string]$user,\r\n [Parameter(Mandatory=$false)][string]$tenant\r\n)\r\n\r\n$passwordinput = R... | powershell | chosen |
[
{
"from": "system",
"value": "Allow numbers in flag names\n"
},
{
"from": "human",
"value": "<#\n.SYNOPSIS\n Parses parameters of the package\n\n.EXAMPLE\n Get-PackageParameters \"/Shortcut /InstallDir:'c:\\program files\\xyz' /NoStartup\" | set r\n if ($r.Shortcut) {... }\n Write-H... | powershell | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.