Instruction
stringlengths
14
778
input_code
stringlengths
0
4.24k
output_code
stringlengths
1
5.44k
Add support for lzh format. (with 7zip)
function 7zip_installed { cmd_available '7z' } function requires_7zip($manifest, $architecture) { foreach($dlurl in @(url $manifest $architecture)) { if(file_requires_7zip $dlurl) { return $true } } } function requires_lessmsi ($manifest, $architecture) { $useLessMsi = get_config MSIEXTRACT_USE_LE...
function 7zip_installed { cmd_available '7z' } function requires_7zip($manifest, $architecture) { foreach($dlurl in @(url $manifest $architecture)) { if(file_requires_7zip $dlurl) { return $true } } } function requires_lessmsi ($manifest, $architecture) { $useLessMsi = get_config MSIEXTRACT_USE_LE...
Update to the build script.
properties { $filePath = $path } task default -depends Build formatTaskName { param($taskName) write-host $taskName -foregroundcolor Green } task Build -depends Clean, Nuget-Restore { msbuild /t:Build $filePath } task Test -depends Start-AzureEmulator, Run-Tests, Stop-AzureEmulator { # no op } task Stop-...
properties { $filePath = $path } task default -depends Build formatTaskName { param($taskName) write-host $taskName -foregroundcolor Green } task Build -depends Clean, Nuget-Restore { Exec { msbuild /t:Build $filePath } } task Test -depends Start-AzureEmulator, Run-Tests, Stop-AzureEmulator { # no op } t...
Update link to master binaries
stop-service docker $wc = New-Object net.webclient $wc.Downloadfile("https://master.dockerproject.org/windows/amd64/dockerd.exe", "$env:ProgramFiles\docker\dockerd.exe") $wc.Downloadfile("https://master.dockerproject.org/windows/amd64/docker.exe", "$env:ProgramFiles\docker\docker.exe") if (Test-Path "$($env:ProgramDat...
stop-service docker $wc = New-Object net.webclient $wc.Downloadfile("https://master.dockerproject.org/windows/x86_64/dockerd.exe", "$env:ProgramFiles\docker\dockerd.exe") $wc.Downloadfile("https://master.dockerproject.org/windows/x86_64/docker.exe", "$env:ProgramFiles\docker\docker.exe") if (Test-Path "$($env:ProgramD...
Add an Appveyor powershell script
$Script = Invoke-WebRequest 'https://raw.githubusercontent.com/ndmitchell/neil/master/misc/appveyor.ps1' $ScriptBlock = [Scriptblock]::Create($Script.Content) Invoke-Command -ScriptBlock $ScriptBlock -ArgumentList (@('hlint') + $args)
Add script to build and publish modules
Write-Host "Ensure the CSPROJ files have been updated first!" Write-Host "Press enter in order to create and publish new package..." Read-Host Push-Location .\src $moduleDirs = Get-ChildItem | ?{$_.PSISContainer} foreach ($moduleDir in $moduleDirs){ Push-Location $moduleDir Write-Host "Removing previous nu...
Use the latest NuGet version.
$toolsDirectory = '.\tools' if (!(Test-Path -path $toolsDirectory )) { New-Item $toolsDirectory -Type Directory } $nuget = '.\tools\nuget.exe' if ((Test-Path $nuget) -eq $false) { Invoke-WebRequest -Uri http://nuget.org/nuget.exe -OutFile $nuget } Set-Alias nuget $nuget $cake = '.\tools\Cake\Cake.exe' if ((Test-Pat...
$toolsDirectory = '.\tools' if (!(Test-Path -path $toolsDirectory )) { New-Item $toolsDirectory -Type Directory } $nuget = '.\tools\nuget.exe' if ((Test-Path $nuget) -eq $false) { Invoke-WebRequest -Uri https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -OutFile $nuget } Set-Alias nuget $nuget $cake = '.\t...
Add http url check powershell script
# # check-windows-http.ps1 # # DESCRIPTION: # This plugin checks availability of link provided as param # # OUTPUT: # plain text # # PLATFORMS: # Windows # # DEPENDENCIES: # Powershell # # USAGE: # Powershell.exe -NonInteractive -NoProfile -ExecutionPolicy Bypass -NoLogo -File C:\\etc\\sensu\\plugins\\check...
Add shebang to pwsh script.
$ErrorActionPreference = 'Stop' Push-Location $PSScriptRoot try { if (-not (Test-Path ./tools/bin/Build) -or (Get-ChildItem ./tools/Build/* | Measure-Object LastWriteTime -Maximum).Maximum -gt (Get-ChildItem ./tools/bin/Build/* | Measure-Object LastWriteTime -Maximum).Maximum) { if (Test-Path ./tools/...
#!/usr/bin/env pwsh $ErrorActionPreference = 'Stop' Push-Location $PSScriptRoot try { if (-not (Test-Path ./tools/bin/Build) -or (Get-ChildItem ./tools/Build/* | Measure-Object LastWriteTime -Maximum).Maximum -gt (Get-ChildItem ./tools/bin/Build/* | Measure-Object LastWriteTime -Maximum).Maximum) { if...
Update PowerShell to make it compatible with AzureRM 5, remove KeyVault (too long for given time in workshop)
# Check if user is already signed in Try { Get-AzureRmContext | Out-Null } Catch { if ($_ -like "*Login-AzureRmAccount to login*") { Login-AzureRmAccount } } # Select subscription where name contains `MSDN Subscription` Get-AzureRmSubscription | where { $_.SubscriptionName -like "*MSDN Subscription*" } | Se...
# Check if user is already signed in $context = Get-AzureRmContext | Out-Null if (!$context.SubscriptionName) { Login-AzureRmAccount } # Select subscription where name contains `MSDN Subscription` Get-AzureRmSubscription | where { $_.Name -like "*MSDN Subscription*" } | Select-AzureRmSubscription # Set some stri...
Add suppression of warning for MS policy
$supersecure = convertto-securestring "sdfdsfd" -asplaintext -force New-Object System.Management.Automation.PSCredential -ArgumentList "username", (ConvertTo-SecureString "really secure" -AsPlainText -Force) $sneaky = ctss "sneaky convert" -asplainText -force
#[SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Test/NotASecret.")] $supersecure = convertto-securestring "sdfdsfd" -asplaintext -force New-Object System.Management.Automation.PSCredential -ArgumentList "username", (ConvertTo-SecureString "really secure" -AsPlainText -Force) $sneaky =...
Set verbose logging in aver
# Create a build tag, formatted like {build}.{branch}.{sha7} # Use aver to patch versions of assemblies and nupkg-packages $sha = "$env:APPVEYOR_REPO_COMMIT".substring(0,7) $env:MY_BUILD_TAG = "$env:APPVEYOR_BUILD_NUMBER.$env:APPVEYOR_REPO_BRANCH.$sha" .\tools\aver.exe set "$($env:APPVEYOR_BUILD_FOLDER)" -scan -build "...
# Create a build tag, formatted like {build}.{branch}.{sha7} # Use aver to patch versions of assemblies and nupkg-packages $sha = "$env:APPVEYOR_REPO_COMMIT".substring(0,7) $env:MY_BUILD_TAG = "$env:APPVEYOR_BUILD_NUMBER.$env:APPVEYOR_REPO_BRANCH.$sha" .\tools\aver.exe set "$($env:APPVEYOR_BUILD_FOLDER)" -scan -build "...
Add AlignAssignmentRule to code formatting settings
@{ IncludeRules = @( 'PSPlaceOpenBrace', 'PSPlaceCloseBrace', 'PSUseConsistentIndentation', 'PSUseConsistentWhitespace' ) Rules = @{ PSPlaceOpenBrace = @{ Enable = $true OnSameLine = $true NewLineAfter = $true } PS...
@{ IncludeRules = @( 'PSPlaceOpenBrace', 'PSPlaceCloseBrace', 'PSUseConsistentWhitespace', 'PSUseConsistentIndentation', 'PSAlignAssignmentStatement' ) Rules = @{ PSPlaceOpenBrace = @{ Enable = $true OnSameLine = $true NewL...
Fix error that happens when all user accounts are banned
$usernamesPath = ".\usernames.txt" $bannedpath = ".\banned.txt" $csvpath = ".\usernames.csv" $usernames = get-content -path $usernamesPath -ErrorAction Stop $banned = get-content -path $bannedpath -ErrorAction SilentlyContinue foreach($username in $banned) { $usernames = $usernames | where {$_ -notmatch $userna...
$usernamesPath = ".\usernames.txt" $bannedpath = ".\banned.txt" $csvpath = ".\usernames.csv" $usernames = get-content -path $usernamesPath -ErrorAction Stop $banned = get-content -path $bannedpath -ErrorAction SilentlyContinue foreach($username in $banned) { $usernames = $usernames | where {$_ -notmatch $userna...
Use legacy semantic version for nuget packages This allows legacy nuget clients to consume the pre-release packages as even the newest versions of nuget don't fully support SemVer 2.0
function NugetPack([bool] $pre) { $Version = $env:GitVersion_MajorMinorPatch if ($pre) { echo "Creating pre-release package..." } else { echo "Creating stable package..." } nuget pack Azuria.nuspec -symbols -version "$($env:GitVersion_FullSemVer)" } NugetPack ($e...
function NugetPack([bool] $pre) { $Version = $env:GitVersion_MajorMinorPatch if ($pre) { echo "Creating pre-release package..." } else { echo "Creating stable package..." } nuget pack Azuria.nuspec -symbols -version "$($env:GitVersion_LegacySemVer)" } NugetPack (...
Add Select-XML Pester Unit Test
Describe "Select-XML DRT Unit Tests" -Tags DRT{ $tmpDirectory = $TestDrive $testfilename = "testfile.xml" $testfile = Join-Path -Path $tmpDirectory -ChildPath $testfilename It "Select-XML should work"{ $xmlContent = @" <?xml version ="1.0" encoding="ISO-8859-1"?> <bookstore> <book category="CHILDREN"> <titl...
Increment patch version on unstable builds.
# figure out the correct nuget package version (depends on whether this is a release or not) $version = "$env:NUGET_RELEASE_VERSION" if ("$env:APPVEYOR_REPO_TAG" -ne "true") # non-tagged (pre-release build) { $version += "-unstable$env:APPVEYOR_BUILD_NUMBER" } # grab .nuspec file contents $file = "$PSScriptRoot\..\$...
# get current release version $version = "$env:NUGET_RELEASE_VERSION" # make sure version follows the 0.0.0 format if (![Regex]::IsMatch($version, '^\d\.\d\.\d$')) { Write-Error "Invalid NUGET_RELEASE_VERSION: $version" Exit 1 } # set the correct nuget package version (depends on whether this is a release or not) i...
Add notes about tools that make changes
Function set-stuff{ [cmdletbinding(SupportsShouldProcess=$true, confirmImpact='Medium')] param( [Parameter(Mandatory=$True)] [string]$computername ) Process{ If ($psCmdlet.shouldProcess("$Computername")){ Write-Output 'Im changing somethin...
# Powershell has a variable called $ConfirmPreference with default value `High` # If you change the value to `Medium` powershell will ask to confirm when executing the function # Because in the function we are setting the ConfirmImpact to Medium # If you use -WhatIf the function will just say what it will do # If you...
Add bittorrent sync to list of common installs
## This configuration file uses BoxStarter to configure the system ## and Chocolatey to install necessary packages ## .NET Frameworks -- Some should already be installed choco install DotNet3.5 choco install DotNet4.5.1 ## Common System Tools choco install ccleaner choco install 7zip.install choco install notepadplus...
## This configuration file uses BoxStarter to configure the system ## and Chocolatey to install necessary packages ## .NET Frameworks -- Some should already be installed choco install DotNet3.5 choco install DotNet4.5.1 ## Common System Tools choco install ccleaner choco install 7zip.install choco install notepadplus...
Exit with the correct exit code
dotnet tool install Cake.Tool --global --version 0.35.0 dotnet cake ./build/build.cake --bootstrap dotnet cake ./build/build.cake
dotnet tool install Cake.Tool --global --version 0.35.0 dotnet cake ./build/build.cake --bootstrap dotnet cake ./build/build.cake exit $LASTEXITCODE
Build Traefik 1709 image with netapi dll
$version=$(select-string -Path Dockerfile -Pattern "ENV TRAEFIK_VERSION").ToString().split()[-1] docker tag traefik stefanscherer/traefik-windows docker tag traefik stefanscherer/traefik-windows:v$version docker push stefanscherer/traefik-windows:v$version docker push stefanscherer/traefik-windows
$version=$(select-string -Path Dockerfile -Pattern "ENV TRAEFIK_VERSION").ToString().split()[-1] docker tag traefik stefanscherer/traefik-windows:v$version-1607 docker push stefanscherer/traefik-windows:v$version-1607 npm install -g rebase-docker-image rebase-docker-image stefanscherer/traefik-windows:v$version-1607...
Update windows test script for go mod
$ErrorActionPreference='Stop' trap { write-error $_ exit 1 } $env:GOPATH = Join-Path -Path $PWD "gopath" $env:PATH = $env:GOPATH + "/bin;" + $env:PATH cd $env:GOPATH/src/github.com/cloudfoundry/bosh-agent go.exe install github.com/cloudfoundry/bosh-agent/vendor/github.com/onsi/ginkgo/ginkgo if ($LASTEXITCODE...
$ErrorActionPreference='Stop' trap { write-error $_ exit 1 } $env:GOPATH = Join-Path -Path $PWD "gopath" $env:PATH = $env:GOPATH + "/bin;" + $env:PATH cd $env:GOPATH/src/github.com/cloudfoundry/bosh-agent go.exe run github.com/onsi/ginkgo/ginkgo -r -race -keepGoing -skipPackage="integration,vendor" if ($LAST...
Add chocolatey package for PowerBI
#Script Name: New-EasyDevWorkstation.ps1 #Purpose: Quick and clean way to setup a simple developer workstation. Tested only for Windows 10 #Author Nissan Dookeran #Date 23-06-2016 #Version 0.01 #set the execution policy to allow chocolatey to install and chocolatey scripts to install software #Use ByPass to avoid prom...
#Script Name: New-EasyDevWorkstation.ps1 #Purpose: Quick and clean way to setup a simple developer workstation. Tested only for Windows 10 #Author Nissan Dookeran #Date 23-06-2016 #Version 0.01 #set the execution policy to allow chocolatey to install and chocolatey scripts to install software #Use ByPass to avoid prom...
Improve bootstrapper behavior on error.
Push-Location $PSScriptRoot try { if (-not (Test-Path ./tools/bin/Build) -or (Get-ChildItem ./tools/Build/* | Measure-Object LastWriteTime -Maximum).Maximum -gt (Get-ChildItem ./tools/bin/Build/* | Measure-Object LastWriteTime -Maximum).Maximum) { dotnet publish ./tools/Build/Build.csproj --output ./t...
$ErrorActionPreference = 'Stop' Push-Location $PSScriptRoot try { if (-not (Test-Path ./tools/bin/Build) -or (Get-ChildItem ./tools/Build/* | Measure-Object LastWriteTime -Maximum).Maximum -gt (Get-ChildItem ./tools/bin/Build/* | Measure-Object LastWriteTime -Maximum).Maximum) { dotnet publish ./tools...
Replace wc -l with pure powershell
"Updating docker engine" docker version "Stopping docker service" stop-service docker if (!(Test-Path C:\windows\system32\docker-orig.exe)) { "Saving docker original docker engine" copy-item C:\windows\system32\docker.exe C:\windows\system32\docker-orig.exe } "Downloading nightly build of docker engine" wget htt...
"Updating docker engine" docker version "Stopping docker service" stop-service docker if (!(Test-Path C:\windows\system32\docker-orig.exe)) { "Saving docker original docker engine" copy-item C:\windows\system32\docker.exe C:\windows\system32\docker-orig.exe } "Downloading nightly build of docker engine" wget htt...
Add packaging script for standalone install
Add-Type -assembly "system.io.compression.filesystem" $path = Split-Path $MyInvocation.MyCommand.Path -Parent $bin = Join-Path $path "bin" $templates = Join-Path $path "templates" $compat = Join-Path $path "compat" Write-Host "$bin" ls ghc-devel*.nuspec -recurse -File | ForEach-Object { ...
Update Windows test to force using TLS/1.2
# Copyright 2017 gRPC authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
# Copyright 2017 gRPC authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
Copy module PDB files to output directory.
<# Copyright © 2018 Jeremy Herbison This file is part of AudioWorks. AudioWorks is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Au...
<# Copyright © 2018 Jeremy Herbison This file is part of AudioWorks. AudioWorks is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Au...
Fix for WFCORE-3789, CLI, powershell option handling
############################################################################# # ## # WildFly CLI Script for interacting with the server ## # ## ########...
############################################################################# # ## # WildFly CLI Script for interacting with the server ## # ## ########...
Install scoop only if the cmd does not exist
if (Test-Path $PROFILE) { $file = Get-Item $PROFILE -Force -ea 0 $symlink = $file.Attributes -band [IO.FileAttributes]::ReparsePoint if (-Not $symlink) { Remove-Item $PROFILE cmd /c mklink "$PROFILE" "$($args[0])" } } else { $profilePath = Split-Path $PROFILE if (!(Test-Path -Pat...
if (Test-Path $PROFILE) { $file = Get-Item $PROFILE -Force -ea 0 $symlink = $file.Attributes -band [IO.FileAttributes]::ReparsePoint if (-Not $symlink) { Remove-Item $PROFILE cmd /c mklink "$PROFILE" "$($args[0])" } } else { $profilePath = Split-Path $PROFILE if (!(Test-Path -Pat...
Add 'alpha' prelease designation for version 4.8.0
@{ RootModule = 'psake.psm1' ModuleVersion = '4.8.0' GUID = 'cfb53216-072f-4a46-8975-ff7e6bda05a5' Author = 'James Kovacs' Copyright = 'Copyright (c) 2010-18 James Kovacs, Damian Hickey, Brandon Olin, and Contributors' PowerShellVersion = '3.0' ...
@{ RootModule = 'psake.psm1' ModuleVersion = '4.8.0' GUID = 'cfb53216-072f-4a46-8975-ff7e6bda05a5' Author = 'James Kovacs' Copyright = 'Copyright (c) 2010-18 James Kovacs, Damian Hickey, Brandon Olin, and Contributors' PowerShellVersion = '3.0' ...
Upgrade packges script. Keeps things up to date.
echo "Upgrading NCU:" npm install -g npm-check-updates cd packages echo "Upgrading ste-core:" cd ste-core ncu -u npm install cd .. echo "Upgrading ste-events:" cd ste-events ncu -u npm install cd .. echo "Upgrading ste-signals:" cd ste-signals ncu -u npm install cd .. echo "Upgrading ste-simple-events:" cd ste-sim...
Split long line to improve future parallel updates
Resolve-Path $PSScriptRoot\*.ps1 | % { . $_.ProviderPath } Export-ModuleMember Disable-UAC, Enable-UAC, Get-UAC, Disable-InternetExplorerESC, Get-ExplorerOptions, Set-TaskbarSmall, Install-WindowsUpdate, Move-LibraryDirectory, Enable-RemoteDesktop, Set-ExplorerOptions, Get-LibraryNames, Update-ExecutionPolicy,...
Resolve-Path $PSScriptRoot\*.ps1 | % { . $_.ProviderPath } Export-ModuleMember ` Disable-UAC, ` Enable-UAC, ` Get-UAC, ` Disable-InternetExplorerESC, ` Get-ExplorerOptions, ` Set-TaskbarSmall, ` Install-WindowsUpdate, ` Move-LibraryDirectory, ` Enable-RemoteDesktop,...
Rename Get-ProjectByName to Get-Projects and fix its semantics.
<# VS+MSBuild.psm1 - Visual Studio and MSBuild utilities. Copyright (c) 2013 Precision Mojo, LLC. This file is part of the Unity3D.DLLs project (< URL >) which is distributed under the MIT License. Refer to the LICENSE.MIT.md document located in the project directory for licensing terms. Several functions are copied...
<# VS+MSBuild.psm1 - Visual Studio and MSBuild utilities. Copyright (c) 2013 Precision Mojo, LLC. This file is part of the Unity3D.DLLs project (< URL >) which is distributed under the MIT License. Refer to the LICENSE.MIT.md document located in the project directory for licensing terms. Several functions are copied...
Store bin folder from tagged build
$nugetversion = $env:DOTNETR2RMLSTORE_NUGETVERSION function Update-NuspecVersion { Param ([string]$Version) foreach ($o in $input) { Write-output ('Updating nuspec file ' + $o.FullName) $TmpFile = $o.FullName + ".tmp" get-content $o.FullName | %{$_ -replace '\$version\$', $Version } > ...
$nugetversion = $env:DOTNETR2RMLSTORE_NUGETVERSION function Update-NuspecVersion { Param ([string]$Version) foreach ($o in $input) { Write-output ('Updating nuspec file ' + $o.FullName) $TmpFile = $o.FullName + ".tmp" get-content $o.FullName | %{$_ -replace '\$version\$', $Version } > ...
Add Azure Db tools (incl CosmosDB)
### ### Install Visual Studio Code via Chocolatey and my preferred extensions ### $Extensions = @( 'ms-dotnettools.csharp', 'ms-vscode.powershell', 'ms-azuretools.vscode-docker', 'eamodio.gitlens', 'ms-mssql.mssql', 'esbenp.prettier-vscode' ) choco install vscode foreach($Extension in $Extens...
### ### Install Visual Studio Code via Chocolatey and my preferred extensions ### $Extensions = @( 'ms-dotnettools.csharp', 'ms-vscode.powershell', 'ms-azuretools.vscode-docker', 'eamodio.gitlens', 'ms-mssql.mssql', 'esbenp.prettier-vscode', 'ms-azuretools.vscode-cosmosdb' ) choco install ...
Add a script to which build contains a changese/commit
##----------------------------------------------------------------------- ## <copyright file="Get-BuildContainingChangeset.ps1">(c) Richard Fennell. </copyright> ##----------------------------------------------------------------------- # From a changeset/commit numver find any builds that are associated param ( [p...
Rename 'Dropbox' folder to 'My Dropbox'
param( [string]$a ) <# .\go.ps1 "Text Comment for Commit" Make sure to have a "My Dropbox" link in the Documents Library #> if (!$a) { $a = Read-Host 'comment: or (<cr> for generic comment)' } if (!$a) { $a = Get-Date $a = $a + " page updated." } git add -A git commit -m $a git push echo "Copying webpage to Drop...
param( [string]$a ) <# .\go.ps1 "Text Comment for Commit" Make sure to have Dropbox folder named as "My Dropbox" #> if (!$a) { $a = Read-Host 'comment: or (<cr> for generic comment)' } if (!$a) { $a = Get-Date $a = $a + " page updated." } git add -A git commit -m $a git push echo "Copying webpage to Dropbox" cop...
Revert "http - NuGet path test"
$root = (split-path -parent $PSScriptRoot) Write-Host "ROOT - " + $root -ForegroundColor Magenta $version = [System.Reflection.Assembly]::LoadFile("$root\Haarlemmertrekvaart\bin\Release\Haarlemmertrekvaart.dll").GetName().Version $versionStr = "{0}.{1}.{2}" -f ($version.Major, $version.Minor, $version.Build) Write-H...
$root = (split-path -parent $PSScriptRoot) Write-Host "ROOT - " + $root -ForegroundColor Magenta $version = [System.Reflection.Assembly]::LoadFile("$root\Haarlemmertrekvaart\bin\Release\Haarlemmertrekvaart.dll").GetName().Version $versionStr = "{0}.{1}.{2}" -f ($version.Major, $version.Minor, $version.Build) Write-H...
Add some new PowerShell aliases.
# Use the Git and posh-git from GitHub for Windows. # See <http://stackoverflow.com/a/12524788> . (Resolve-Path "$env:LOCALAPPDATA\GitHub\shell.ps1") . $env:github_posh_git\profile.example.ps1 Import-Module PSReadLine Set-PSReadlineOption -EditMode Emacs # Shortcut for running chef-client. '-A' makes chef-client fail...
# Use the Git and posh-git from GitHub for Windows. # See <http://stackoverflow.com/a/12524788> . (Resolve-Path "$env:LOCALAPPDATA\GitHub\shell.ps1") . $env:github_posh_git\profile.example.ps1 Import-Module PSReadLine Set-PSReadlineOption -EditMode Emacs # Shortcut for running chef-client. '-A' makes chef-client fail...
Revert changes to es start script
$es_version = "5.0.0" If ($env:ES_VERSION) { $es_version = $env:ES_VERSION } If ($env:JAVA_HOME -eq $null -or !(Test-Path -Path $env:JAVA_HOME)) { Write-Error "Please ensure the latest version of java is installed and the JAVA_HOME environmental variable has been set." Return } Push-Location $PSScriptRoo...
$es_version = "5.0.0" If ($env:ES_VERSION) { $es_version = $env:ES_VERSION } If ($env:JAVA_HOME -eq $null -or !(Test-Path -Path $env:JAVA_HOME)) { Write-Error "Please ensure the latest version of java is installed and the JAVA_HOME environmental variable has been set." Return } Push-Location $PSScriptRoo...
Add Get/Set ExecutionPolicy cmdlets back to module
@{ GUID="A94C8C7E-9810-47C0-B8AF-65089C13A35A" Author="Microsoft Corporation" CompanyName="Microsoft Corporation" Copyright=" Microsoft Corporation. All rights reserved." ModuleVersion="3.0.0.0" PowerShellVersion="3.0" AliasesToExport = @() FunctionsToExport = @() CmdletsToExport="Get-Credential", "ConvertFrom-SecureSt...
@{ GUID="A94C8C7E-9810-47C0-B8AF-65089C13A35A" Author="Microsoft Corporation" CompanyName="Microsoft Corporation" Copyright=" Microsoft Corporation. All rights reserved." ModuleVersion="3.0.0.0" PowerShellVersion="3.0" AliasesToExport = @() FunctionsToExport = @() CmdletsToExport="Get-Credential", "Get-ExecutionPolicy"...
Create a script to restore the release files
New-Item Releases -type directory -force $wc = New-Object System.Net.WebClient $wc.DownloadFile("https://s3.amazonaws.com/espera/Releases/Dev/RELEASES", ".\Releases/RELEASES"); Get-Content ".\Releases\RELEASES" | ForEach-Object { $_ -match ".* (.*) .*" >$null $filename = $matches[1] $wc.DownloadFile("ht...
Add new tests for Get-WinEvent
Describe 'Get-WinEvent' -Tags "CI" { # Get-WinEvent works only on windows It 'can query a System log' -Skip:(-not $IsWindows) { Get-WinEvent -LogName System -MaxEvents 1 | Should Not Be $null } }
Describe 'Get-WinEvent' -Tags "CI" { BeforeAll { if ( ! $IsWindows ) { $origDefaults = $PSDefaultParameterValues.Clone() $PSDefaultParameterValues['it:skip'] = $true } } AfterAll { if ( ! $IsWindows ){ $global:PSDefaultParameterValues = $or...
Edit from Staxx on my phone via github.com!
$vsixpublish = Get-ChildItem -File .\packages -recurse | Where-Object { $_.Name -eq "VsixPublisher.exe" } | Sort-Object -Descending -Property CreationTime | Select-Object -First 1 -ExpandProperty FullName . $vsixpublish login -publisherName alexdresko -personalAccessToken $env:homeseertemplatespublish ...
$vsixpublish = Get-ChildItem -File .\packages -recurse | Where-Object { $_.Name -eq "VsixPublisher.exe" } | Sort-Object -Descending -Property CreationTime | Select-Object -First 1 -ExpandProperty FullName . $vsixpublish login -publisherName thealexdresko -personalAccessToken $env:homeseertemplatespublis...
Update deployment script to link the Modix container with the CSDiscord container so they can communicate.
$ErrorActionPreference = 'Stop'; $tag = $env:APPVEYOR_REPO_BRANCH if(-not [System.String]::IsNullOrWhitespace($env:APPVEYOR_PULL_REQUEST_NUMBER)) { $tag = "$tag-pr-${$env:APPVEYOR_PULL_REQUEST_NUMBER}" } if([System.String]::IsNullOrWhitespace($tag)) { $tag = "untagged" } if (Enter-OncePerDeployment "install_dock...
$ErrorActionPreference = 'Stop'; $tag = $env:APPVEYOR_REPO_BRANCH if(-not [System.String]::IsNullOrWhitespace($env:APPVEYOR_PULL_REQUEST_NUMBER)) { $tag = "$tag-pr-${$env:APPVEYOR_PULL_REQUEST_NUMBER}" } if([System.String]::IsNullOrWhitespace($tag)) { $tag = "untagged" } if (Enter-OncePerDeployment "install_dock...
Simplify syntax for disable .NET Core telemetry
if (!(Get-Command -Name dotnet -ErrorAction Ignore)) { Write-Verbose -Message (Get-DotFilesMessage -Message 'Skipping .NET Core settings as unable to locate dotnet.') return } Write-Verbose -Message (Get-DotFilesMessage -Message 'Loading .NET Core settings ...') # Opt-out of telemetry Set-Item -Path Env:\DOTN...
if (!(Get-Command -Name dotnet -ErrorAction Ignore)) { Write-Verbose -Message (Get-DotFilesMessage -Message 'Skipping .NET Core settings as unable to locate dotnet.') return } Write-Verbose -Message (Get-DotFilesMessage -Message 'Loading .NET Core settings ...') # Opt-out of telemetry $env:DOTNET_CLI_TELEMETR...
Allow create or not ACR when creating k8s
Param( [parameter(Mandatory=$true)][string]$resourceGroupName, [parameter(Mandatory=$true)][string]$location, [parameter(Mandatory=$true)][string]$registryName, [parameter(Mandatory=$true)][string]$orchestratorName, [parameter(Mandatory=$true)][string]$dnsName ) # Create resource group Write-Host ...
Param( [parameter(Mandatory=$true)][string]$resourceGroupName, [parameter(Mandatory=$true)][string]$location, [parameter(Mandatory=$true)][string]$registryName, [parameter(Mandatory=$true)][string]$orchestratorName, [parameter(Mandatory=$true)][string]$dnsName, [parameter(Mandatory=$true)][stri...
Clean the install directory when installing a new version.
try { $sysDrive = $env:SystemDrive $gittfsPath = "$sysDrive\tools\gittfs" Install-ChocolateyZipPackage 'gittfs' '${DownloadUrl}' $gittfsPath Install-ChocolateyPath $gittfsPath write-host 'git-tfs has been installed. Call git tfs from the command line to see options. You may need to close and reopen the co...
try { $sysDrive = $env:SystemDrive $gittfsPath = "$sysDrive\tools\gittfs" if(test-path $gittfsPath) { write-host "Cleaning out the contents of $gittfsPath" Remove-Item "$($gittfsPath)\*" -recurse -force } Install-ChocolateyZipPackage 'gittfs' '${DownloadUrl}' $gittfsPath Install-ChocolateyPath $...
Update build script for v.2.24 release.
# constants $version = "2.23" $driverName = "chromedriver.exe" $zipName = "chromedriver_win32.$version.zip" $downloadUrl = "https://chromedriver.storage.googleapis.com/$version/chromedriver_win32.zip" # move current folder to where contains this .ps1 script file. $scriptDir = Split-Path $MyInvocation.MyCommand.Path pu...
# constants $version = "2.24" $driverName = "chromedriver.exe" $zipName = "chromedriver_win32.$version.zip" $downloadUrl = "https://chromedriver.storage.googleapis.com/$version/chromedriver_win32.zip" # move current folder to where contains this .ps1 script file. $scriptDir = Split-Path $MyInvocation.MyCommand.Path pu...
Revert "Update date format for windows build"
$VERSION_FILE = $(split-path $MyInvocation.MyCommand.Definition) + "\..\VERSION" $BUILT_AT_FILE = $(split-path $MyInvocation.MyCommand.Definition) + "\..\BUILT_AT" $CURRENT_SHA = $(git rev-parse --short HEAD) $CURRENT_VERSION = get-content VERSION $VERSION_STRING = $CURRENT_VERSION + "+" + $CURRENT_SHA $DATE = Get-Dat...
$VERSION_FILE = $(split-path $MyInvocation.MyCommand.Definition) + "\..\VERSION" $BUILT_AT_FILE = $(split-path $MyInvocation.MyCommand.Definition) + "\..\BUILT_AT" $CURRENT_SHA = $(git rev-parse --short HEAD) $CURRENT_VERSION = get-content VERSION $VERSION_STRING = $CURRENT_VERSION + "+" + $CURRENT_SHA $DATE = Get-Dat...
Improve regex to add -H option
Write-Host "WARNING: DO NOT USE DOCKER IN PRODUCTION WITHOUT TLS" Write-Host "Enabling Docker insecure port 2375" if (!(Get-NetFirewallRule | where {$_.Name -eq "Dockerinsecure2375"})) { New-NetFirewallRule -Name "Dockerinsecure2375" -DisplayName "Docker insecure on TCP/2375" -Protocol tcp -LocalPort 2375 -Action ...
Write-Host "WARNING: DO NOT USE DOCKER IN PRODUCTION WITHOUT TLS" Write-Host "Enabling Docker insecure port 2375" if (!(Get-NetFirewallRule | where {$_.Name -eq "Dockerinsecure2375"})) { New-NetFirewallRule -Name "Dockerinsecure2375" -DisplayName "Docker insecure on TCP/2375" -Protocol tcp -LocalPort 2375 -Action ...
Add PackageManagement acceptance test cases
# # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
Add bash wrapper for PowerShell
function _bashRun($cmdString) { $acceptableExitCode = 0 # This is unfortunately necessary because there is an interfacing issue between the windows console, windows containers, and MSYS2 # Specifically, all of STDOUT and STDERR are lost when executing commands under those circumstances. cd "${env:TEMP}"...
Fix typo in property name
$TestAdapter = [PSObject]@{ Name = (Get-NetAdapter -Physical | Select-Object -First 1).Name PhysicalMediaType = '802.3' Status = 'Up' } configuration MSFT_xNetworkAdapterName_Config { Import-DscResource -ModuleName xNetworking node localhost { xNet...
$TestAdapter = [PSObject]@{ Name = (Get-NetAdapter -Physical | Select-Object -First 1).Name PhysicalMediaType = '802.3' Status = 'Up' } configuration MSFT_xNetworkAdapterName_Config { Import-DscResource -ModuleName xNetworking node localhost { xNet...
Add template bootstrap script for windows
#User variables $SystemPrepMasterScriptUrl = 'https://url/to/masterscript.ps1' $SystemPrepParams = @{ Param1 = "Value1" Param2 = "Value2" Param3 = "Value3" Param4 = "Value4" } #System variables $DateTime = $(get-date -format "yyyyMMdd_HHmm_ss") $ScriptName = $MyInvocation.mycommand.name $SystemPrepDir ...
Update project versioning PS script
# This PowerShel script appends AppVeyor build number to the package version. $projects = Get-ChildItem .\src | ?{$_.PsIsContainer} foreach($project in $projects) { cd src/$project npm install node project-version.js cd ../../ }
# This PowerShel script appends AppVeyor build number to the package version. $projects = Get-ChildItem .\src | ?{$_.PsIsContainer} foreach($project in $projects) { # Display project name $project # Move to the project cd src/$project # NPM install npm install # Run node.js script n...
Test coverage for Ignorable column being present for IncludeIgnorable
$commandname = $MyInvocation.MyCommand.Name.Replace(".Tests.ps1", "") Write-Host -Object "Running $PSCommandpath" -ForegroundColor Cyan . "$PSScriptRoot\constants.ps1" Describe "$commandname Integration Tests" -Tags "IntegrationTests" { Context "Command returns proper info" { $results = Get-DbaWaitStatist...
$commandname = $MyInvocation.MyCommand.Name.Replace(".Tests.ps1", "") Write-Host -Object "Running $PSCommandpath" -ForegroundColor Cyan . "$PSScriptRoot\constants.ps1" Describe "$commandname Integration Tests" -Tags "IntegrationTests" { Context "Command returns proper info" { $results = Get-DbaWaitStatist...
Fix the windows installer script
$ErrorActionPreference = "Stop" If ($Args.Count -ne 2) { echo "Usage:" echo $Args[0] + " <BOOTSTRAP TARBALL VERSION>" echo "Bootstrap tarball version will be compiled into Installer." echo "" exit 1 } echo "Compiling InstallMeteor" echo "Bootstrap tarball version " + $Args[1] # Set the version (Get-Content...
$ErrorActionPreference = "Stop" $script_path = (split-path -parent $MyInvocation.MyCommand.Definition) + "\" If ($Args.Count -ne 1) { echo "Usage:" echo "build-installer.ps1 <BOOTSTRAP TARBALL VERSION>" echo "Bootstrap tarball version will be compiled into Installer." echo "" exit 1 } echo "Compiling Instal...
Rename width and height variables
final int screenWidth = 1366; final int screenHeight = 768; final color black = color(0, 0, 0); Camera camera; Mouse mouse; Room room; void setup() { size(screenWidth, screenHeight, P3D); noCursor(); mouse = new Mouse(); camera = new Camera(mouse, width, height); room = new Room(camera); } void draw() { ...
final int width = 1366; final int height = 768; final color black = color(0, 0, 0); Camera camera; Mouse mouse; Room room; void setup() { size(width, height, P3D); noCursor(); mouse = new Mouse(); camera = new Camera(mouse, width, height); room = new Room(camera); } void draw() { background(black); if ...
Add dimensions to protocol buffer
package com.signalfuse.metrics.protobuf; enum MetricType { /** * Numerical: Periodic, instantaneous measurement of some state. */ GAUGE = 0; /** * Numerical: Count of occurrences. Generally non-negative integers. */ COUNTER = 1; /** * String: Used for non-continuous quantit...
package com.signalfuse.metrics.protobuf; enum MetricType { /** * Numerical: Periodic, instantaneous measurement of some state. */ GAUGE = 0; /** * Numerical: Count of occurrences. Generally non-negative integers. */ COUNTER = 1; /** * String: Used for non-continuous quantit...
Add required/optional and explain PAE.
syntax = "proto3"; package io.intoto; // An authenticated message of arbitrary type. message Envelope { // Message to be signed. (In JSON, this is encoded as base64.) bytes payload = 1; // String unambiguously identifying how to interpret payload. string payloadType = 2; // Signature over: // le64(2...
syntax = "proto3"; package io.intoto; // An authenticated message of arbitrary type. message Envelope { // Message to be signed. (In JSON, this is encoded as base64.) // REQUIRED. bytes payload = 1; // String unambiguously identifying how to interpret payload. // REQUIRED. string payloadType = 2; // S...
Fix the extension number for TelemetryFieldOptions to be in sync with MX
/* * Copyright (c) 2014 Juniper Networks, Inc. All rights reserved. */ import "google/protobuf/descriptor.proto"; message SelfDescribingMessage { // Timestamp required uint64 timestamp = 1; // Set of .proto files which define the type. optional google.protobuf.FileDescriptorSet proto_files = 2; // Name ...
/* * Copyright (c) 2014 Juniper Networks, Inc. All rights reserved. */ import "google/protobuf/descriptor.proto"; message SelfDescribingMessage { // Timestamp required uint64 timestamp = 1; // Set of .proto files which define the type. optional google.protobuf.FileDescriptorSet proto_files = 2; // Name ...
Replace a minomer: s/SaveRestoreHelper/Saver. Change: 129002390
syntax = "proto3"; package tensorflow; option cc_enable_arenas = true; option java_outer_classname = "SaverProtos"; option java_multiple_files = true; option java_package = "org.tensorflow.util"; // Protocol buffer representing the configuration of a SaveRestoreHelper. message SaverDef { // The name of the tensor i...
syntax = "proto3"; package tensorflow; option cc_enable_arenas = true; option java_outer_classname = "SaverProtos"; option java_multiple_files = true; option java_package = "org.tensorflow.util"; // Protocol buffer representing the configuration of a Saver. message SaverDef { // The name of the tensor in which to s...
Add restricted attribute to DnsDomain
// -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- // ex: set expandtab softtabstop=4 shiftwidth=4: package aqddnsdomains; message DNSDomain { optional string name = 1; } message DNSDomainList { repeated DNSDomain dns_domains = 1; }
// -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- // ex: set expandtab softtabstop=4 shiftwidth=4: package aqddnsdomains; message DNSDomain { optional string name = 1; optional bool restricted = 2; } message DNSDomainList { repeated DNSDomain dns_domains = 1; }
Add a new field revokedReason for RevokedAccount
syntax = "proto3"; package zigbeealliance.distributedcomplianceledger.dclauth; option go_package = "github.com/zigbee-alliance/distributed-compliance-ledger/x/dclauth/types"; import "gogoproto/gogo.proto"; import "dclauth/account.proto"; import "dclauth/grant.proto"; message RevokedAccount { Account account = 1 [(...
syntax = "proto3"; package zigbeealliance.distributedcomplianceledger.dclauth; option go_package = "github.com/zigbee-alliance/distributed-compliance-ledger/x/dclauth/types"; import "gogoproto/gogo.proto"; import "dclauth/account.proto"; import "dclauth/grant.proto"; import "cosmos_proto/cosmos.proto"; message Revok...
Fix the extension number for cloud_event_type
// Copyright 2020 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in...
// Copyright 2020 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in...
ADD setup messages protobuf descriptor
syntax = "proto3"; package syft.grid.messages; import "proto/core/common/common_object.proto"; import "proto/core/io/address.proto"; message CreateInitialSetupMessage { syft.core.common.UID msg_id = 1; syft.core.io.Address address = 2; } message CreateInitialSetupResponse { syft.core.common.UID msg_id = 1; ...
syntax = "proto3"; package syft.grid.messages; import "proto/core/common/common_object.proto"; import "proto/core/io/address.proto"; message CreateInitialSetUpMessage { syft.core.common.UID msg_id = 1; syft.core.io.Address address = 2; string content = 3; syft.core.io.Address reply_to = 4; } message CreateI...
Add volume_id field to CreateVMRequest
syntax = "proto3"; message CreateVMRequest { string id = 1; string host = 2; string arch = 3; uint32 vcpus = 4; uint32 memory_mb = 5; string vnc_password = 6; }
syntax = "proto3"; message CreateVMRequest { string id = 1; string host = 2; string arch = 3; uint32 vcpus = 4; uint32 memory_mb = 5; string vnc_password = 6; string volume_id = 7; }
Add service addresses to Network skeleton
// -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- // ex: set expandtab softtabstop=4 shiftwidth=4: package aqdnetworks; import "aqdsystems.proto"; import "aqdlocations.proto"; message DynamicRange { optional string start = 1; optional string end = 2; optional string range_class = 3; } message Networ...
// -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- // ex: set expandtab softtabstop=4 shiftwidth=4: package aqdnetworks; import "aqdsystems.proto"; import "aqdlocations.proto"; message DynamicRange { optional string start = 1; optional string end = 2; optional string range_class = 3; } message Networ...
Fix invalid proto package name.
// // Copyright 2017, TeamDev Ltd. All rights reserved. // // Redistribution and use in source and/or binary forms, with or without // modification, must retain the above copyright notice and the following // disclaimer. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRES...
// // Copyright 2017, TeamDev Ltd. All rights reserved. // // Redistribution and use in source and/or binary forms, with or without // modification, must retain the above copyright notice and the following // disclaimer. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRES...
Add subscribe and unsubscribe action to driver message protobuf file
package amber; option java_package = "pl.edu.agh.amber.common.proto"; option java_outer_classname = "CommonProto"; option optimize_for = SPEED; enum DeviceType { NINEDOF = 1; ROBOCLAW = 2; STARGAZER = 3; HOKUYO = 4; DUMMY = 5; } message DriverHdr { optional int32 deviceType = 1; optional...
package amber; option java_package = "pl.edu.agh.amber.common.proto"; option java_outer_classname = "CommonProto"; option optimize_for = SPEED; enum DeviceType { NINEDOF = 1; ROBOCLAW = 2; STARGAZER = 3; HOKUYO = 4; DUMMY = 5; } message DriverHdr { optional int32 deviceType = 1; optional...
Update sequence of the new flags
syntax = "proto3"; package zigbeealliance.distributedcomplianceledger.compliance; option go_package = "github.com/zigbee-alliance/distributed-compliance-ledger/x/compliance/types"; import "compliance/compliance_history_item.proto"; import "cosmos_proto/cosmos.proto"; message ComplianceInfo { int32 vid = 1; int3...
syntax = "proto3"; package zigbeealliance.distributedcomplianceledger.compliance; option go_package = "github.com/zigbee-alliance/distributed-compliance-ledger/x/compliance/types"; import "compliance/compliance_history_item.proto"; import "cosmos_proto/cosmos.proto"; message ComplianceInfo { int32 vid = 1; int3...
Add a new entity RejectedNode
syntax = "proto3"; package zigbeealliance.distributedcomplianceledger.validator; option go_package = "github.com/zigbee-alliance/distributed-compliance-ledger/x/validator/types"; message RejectedNode { string owner = 1; repeated string approvals = 2; }
syntax = "proto3"; package zigbeealliance.distributedcomplianceledger.validator; import "cosmos_proto/cosmos.proto"; import "validator/grant.proto"; option go_package = "github.com/zigbee-alliance/distributed-compliance-ledger/x/validator/types"; message RejectedNode { string address = 1 [(cosmos_proto.scalar) = "...
Add experimental Info() API (not recompiled)
// // The report.proto file defines the protocol buffer messages used for reporting // nodes to a server. // syntax = "proto3"; package report; import "google/protobuf/timestamp.proto"; // Set some options necessary to generate .java classes from the .proto. option java_multiple_files = true; option java_package = "...
// // The report.proto file defines the protocol buffer messages used for reporting // nodes to a server. // syntax = "proto3"; package report; import "google/protobuf/timestamp.proto"; // Set some options necessary to generate .java classes from the .proto. option java_multiple_files = true; option java_package = "...
Add additional fields to android deploy info to support mobile-install usage.
// Copyright 2016 The Bazel Authors. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by appl...
// Copyright 2016 The Bazel Authors. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by appl...
Add ApplicationRole enum type in protobuf model
syntax = "proto3"; option java_package = "org.onosproject.grpc.app.models"; package app; enum ApplicationStateProto { // Indicates that application has been installed, but is not running. INSTALLED = 0; // Indicates that application is active. ACTIVE = 1; }
syntax = "proto3"; option java_package = "org.onosproject.grpc.app.models"; package app; enum ApplicationStateProto { // Indicates that application has been installed, but is not running. INSTALLED = 0; // Indicates that application is active. ACTIVE = 1; } enum ApplicationRoleProto { // Indicate...
Add proto file for methods definition
package hydrad; message request_version { } message response_version { required string version = 1; } message request_stats { } message response_stats { message requests_counters { required string total_count = 1; required string failed_count = 2; required string error_count = 3; } required requ...
Add Protobuf definition for Work.
syntax = "proto3"; package spine.work; option java_generate_equals_and_hash = true; option java_multiple_files = true; option java_package = "org.spine3.work"; option java_outer_classname = "WorkProto"; // Represents the amount of work done in minutes. message Work { int32 minutes = 1; }
Add copy of proto2 extensions to google/protobuf/
// Copyright 2012-2020 Google LLC // // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/MIT. // extensions to descriptor.proto to support lisp-specific extensions // in proto definitions syntax = "proto2"; import "google/pr...
ADD transfer messages protobuf schema
syntax = "proto3"; package syft.grid.messages; import "proto/core/common/common_object.proto"; import "proto/core/io/address.proto"; message LoadObjectMessage { syft.core.common.UID msg_id = 1; syft.core.io.Address address = 2; string content = 3; syft.core.io.Address reply_to = 4; } message LoadObjectRespo...
Use "C-family" rather than "C-deriving" rendering
module Data.Void (Void, absurd) where import Data.Show (class Show) -- | An uninhabited data type. In other words, one can never create -- | a runtime value of type `Void` becaue no such value exists. -- | -- | `Void` is useful to eliminate the possibility of a value being created. -- | For example, a value of type `...
module Data.Void (Void, absurd) where import Data.Show (class Show) -- | An uninhabited data type. In other words, one can never create -- | a runtime value of type `Void` becaue no such value exists. -- | -- | `Void` is useful to eliminate the possibility of a value being created. -- | For example, a value of type `...
Add test for premature effect performing
module Test.Main where import Prelude import Control.Apply import Control.Bind import Control.Monad.Eff.Console import Control.Monad.Eff.Console.Unsafe import Data.Posix.Signal (Signal(..)) import Node.Encoding (Encoding(UTF8)) import Node.Buffer as Buffer import Node.ChildProcess import Node.Stream (onData) main =...
module Test.Main where import Prelude import Control.Apply import Control.Bind import Control.Monad.Eff.Console import Control.Monad.Eff.Console.Unsafe import Data.Posix.Signal (Signal(..)) import Node.Encoding (Encoding(UTF8)) import Node.Buffer as Buffer import Node.ChildProcess import Node.Stream (onData) main =...
Use 'void of C-family languages' rendering
module Data.Void (Void, absurd) where import Data.Show (class Show) -- | An uninhabited data type. In other words, one can never create -- | a runtime value of type `Void` becaue no such value exists. -- | -- | `Void` is useful to eliminate the possibility of a value being created. -- | For example, a value of type `...
module Data.Void (Void, absurd) where import Data.Show (class Show) -- | An uninhabited data type. In other words, one can never create -- | a runtime value of type `Void` becaue no such value exists. -- | -- | `Void` is useful to eliminate the possibility of a value being created. -- | For example, a value of type `...
Test very simple routes generation
module Test.Main where import Control.Monad.Aff.AVar (AVAR) import Control.Monad.Eff (Eff) import Data.Generic (class Generic, gEq, gShow) import Data.Maybe (Maybe(..)) import Prelude (bind, class Eq, class Show, Unit) import Test.Unit (test, runTest, TIMER) import Test.Unit.Console (TESTOUTPUT) import Test.Unit.Asser...
Add test for Prelude's unsafeCompare FFI call
module Main where import Control.Monad.Eff import Debug.Trace foreign import data Assert :: ! foreign import assert "function assert(x) {\ \ return function () {\ \ if (!x) throw new Error('assertion failed');\ \ return {};\ \ };\ \};" :: forall e. Boolean -> Eff (assert :: Assert | e) Unit main...
Remove "validation" from RejectionException docstring
#!/usr/bin/env python3 """Exception classes shared by all automata.""" class AutomatonException(Exception): """The base class for all automaton-related errors.""" pass class InvalidStateError(AutomatonException): """A state is not a valid state for this automaton.""" pass class InvalidSymbolErro...
#!/usr/bin/env python3 """Exception classes shared by all automata.""" class AutomatonException(Exception): """The base class for all automaton-related errors.""" pass class InvalidStateError(AutomatonException): """A state is not a valid state for this automaton.""" pass class InvalidSymbolErro...
Correct the description and update the dev status to stable.
from setuptools import setup import os def read(filename): with open(filename) as fin: return fin.read() setup( name='dictobj', version='0.2.5', author='William Grim', author_email='william@grimapps.com', url='https://github.com/grimwm/py-dictobj', classifiers = [ 'Development Status :: 4 - Beta...
from setuptools import setup import os def read(filename): with open(filename) as fin: return fin.read() setup( name='dictobj', version='0.2.5', author='William Grim', author_email='william@grimapps.com', url='https://github.com/grimwm/py-dictobj', classifiers = [ 'Development Status :: 5 - Prod...
Include base version for msgpack, because 0.3 doesn't work
import platform import sys from setuptools import setup install_requires = [ 'msgpack-python', ] if sys.version_info < (3, 4): # trollius is just a backport of 3.4 asyncio module install_requires.append('trollius') if not platform.python_implementation() == 'PyPy': # pypy already includes an impleme...
import platform import sys from setuptools import setup install_requires = [ 'msgpack-python>=0.4.0', ] if sys.version_info < (3, 4): # trollius is just a backport of 3.4 asyncio module install_requires.append('trollius') if not platform.python_implementation() == 'PyPy': # pypy already includes an ...
Remove plain 'django-admin-sortable' from requirements
# -*- coding: utf-8 -*- from setuptools import setup, find_packages from aldryn_faq import __version__ REQUIREMENTS = [ 'aldryn-apphooks-config', 'aldryn-reversion', 'aldryn-search', 'django-admin-sortable', 'django-admin-sortable2>=0.5.0', 'django-parler', 'django-sortedm2m', ] CLASSIFIER...
# -*- coding: utf-8 -*- from setuptools import setup, find_packages from aldryn_faq import __version__ REQUIREMENTS = [ 'aldryn-apphooks-config', 'aldryn-reversion', 'aldryn-search', # 'django-admin-sortable', 'django-admin-sortable2>=0.5.0', 'django-parler', 'django-sortedm2m', ] CLASSIFI...
Update for compatibility with python 3
#!/usr/bin/python import pymongo import bson import time import sys from mongo_connector import util mongo_url = 'mongodb://localhost:27017' if len(sys.argv) == 1: print "First argument is mongodb connection string, i.e. localhost:27017. Assuming localhost:27017..." if len(sys.argv) >= 2: mongo_url = sys.argv[1] ...
#!/usr/bin/python import pymongo import bson import time import sys from mongo_connector import util mongo_url = 'mongodb://localhost:27017' if len(sys.argv) == 1: print "First argument is mongodb connection string, i.e. localhost:27017. Assuming localhost:27017..." if len(sys.argv) >= 2: mongo_url = sys.argv[1] ...
Deal with MD and RST doc
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup setup( name='robber', version='1.1.1', description='BDD / TDD assertion library for Python', author='Tao Liang', author_email='tao@synapse-ai.com', url='https://github.com/vesln/robber.py', packages=[ 'robber...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os from setuptools import setup long_description = 'BDD / TDD assertion library for Python', if os.path.exists('README.rst'): long_description = open('README.rst').read() setup( name='robber', version='1.1.2', description='BDD / TDD assertion libra...
Comment out entrypoint because it blows up django-nose in connection with tox. Ouch.
import os from setuptools import setup, find_packages ROOT = os.path.abspath(os.path.dirname(__file__)) setup( name='django-nose', version='0.2', description='Django test runner that uses nose.', long_description=open(os.path.join(ROOT, 'README.rst')).read(), author='Jeff Balogh', author_email...
import os from setuptools import setup, find_packages ROOT = os.path.abspath(os.path.dirname(__file__)) setup( name='django-nose', version='0.2', description='Django test runner that uses nose.', long_description=open(os.path.join(ROOT, 'README.rst')).read(), author='Jeff Balogh', author_email...
Include author email since it's required info
import os from setuptools import setup longDesc = "" if os.path.exists("README.rst"): longDesc = open("README.rst").read().strip() setup( name = "pytesseract", version = "0.1.6", author = "Samuel Hoffstaetter", author_email="", maintainer = "Matthias Lee", maintainer_email = "pytesseract@mad...
import os from setuptools import setup longDesc = "" if os.path.exists("README.rst"): longDesc = open("README.rst").read().strip() setup( name = "pytesseract", version = "0.1.6", author = "Samuel Hoffstaetter", author_email="pytesseract@madmaze.net", maintainer = "Matthias Lee", maintainer_e...
Fix bug with 'all' argument
from copy import copy import argparse from preparation.resources.Resource import names_registered, resource_by_name from hb_res.storage import get_storage, ExplanationStorage def generate_asset(resource, out_storage: ExplanationStorage): out_storage.clear() for explanation in resource: r = copy(expla...
from copy import copy import argparse from preparation.resources.Resource import names_registered, resource_by_name from hb_res.storage import get_storage, ExplanationStorage def generate_asset(resource, out_storage: ExplanationStorage): out_storage.clear() for explanation in resource: r = copy(expla...
Fix the parallel env variable test to reset the env correctly
from numba.np.ufunc.parallel import get_thread_count from os import environ as env from numba.core import config import unittest class TestParallelEnvVariable(unittest.TestCase): """ Tests environment variables related to the underlying "parallel" functions for npyufuncs. """ _numba_parallel_test...
from numba.np.ufunc.parallel import get_thread_count from os import environ as env from numba.core import config import unittest class TestParallelEnvVariable(unittest.TestCase): """ Tests environment variables related to the underlying "parallel" functions for npyufuncs. """ _numba_parallel_test...
Correct the unit test in V5_5_0
# Copyright (c) 2015 Intel Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
# Copyright (c) 2015 Intel Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
Return a text attribute for an hover only module
import json import requests misperrors = {'error': 'Error'} mispattributes = {'input': ['vulnerability'], 'output': ['']} moduleinfo = {'version': '0.1', 'author': 'Alexandre Dulaunoy', 'description': 'An expansion hover module to expand information about CVE id.', 'module-type': ['hover']} moduleconfig = [] cveapi_ur...
import json import requests misperrors = {'error': 'Error'} mispattributes = {'input': ['vulnerability'], 'output': ['text']} moduleinfo = {'version': '0.2', 'author': 'Alexandre Dulaunoy', 'description': 'An expansion hover module to expand information about CVE id.', 'module-type': ['hover']} moduleconfig = [] cveap...
Add json filename to output.
#!/usr/bin/python import os import os.path import json import re import tabulate def get_json_file(): dir='/var/www/html' json_list = [] for root, dirs, files in os.walk( dir ): for f in files: if f.endswith( '.json' ): json_list.append( os.path.join( root, f ) ) sorted_l...
#!/usr/bin/python import os import os.path import json import re import tabulate def get_json_file(): dir='/var/www/html' json_list = [] for root, dirs, files in os.walk( dir ): for f in files: if f.endswith( '.json' ): json_list.append( os.path.join( root, f ) ) sorted_l...
Add handling for multi-tenancy in sitemap.xml
from django.contrib.sitemaps import Sitemap from django.db.models import get_models from mezzanine.conf import settings from mezzanine.core.models import Displayable from mezzanine.utils.urls import home_slug blog_installed = "mezzanine.blog" in settings.INSTALLED_APPS if blog_installed: from mezzanine.blog.mod...
from django.contrib.sitemaps import Sitemap from django.contrib.sites.models import Site from django.db.models import get_models from mezzanine.conf import settings from mezzanine.core.models import Displayable from mezzanine.utils.sites import current_site_id from mezzanine.utils.urls import home_slug blog_install...
Fix wrong import of logger
# Django settings for vpr project. from base import * from logger import * DEBUG = True DEVELOPMENT = True TEMPLATE_DEBUG = DEBUG DATABASES = { 'default': { #'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. #'NAME': 'vpr.sqlite3', ...
# Django settings for vpr project. from base import * DEBUG = True DEVELOPMENT = True TEMPLATE_DEBUG = DEBUG DATABASES = { 'default': { #'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. #'NAME': 'vpr.sqlite3', # Or path to datab...