full_path stringlengths 31 232 | filename stringlengths 4 167 | content stringlengths 0 48.3M |
|---|---|---|
PowerShellCorpus/Github/woliver13_Woliver13.CmdLine/src/packages/psake.4.2.0.1/tools/specs/failing_postcondition_should_fail.ps1 | failing_postcondition_should_fail.ps1 | task default -depends A,B,C
task A {
"TaskA"
}
task B -postcondition { return $false } {
"TaskB"
}
task C {
"TaskC"
} |
PowerShellCorpus/Github/woliver13_Woliver13.CmdLine/src/packages/psake.4.2.0.1/tools/specs/missing_task_should_fail.ps1 | missing_task_should_fail.ps1 | task default -depends Test
task Test -depends Compile, Clean {
Write-Host "Running PSake"
}
|
PowerShellCorpus/Github/woliver13_Woliver13.CmdLine/src/packages/psake.4.2.0.1/tools/specs/using_properties_should_pass.ps1 | using_properties_should_pass.ps1 | properties {
$x = $null
$y = $null
$z = $null
}
task default -depends TestProperties
task TestProperties {
Assert ($x -ne $null) "x should not be null"
Assert ($y -ne $null) "y should not be null"
Assert ($z -eq $null) "z should be null"
} |
PowerShellCorpus/Github/woliver13_Woliver13.CmdLine/src/packages/psake.4.2.0.1/tools/specs/bad_PreAndPostActions_should_fail.ps1 | bad_PreAndPostActions_should_fail.ps1 | task default -depends Test
task Test -depends Compile, Clean -PreAction {"Pre-Test"} -PostAction {"Post-Test"}
task Compile -depends Clean {
"Compile"
}
task Clean {
"Clean"
} |
PowerShellCorpus/Github/woliver13_Woliver13.CmdLine/src/packages/psake.4.2.0.1/tools/specs/dotNet4_should_pass.ps1 | dotNet4_should_pass.ps1 | $framework = '4.0'
task default -depends MsBuild
task MsBuild {
exec { msbuild /version }
}
|
PowerShellCorpus/Github/woliver13_Woliver13.CmdLine/src/packages/psake.4.2.0.1/tools/specs/using_msbuild_should_pass.ps1 | using_msbuild_should_pass.ps1 | task default -depends DisplayNotice
task DisplayNotice {
exec { msbuild /version }
} |
PowerShellCorpus/Github/woliver13_Woliver13.CmdLine/src/packages/psake.4.2.0.1/tools/specs/duplicate_tasks_should_fail.ps1 | duplicate_tasks_should_fail.ps1 | task A {}
task B {}
task A {} |
PowerShellCorpus/Github/woliver13_Woliver13.CmdLine/src/packages/psake.4.2.0.1/tools/specs/multiline_blocks_should_pass.ps1 | multiline_blocks_should_pass.ps1 | task default -depends doStuff
task doStuff {
"Starting to do stuff..."
"Adding stuff... 1 + 1 =" + (1+1)
"Stuff done!"
} |
PowerShellCorpus/Github/woliver13_Woliver13.CmdLine/src/packages/psake.4.2.0.1/tools/specs/nested_builds_should_pass.ps1 | nested_builds_should_pass.ps1 | Properties {
$x = 1
}
Task default -Depends RunNested1, RunNested2, CheckX
Task RunNested1 {
Invoke-psake .\nested\nested1.ps1
}
Task RunNested2 {
Invoke-psake .\nested\nested2.ps1
}
Task CheckX{
Assert ($x -eq 1) '$x was not 1'
} |
PowerShellCorpus/Github/woliver13_Woliver13.CmdLine/src/packages/psake.4.2.0.1/tools/specs/using_PreAndPostActions_should_pass.ps1 | using_PreAndPostActions_should_pass.ps1 | task default -depends Test
task Test -depends Compile, Clean -PreAction {"Pre-Test"} -Action {
"Test"
} -PostAction {"Post-Test"}
task Compile -depends Clean {
"Compile"
}
task Clean {
"Clean"
} |
PowerShellCorpus/Github/woliver13_Woliver13.CmdLine/src/packages/psake.4.2.0.1/tools/specs/using_required_when_set_should_pass.ps1 | using_required_when_set_should_pass.ps1 | properties {
$x = $null
$y = $null
}
task default -depends TestRequired
task TestRequired -requiredVariables x, y {
}
|
PowerShellCorpus/Github/woliver13_Woliver13.CmdLine/src/packages/psake.4.2.0.1/tools/specs/writing_psake_variables_should_pass.ps1 | writing_psake_variables_should_pass.ps1 | properties {
$x = 1
}
task default -depends Verify
task Verify -description "This task verifies psake's variables" {
#Verify the exported module variables
cd variable:
Assert (Test-Path "psake") "variable psake was not exported from module"
Assert ($psake.ContainsKey("build_success")) "'psake... |
PowerShellCorpus/Github/woliver13_Woliver13.CmdLine/src/packages/psake.4.2.0.1/tools/specs/executing_module_function_that_depends_on_another_module_should_work.ps1 | executing_module_function_that_depends_on_another_module_should_work.ps1 | task default -depends test
task test {
Execute-ModuleAFunction
} |
PowerShellCorpus/Github/woliver13_Woliver13.CmdLine/src/packages/psake.4.2.0.1/tools/specs/task_with_alias_and_dependencies_should_pass.ps1 | task_with_alias_and_dependencies_should_pass.ps1 | task default -depends Task_With_Alias
task Task_With_Alias -depends Task_Dependency -alias twa {}
task Task_Dependency {} |
PowerShellCorpus/Github/woliver13_Woliver13.CmdLine/src/packages/psake.4.2.0.1/tools/specs/running_aspnet_compiler_under_dotNet35_should_pass.ps1 | running_aspnet_compiler_under_dotNet35_should_pass.ps1 | $framework = '3.5'
task default -depends AspNetCompiler
task AspNetCompiler {
aspnet_compiler
if ($LastExitCode -ne 1) {
throw 'Error: Could not execute aspnet_compiler'
}
} |
PowerShellCorpus/Github/woliver13_Woliver13.CmdLine/src/packages/psake.4.2.0.1/tools/specs/explicitly_specified_32bit_build_should_pass.ps1 | explicitly_specified_32bit_build_should_pass.ps1 | $framework = '3.5x86'
task default -depends MsBuild
task MsBuild {
exec { msbuild /version }
}
|
PowerShellCorpus/Github/woliver13_Woliver13.CmdLine/src/packages/psake.4.2.0.1/tools/specs/circular_dependency_in_tasks_should_fail.ps1 | circular_dependency_in_tasks_should_fail.ps1 | task default -depends A
task A -depends B { }
task B -depends A { }
|
PowerShellCorpus/Github/woliver13_Woliver13.CmdLine/src/packages/psake.4.2.0.1/tools/specs/default_task_with_action_should_fail.ps1 | default_task_with_action_should_fail.ps1 | task default {
"Starting to do stuff..."
"Adding stuff... 1 + 1 =" + (1+1)
"Stuff done!"
} |
PowerShellCorpus/Github/woliver13_Woliver13.CmdLine/src/packages/psake.4.2.0.1/tools/specs/task_with_alias_should_pass.ps1 | task_with_alias_should_pass.ps1 | task Task_With_Big_Descriptve_Name -alias twbdn {
"Doing stuff inside task with alias"
} |
PowerShellCorpus/Github/woliver13_Woliver13.CmdLine/src/packages/psake.4.2.0.1/tools/specs/tasksetup_should_pass.ps1 | tasksetup_should_pass.ps1 | TaskSetup {
"executing task setup"
}
Task default -depends Compile, Test, Deploy
Task Compile {
"Compiling"
}
Task Test -depends Compile {
"Testing"
}
Task Deploy -depends Test {
"Deploying"
} |
PowerShellCorpus/Github/woliver13_Woliver13.CmdLine/src/packages/psake.4.2.0.1/tools/specs/using_required_when_not_set_should_fail.ps1 | using_required_when_not_set_should_fail.ps1 | properties {
$x = $null
$y = $null
$z = $null
}
task default -depends TestProperties
task TestProperties -requiredVariables z{
}
|
PowerShellCorpus/Github/woliver13_Woliver13.CmdLine/src/packages/psake.4.2.0.1/tools/specs/using_parameters_should_pass.ps1 | using_parameters_should_pass.ps1 | properties {
$my_property = $p1 + $p2
}
task default -depends TestParams
task TestParams {
Assert ($my_property -ne $null) '$my_property should not be null'
} |
PowerShellCorpus/Github/woliver13_Woliver13.CmdLine/src/packages/psake.4.2.0.1/tools/specs/nested/nested2.ps1 | nested2.ps1 | Properties {
$x = 200
}
Task default -Depends Nested2CheckX
Task Nested2CheckX{
Assert ($x -eq 200) '$x was not 200'
} |
PowerShellCorpus/Github/woliver13_Woliver13.CmdLine/src/packages/psake.4.2.0.1/tools/specs/nested/nested1.ps1 | nested1.ps1 | Properties {
$x = 100
}
Task default -Depends Nested1CheckX
Task Nested1CheckX{
Assert ($x -eq 100) '$x was not 100'
} |
PowerShellCorpus/Github/woliver13_Woliver13.CmdLine/src/packages/psake.4.2.0.1/tools/examples/properties.ps1 | properties.ps1 | properties {
$x = $null
$y = $null
$z = $null
}
task default -depends TestProperties
task TestProperties {
Assert ($x -ne $null) "x should not be null. Run with -properties @{'x' = '1'; 'y' = '2'}"
Assert ($y -ne $null) "y should not be null. Run with -properties @{'x' = '1'; 'y' = '2'}"
Asser... |
PowerShellCorpus/Github/woliver13_Woliver13.CmdLine/src/packages/psake.4.2.0.1/tools/examples/continueonerror.ps1 | continueonerror.ps1 | Task default -Depends TaskA
Task TaskA -Depends TaskB {
"Task - A"
}
Task TaskB -Depends TaskC -ContinueOnError {
"Task - B"
throw "I failed on purpose!"
}
Task TaskC {
"Task - C"
} |
PowerShellCorpus/Github/woliver13_Woliver13.CmdLine/src/packages/psake.4.2.0.1/tools/examples/parameters.ps1 | parameters.ps1 | properties {
$my_property = $p1 + $p2
}
task default -depends TestParams
task TestParams {
Assert ($my_property -ne $null) "`$my_property should not be null. Run with -parameters @{'p1' = 'v1'; 'p2' = 'v2'}"
} |
PowerShellCorpus/Github/woliver13_Woliver13.CmdLine/src/packages/psake.4.2.0.1/tools/examples/formattaskname_scriptblock.ps1 | formattaskname_scriptblock.ps1 | properties {
$testMessage = 'Executed Test!'
$compileMessage = 'Executed Compile!'
$cleanMessage = 'Executed Clean!'
}
task default -depends Test
formatTaskName {
param($taskName)
write-host $taskName -foregroundcolor Green
}
task Test -depends Compile, Clean {
$testMessage
}
task Compil... |
PowerShellCorpus/Github/woliver13_Woliver13.CmdLine/src/packages/psake.4.2.0.1/tools/examples/preandpostaction.ps1 | preandpostaction.ps1 | task default -depends Test
task Test -depends Compile, Clean -PreAction {"Pre-Test"} -Action {
"Test"
} -PostAction {"Post-Test"}
task Compile -depends Clean {
"Compile"
}
task Clean {
"Clean"
} |
PowerShellCorpus/Github/woliver13_Woliver13.CmdLine/src/packages/psake.4.2.0.1/tools/examples/preandpostcondition.ps1 | preandpostcondition.ps1 | properties {
$runTaskA = $false
$taskBSucceded = $true
}
task default -depends TaskC
task TaskA -precondition { $runTaskA -eq $true } {
"TaskA executed"
}
task TaskB -postcondition { $taskBSucceded -eq $true } {
"TaskB executed"
}
task TaskC -depends TaskA,TaskB {
"TaskC executed."
} |
PowerShellCorpus/Github/woliver13_Woliver13.CmdLine/src/packages/psake.4.2.0.1/tools/examples/checkvariables.ps1 | checkvariables.ps1 | Properties {
$x = 1
$y = 2
}
FormatTaskName "[{0}]"
Task default -Depends Verify
Task Verify -Description "This task verifies psake's variables" {
Assert (Test-Path 'variable:\psake') "psake variable was not exported from module"
Assert ($psake.ContainsKey("version")) "psake variable does n... |
PowerShellCorpus/Github/woliver13_Woliver13.CmdLine/src/packages/psake.4.2.0.1/tools/examples/msbuild40.ps1 | msbuild40.ps1 | Framework "4.0"
# Framework "4.0x64"
task default -depends ShowMsBuildVersion
task ShowMsBuildVersion {
msbuild /version
} |
PowerShellCorpus/Github/woliver13_Woliver13.CmdLine/src/packages/psake.4.2.0.1/tools/examples/tasksetupandteardown.ps1 | tasksetupandteardown.ps1 | TaskSetup {
"Executing task setup"
}
TaskTearDown {
"Executing task tear down"
}
Task default -depends TaskB
Task TaskA {
"TaskA executed"
}
Task TaskB -depends TaskA {
"TaskB executed"
}
|
PowerShellCorpus/Github/woliver13_Woliver13.CmdLine/src/packages/psake.4.2.0.1/tools/examples/default.ps1 | default.ps1 | properties {
$testMessage = 'Executed Test!'
$compileMessage = 'Executed Compile!'
$cleanMessage = 'Executed Clean!'
}
task default -depends Test
task Test -depends Compile, Clean {
$testMessage
}
task Compile -depends Clean {
$compileMessage
}
task Clean {
$cleanMessage
}
task ?... |
PowerShellCorpus/Github/woliver13_Woliver13.CmdLine/src/packages/psake.4.2.0.1/tools/examples/requiredvariables.ps1 | requiredvariables.ps1 | properties {
$x = $null
$y = $null
$z = $null
}
task default -depends TestRequiredVariables
# you can put arguments to task in multiple lines using `
task TestRequiredVariables `
-description "This task shows how to make a variable required to run task. Run this script with -properties @{x = 1; y = ... |
PowerShellCorpus/Github/woliver13_Woliver13.CmdLine/src/packages/psake.4.2.0.1/tools/examples/formattaskname_string.ps1 | formattaskname_string.ps1 | properties {
$testMessage = 'Executed Test!'
$compileMessage = 'Executed Compile!'
$cleanMessage = 'Executed Clean!'
}
task default -depends Test
formatTaskName "-------{0}-------"
task Test -depends Compile, Clean {
$testMessage
}
task Compile -depends Clean {
$compileMessage
}
task ... |
PowerShellCorpus/Github/woliver13_Woliver13.CmdLine/src/packages/psake.4.2.0.1/tools/examples/nested.ps1 | nested.ps1 | Properties {
$x = 1
}
Task default -Depends RunNested1, RunNested2, CheckX
Task RunNested1 {
Invoke-psake .\nested\nested1.ps1
}
Task RunNested2 {
Invoke-psake .\nested\nested2.ps1
}
Task CheckX{
Assert ($x -eq 1) '$x was not 1'
} |
PowerShellCorpus/Github/woliver13_Woliver13.CmdLine/src/packages/psake.4.2.0.1/tools/examples/nested/nested2.ps1 | nested2.ps1 | Properties {
$x = 200
}
Task default -Depends Nested2CheckX
Task Nested2CheckX{
Assert ($x -eq 200) '$x was not 200'
} |
PowerShellCorpus/Github/woliver13_Woliver13.CmdLine/src/packages/psake.4.2.0.1/tools/examples/nested/nested1.ps1 | nested1.ps1 | Properties {
$x = 100
}
Task default -Depends Nested1CheckX
Task Nested1CheckX{
Assert ($x -eq 100) '$x was not 100'
} |
PowerShellCorpus/Github/woliver13_Woliver13.CmdLine/src/packages/psake.4.2.0.1/tools/examples/passingParametersString/parameters.ps1 | parameters.ps1 | properties {
$buildOutputPath = ".\bin\$buildConfiguration"
}
task default -depends DoRelease
task DoRelease {
Assert ("$buildConfiguration" -ne $null) "buildConfiguration should not have been null"
Assert ("$buildConfiguration" -eq 'Release') "buildConfiguration=[$buildConfiguration] should have been 'Rel... |
PowerShellCorpus/Github/openpublish_repowithsubmodules/.openpublishing.build.ps1 | .openpublishing.build.ps1 | param(
[string]$buildCorePowershellUrl = "https://opbuildstoragesandbox2.blob.core.windows.net/opps1container/.openpublishing.buildcore.ps1",
[string]$parameters
)
# Main
$errorActionPreference = 'Stop'
# Step-1 Download buildcore script to local
echo "download build core script to local with source ur... |
PowerShellCorpus/Github/SergeYurov_UniJournal/UniversityMagazine/packages/jQuery.1.10.2/Tools/uninstall.ps1 | uninstall.ps1 | param($installPath, $toolsPath, $package, $project)
. (Join-Path $toolsPath common.ps1)
# Determine the file paths
$projectIntelliSenseFilePath = Join-Path $projectScriptsFolderPath $intelliSenseFileName
$origIntelliSenseFilePath = Join-Path $toolsPath $intelliSenseFileName
if (Test-Path $projectIntelliSense... |
PowerShellCorpus/Github/SergeYurov_UniJournal/UniversityMagazine/packages/jQuery.1.10.2/Tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
. (Join-Path $toolsPath common.ps1)
# VS 11 and above supports the new intellisense JS files
$vsVersion = [System.Version]::Parse($dte.Version)
$supportsJsIntelliSenseFile = $vsVersion.Major -ge 11
if (-not $supportsJsIntelliSenseFile) {
$displayVersio... |
PowerShellCorpus/Github/SergeYurov_UniJournal/UniversityMagazine/packages/jQuery.1.10.2/Tools/common.ps1 | common.ps1 | function Get-Checksum($file) {
$cryptoProvider = New-Object "System.Security.Cryptography.MD5CryptoServiceProvider"
$fileInfo = Get-Item $file
trap { ;
continue } $stream = $fileInfo.OpenRead()
if ($? -eq $false) {
# Couldn't open file for reading
return $null
}
$bytes = $... |
PowerShellCorpus/Github/SergeYurov_UniJournal/UniversityMagazine/packages/Modernizr.2.6.2/Tools/uninstall.ps1 | uninstall.ps1 | param($installPath, $toolsPath, $package, $project)
. (Join-Path $toolsPath common.ps1)
# Update the _references.js file
Remove-Reference $scriptsFolderProjectItem $modernizrFileNameRegEx |
PowerShellCorpus/Github/SergeYurov_UniJournal/UniversityMagazine/packages/Modernizr.2.6.2/Tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
. (Join-Path $toolsPath common.ps1)
if ($scriptsFolderProjectItem -eq $null) {
# No Scripts folder
Write-Host "No Scripts folder found"
exit
}
# Update the _references.js file
AddOrUpdate-Reference $scriptsFolderProjectItem $modernizrFileName... |
PowerShellCorpus/Github/SergeYurov_UniJournal/UniversityMagazine/packages/Modernizr.2.6.2/Tools/common.ps1 | common.ps1 | function AddOrUpdate-Reference($scriptsFolderProjectItem, $fileNamePattern, $newFileName) {
try {
$referencesFileProjectItem = $scriptsFolderProjectItem.ProjectItems.Item("_references.js")
}
catch {
# _references.js file not found
return
}
if ($referencesFileProject... |
PowerShellCorpus/Github/SergeYurov_UniJournal/UniversityMagazine/packages/WebGrease.1.5.2/tools/uninstall.ps1 | uninstall.ps1 | param($installPath, $toolsPath, $package, $project)
# Visual Studio execution done via NuGet Package Manager
Function VSExecution($toolsPath, $project)
{
$project.DTE.ExecuteCommand("File.SaveAll", [system.string]::Empty)
# Get the msbuild version of the project and add the import
$msbuild = [Microsof... |
PowerShellCorpus/Github/SergeYurov_UniJournal/UniversityMagazine/packages/WebGrease.1.5.2/tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
# Return a relative path with reference to root as Uri object
# $rootPath - root path
# $relativePath - relative path
# $appendToRelativePath - Optional parameter. If provided will be appended to relative Path using Path.Combine()
Function GetRelativeUri($root... |
PowerShellCorpus/Github/SergeYurov_UniJournal/UniversityMagazine/packages/Microsoft.ApplicationInsights.WindowsServer.2.2.0/Tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
if ([System.IO.File]::Exists($project.FullName))
{
function MarkItemASCopyToOutput($item)
{
Try
{
#mark it to copy if newer
$item.Properties.Item("CopyToOutputDirectory").Value = 2
}
Catch
{
write-host $_.Exception.ToString()
}... |
PowerShellCorpus/Github/SergeYurov_UniJournal/UniversityMagazine/packages/EntityFramework.6.1.3/tools/init.ps1 | init.ps1 | param($installPath, $toolsPath, $package, $project)
if (Get-Module | ?{ $_.Name -eq 'EntityFramework' })
{
Remove-Module EntityFramework
}
Import-Module (Join-Path $toolsPath EntityFramework.psd1)
# SIG # Begin signature block
# MIIa4AYJKoZIhvcNAQcCoIIa0TCCGs0CAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB
# gjcCAQ... |
PowerShellCorpus/Github/SergeYurov_UniJournal/UniversityMagazine/packages/EntityFramework.6.1.3/tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
Initialize-EFConfiguration $project
Add-EFProvider $project 'System.Data.SqlClient' 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer'
Write-Host
Write-Host "Type 'get-help EntityFramework' to see all available Entity Framework comma... |
PowerShellCorpus/Github/SergeYurov_UniJournal/UniversityMagazine/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0/tools/init.ps1 | init.ps1 | param($installPath, $toolsPath, $package, $project)
$compilerPackageName = 'Microsoft.Net.Compilers'
$roslynSubFolder = 'roslyn'
if ($project -eq $null) {
$project = Get-Project
}
$libDirectory = Join-Path $installPath 'lib\net45'
$packageDirectory = Split-Path $installPath
$compilerPackage = Get-Chil... |
PowerShellCorpus/Github/SergeYurov_UniJournal/UniversityMagazine/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0/tools/uninstall.ps1 | uninstall.ps1 | param($installPath, $toolsPath, $package, $project)
$roslynSubFolder = 'roslyn'
if ($project -eq $null) {
$project = Get-Project
}
$projectRoot = $project.Properties.Item('FullPath').Value
$binDirectory = Join-Path $projectRoot 'bin'
$targetDirectory = Join-Path $binDirectory $roslynSubFolder
if (Te... |
PowerShellCorpus/Github/SergeYurov_UniJournal/UniversityMagazine/packages/Newtonsoft.Json.6.0.4/tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
# open json.net splash page on package install
# don't open if json.net is installed as a dependency
try
{
$url = "http://james.newtonking.com/json"
$dte2 = Get-Interface $dte ([EnvDTE80.DTE2])
if ($dte2.ActiveWindow.Caption -eq "Package Manager Con... |
PowerShellCorpus/Github/SergeYurov_UniJournal/packages/jQuery.1.10.2/Tools/uninstall.ps1 | uninstall.ps1 | param($installPath, $toolsPath, $package, $project)
. (Join-Path $toolsPath common.ps1)
# Determine the file paths
$projectIntelliSenseFilePath = Join-Path $projectScriptsFolderPath $intelliSenseFileName
$origIntelliSenseFilePath = Join-Path $toolsPath $intelliSenseFileName
if (Test-Path $projectIntelliSense... |
PowerShellCorpus/Github/SergeYurov_UniJournal/packages/jQuery.1.10.2/Tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
. (Join-Path $toolsPath common.ps1)
# VS 11 and above supports the new intellisense JS files
$vsVersion = [System.Version]::Parse($dte.Version)
$supportsJsIntelliSenseFile = $vsVersion.Major -ge 11
if (-not $supportsJsIntelliSenseFile) {
$displayVersio... |
PowerShellCorpus/Github/SergeYurov_UniJournal/packages/jQuery.1.10.2/Tools/common.ps1 | common.ps1 | function Get-Checksum($file) {
$cryptoProvider = New-Object "System.Security.Cryptography.MD5CryptoServiceProvider"
$fileInfo = Get-Item $file
trap { ;
continue } $stream = $fileInfo.OpenRead()
if ($? -eq $false) {
# Couldn't open file for reading
return $null
}
$bytes = $... |
PowerShellCorpus/Github/SergeYurov_UniJournal/packages/Modernizr.2.6.2/Tools/uninstall.ps1 | uninstall.ps1 | param($installPath, $toolsPath, $package, $project)
. (Join-Path $toolsPath common.ps1)
# Update the _references.js file
Remove-Reference $scriptsFolderProjectItem $modernizrFileNameRegEx |
PowerShellCorpus/Github/SergeYurov_UniJournal/packages/Modernizr.2.6.2/Tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
. (Join-Path $toolsPath common.ps1)
if ($scriptsFolderProjectItem -eq $null) {
# No Scripts folder
Write-Host "No Scripts folder found"
exit
}
# Update the _references.js file
AddOrUpdate-Reference $scriptsFolderProjectItem $modernizrFileName... |
PowerShellCorpus/Github/SergeYurov_UniJournal/packages/Modernizr.2.6.2/Tools/common.ps1 | common.ps1 | function AddOrUpdate-Reference($scriptsFolderProjectItem, $fileNamePattern, $newFileName) {
try {
$referencesFileProjectItem = $scriptsFolderProjectItem.ProjectItems.Item("_references.js")
}
catch {
# _references.js file not found
return
}
if ($referencesFileProject... |
PowerShellCorpus/Github/SergeYurov_UniJournal/packages/Microsoft.ApplicationInsights.WindowsServer.2.2.0/Tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
if ([System.IO.File]::Exists($project.FullName))
{
function MarkItemASCopyToOutput($item)
{
Try
{
#mark it to copy if newer
$item.Properties.Item("CopyToOutputDirectory").Value = 2
}
Catch
{
write-host $_.Exception.ToString()
}... |
PowerShellCorpus/Github/SergeYurov_UniJournal/packages/EntityFramework.6.1.3/tools/init.ps1 | init.ps1 | param($installPath, $toolsPath, $package, $project)
if (Get-Module | ?{ $_.Name -eq 'EntityFramework' })
{
Remove-Module EntityFramework
}
Import-Module (Join-Path $toolsPath EntityFramework.psd1)
# SIG # Begin signature block
# MIIa4AYJKoZIhvcNAQcCoIIa0TCCGs0CAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB
# gjcCAQ... |
PowerShellCorpus/Github/SergeYurov_UniJournal/packages/EntityFramework.6.1.3/tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
Initialize-EFConfiguration $project
Add-EFProvider $project 'System.Data.SqlClient' 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer'
Write-Host
Write-Host "Type 'get-help EntityFramework' to see all available Entity Framework comma... |
PowerShellCorpus/Github/SergeYurov_UniJournal/packages/Microsoft.Web.Infrastructure.1.0.0.0/tools/Install.ps1 | Install.ps1 | param($installPath, $toolsPath, $package, $project)
if ($project.Type -eq 'Web Site') {
Import-Module (Join-Path $toolsPath VS.psd1)
$srcFiles = Join-Path $installPath "lib\net40\*.dll"
$projectRoot = Get-ProjectRoot $project
if (!$projectRoot) {
return;
}
$destDirec... |
PowerShellCorpus/Github/SergeYurov_UniJournal/packages/Microsoft.Web.Infrastructure.1.0.0.0/tools/Uninstall.ps1 | Uninstall.ps1 | param($installPath, $toolsPath, $package, $project)
if ($project.Type -eq 'Web Site') {
Import-Module (Join-Path $toolsPath VS.psd1)
$projectRoot = Get-ProjectRoot $project
if (!$projectRoot) {
return;
}
$binDirectory = Join-Path $projectRoot "bin"
$srcDirectory = Join-Path $... |
PowerShellCorpus/Github/SergeYurov_UniJournal/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0/tools/init.ps1 | init.ps1 | param($installPath, $toolsPath, $package, $project)
$compilerPackageName = 'Microsoft.Net.Compilers'
$roslynSubFolder = 'roslyn'
if ($project -eq $null) {
$project = Get-Project
}
$libDirectory = Join-Path $installPath 'lib\net45'
$packageDirectory = Split-Path $installPath
$compilerPackage = Get-Chil... |
PowerShellCorpus/Github/SergeYurov_UniJournal/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0/tools/uninstall.ps1 | uninstall.ps1 | param($installPath, $toolsPath, $package, $project)
$roslynSubFolder = 'roslyn'
if ($project -eq $null) {
$project = Get-Project
}
$projectRoot = $project.Properties.Item('FullPath').Value
$binDirectory = Join-Path $projectRoot 'bin'
$targetDirectory = Join-Path $binDirectory $roslynSubFolder
if (Te... |
PowerShellCorpus/Github/SergeYurov_UniJournal/packages/Newtonsoft.Json.6.0.4/tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
# open json.net splash page on package install
# don't open if json.net is installed as a dependency
try
{
$url = "http://james.newtonking.com/json"
$dte2 = Get-Interface $dte ([EnvDTE80.DTE2])
if ($dte2.ActiveWindow.Caption -eq "Package Manager Con... |
PowerShellCorpus/Github/nathan-rogers_mywebsiteV2/NathanWebsiteV2/packages/jQuery.1.10.2/Tools/uninstall.ps1 | uninstall.ps1 | param($installPath, $toolsPath, $package, $project)
. (Join-Path $toolsPath common.ps1)
# Determine the file paths
$projectIntelliSenseFilePath = Join-Path $projectScriptsFolderPath $intelliSenseFileName
$origIntelliSenseFilePath = Join-Path $toolsPath $intelliSenseFileName
if (Test-Path $projectIntelliSense... |
PowerShellCorpus/Github/nathan-rogers_mywebsiteV2/NathanWebsiteV2/packages/jQuery.1.10.2/Tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
. (Join-Path $toolsPath common.ps1)
# VS 11 and above supports the new intellisense JS files
$vsVersion = [System.Version]::Parse($dte.Version)
$supportsJsIntelliSenseFile = $vsVersion.Major -ge 11
if (-not $supportsJsIntelliSenseFile) {
$displayVersio... |
PowerShellCorpus/Github/nathan-rogers_mywebsiteV2/NathanWebsiteV2/packages/jQuery.1.10.2/Tools/common.ps1 | common.ps1 | function Get-Checksum($file) {
$cryptoProvider = New-Object "System.Security.Cryptography.MD5CryptoServiceProvider"
$fileInfo = Get-Item $file
trap { ;
continue } $stream = $fileInfo.OpenRead()
if ($? -eq $false) {
# Couldn't open file for reading
return $null
}
$bytes = $... |
PowerShellCorpus/Github/nathan-rogers_mywebsiteV2/NathanWebsiteV2/packages/Modernizr.2.6.2/Tools/uninstall.ps1 | uninstall.ps1 | param($installPath, $toolsPath, $package, $project)
. (Join-Path $toolsPath common.ps1)
# Update the _references.js file
Remove-Reference $scriptsFolderProjectItem $modernizrFileNameRegEx |
PowerShellCorpus/Github/nathan-rogers_mywebsiteV2/NathanWebsiteV2/packages/Modernizr.2.6.2/Tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
. (Join-Path $toolsPath common.ps1)
if ($scriptsFolderProjectItem -eq $null) {
# No Scripts folder
Write-Host "No Scripts folder found"
exit
}
# Update the _references.js file
AddOrUpdate-Reference $scriptsFolderProjectItem $modernizrFileName... |
PowerShellCorpus/Github/nathan-rogers_mywebsiteV2/NathanWebsiteV2/packages/Modernizr.2.6.2/Tools/common.ps1 | common.ps1 | function AddOrUpdate-Reference($scriptsFolderProjectItem, $fileNamePattern, $newFileName) {
try {
$referencesFileProjectItem = $scriptsFolderProjectItem.ProjectItems.Item("_references.js")
}
catch {
# _references.js file not found
return
}
if ($referencesFileProject... |
PowerShellCorpus/Github/nathan-rogers_mywebsiteV2/NathanWebsiteV2/packages/EntityFramework.6.1.1/tools/init.ps1 | init.ps1 | param($installPath, $toolsPath, $package, $project)
if (Get-Module | ?{ $_.Name -eq 'EntityFramework' })
{
Remove-Module EntityFramework
}
Import-Module (Join-Path $toolsPath EntityFramework.psd1)
# SIG # Begin signature block
# MIIa4AYJKoZIhvcNAQcCoIIa0TCCGs0CAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB
# gjcCAQ... |
PowerShellCorpus/Github/nathan-rogers_mywebsiteV2/NathanWebsiteV2/packages/EntityFramework.6.1.1/tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
Initialize-EFConfiguration $project
Add-EFProvider $project 'System.Data.SqlClient' 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer'
Write-Host
Write-Host "Type 'get-help EntityFramework' to see all available Entity Framework comma... |
PowerShellCorpus/Github/nathan-rogers_mywebsiteV2/NathanWebsiteV2/packages/Newtonsoft.Json.6.0.4/tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
# open json.net splash page on package install
# don't open if json.net is installed as a dependency
try
{
$url = "http://james.newtonking.com/json"
$dte2 = Get-Interface $dte ([EnvDTE80.DTE2])
if ($dte2.ActiveWindow.Caption -eq "Package Manager Con... |
PowerShellCorpus/Github/francoeder_poc-dynamic-columns/POC.DynamicColumns/packages/jQuery.1.10.2/Tools/uninstall.ps1 | uninstall.ps1 | param($installPath, $toolsPath, $package, $project)
. (Join-Path $toolsPath common.ps1)
# Determine the file paths
$projectIntelliSenseFilePath = Join-Path $projectScriptsFolderPath $intelliSenseFileName
$origIntelliSenseFilePath = Join-Path $toolsPath $intelliSenseFileName
if (Test-Path $projectIntelliSense... |
PowerShellCorpus/Github/francoeder_poc-dynamic-columns/POC.DynamicColumns/packages/jQuery.1.10.2/Tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
. (Join-Path $toolsPath common.ps1)
# VS 11 and above supports the new intellisense JS files
$vsVersion = [System.Version]::Parse($dte.Version)
$supportsJsIntelliSenseFile = $vsVersion.Major -ge 11
if (-not $supportsJsIntelliSenseFile) {
$displayVersio... |
PowerShellCorpus/Github/francoeder_poc-dynamic-columns/POC.DynamicColumns/packages/jQuery.1.10.2/Tools/common.ps1 | common.ps1 | function Get-Checksum($file) {
$cryptoProvider = New-Object "System.Security.Cryptography.MD5CryptoServiceProvider"
$fileInfo = Get-Item $file
trap { ;
continue } $stream = $fileInfo.OpenRead()
if ($? -eq $false) {
# Couldn't open file for reading
return $null
}
$bytes = $... |
PowerShellCorpus/Github/francoeder_poc-dynamic-columns/POC.DynamicColumns/packages/Modernizr.2.6.2/Tools/uninstall.ps1 | uninstall.ps1 | param($installPath, $toolsPath, $package, $project)
. (Join-Path $toolsPath common.ps1)
# Update the _references.js file
Remove-Reference $scriptsFolderProjectItem $modernizrFileNameRegEx |
PowerShellCorpus/Github/francoeder_poc-dynamic-columns/POC.DynamicColumns/packages/Modernizr.2.6.2/Tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
. (Join-Path $toolsPath common.ps1)
if ($scriptsFolderProjectItem -eq $null) {
# No Scripts folder
Write-Host "No Scripts folder found"
exit
}
# Update the _references.js file
AddOrUpdate-Reference $scriptsFolderProjectItem $modernizrFileName... |
PowerShellCorpus/Github/francoeder_poc-dynamic-columns/POC.DynamicColumns/packages/Modernizr.2.6.2/Tools/common.ps1 | common.ps1 | function AddOrUpdate-Reference($scriptsFolderProjectItem, $fileNamePattern, $newFileName) {
try {
$referencesFileProjectItem = $scriptsFolderProjectItem.ProjectItems.Item("_references.js")
}
catch {
# _references.js file not found
return
}
if ($referencesFileProject... |
PowerShellCorpus/Github/francoeder_poc-dynamic-columns/POC.DynamicColumns/packages/Microsoft.ApplicationInsights.WindowsServer.2.2.0/Tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
if ([System.IO.File]::Exists($project.FullName))
{
function MarkItemASCopyToOutput($item)
{
Try
{
#mark it to copy if newer
$item.Properties.Item("CopyToOutputDirectory").Value = 2
}
Catch
{
write-host $_.Exception.ToString()
}... |
PowerShellCorpus/Github/francoeder_poc-dynamic-columns/POC.DynamicColumns/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0/tools/init.ps1 | init.ps1 | param($installPath, $toolsPath, $package, $project)
$compilerPackageName = 'Microsoft.Net.Compilers'
$roslynSubFolder = 'roslyn'
if ($project -eq $null) {
$project = Get-Project
}
$libDirectory = Join-Path $installPath 'lib\net45'
$packageDirectory = Split-Path $installPath
$compilerPackage = Get-Chil... |
PowerShellCorpus/Github/francoeder_poc-dynamic-columns/POC.DynamicColumns/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0/tools/uninstall.ps1 | uninstall.ps1 | param($installPath, $toolsPath, $package, $project)
$roslynSubFolder = 'roslyn'
if ($project -eq $null) {
$project = Get-Project
}
$projectRoot = $project.Properties.Item('FullPath').Value
$binDirectory = Join-Path $projectRoot 'bin'
$targetDirectory = Join-Path $binDirectory $roslynSubFolder
if (Te... |
PowerShellCorpus/Github/francoeder_poc-dynamic-columns/POC.DynamicColumns/packages/Newtonsoft.Json.6.0.4/tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
# open json.net splash page on package install
# don't open if json.net is installed as a dependency
try
{
$url = "http://james.newtonking.com/json"
$dte2 = Get-Interface $dte ([EnvDTE80.DTE2])
if ($dte2.ActiveWindow.Caption -eq "Package Manager Con... |
PowerShellCorpus/Github/Shiwei1981_SQLAlwaysOnInAzureVM/SQLAlwaysOnInAzureVM/SQLAlwaysOnInAzureVM/Scripts/Deploy-AzureResourceGroup.ps1 | Deploy-AzureResourceGroup.ps1 | #Requires -Version 3.0
#Requires -Module AzureRM.Resources
#Requires -Module Azure.Storage
Param(
[string] [Parameter(Mandatory=$true)] $ResourceGroupLocation,
[string] $ResourceGroupName = 'SQLAlwaysOnInAzureVM',
[switch] $UploadArtifacts,
[string] $StorageAccountName,
[string] $StorageAc... |
PowerShellCorpus/Github/OPSTest_E2E_Provision_1484733004091/.openpublishing.build.ps1 | .openpublishing.build.ps1 | param(
[string]$buildCorePowershellUrl = "https://opbuildstoragesandbox2.blob.core.windows.net/opps1container/.openpublishing.buildcore.ps1",
[string]$parameters
)
# Main
$errorActionPreference = 'Stop'
# Step-1: Download buildcore script to local
echo "download build core script to local with source u... |
PowerShellCorpus/Github/Pawel1985_psscripts/download-dell-bios.ps1 | download-dell-bios.ps1 | #rev2
#Root folder for BIOS
$DellBiosRoot = 'C:\DELL_BIOS\'
#Define models
$models = ('Latitude E4310', 'Latitude E5410', 'Latitude E5420', 'Latitude E5430', 'Latitude E5540', 'Latitude E5450', 'Latitude E5470','Latitude E5540', 'Latitude E6320', 'Latitude E6330', 'Latitude E6440', 'Latitude E7240','Latitude E72... |
PowerShellCorpus/Github/Pawel1985_psscripts/download-dell-bios - Copy.ps1 | download-dell-bios - Copy.ps1 | #rev2
#Root folder for BIOS
$DellBiosRoot = 'C:\DELL_BIOS\'
#Define models
$models = ('Latitude E4310', 'Latitude E5410', 'Latitude E5420', 'Latitude E5430', 'Latitude E5540', 'Latitude E5450', 'Latitude E5470','Latitude E5540', 'Latitude E6320', 'Latitude E6330', 'Latitude E6440', 'Latitude E7240','Latitude E72... |
PowerShellCorpus/Github/Wazzouille_apiMobile/WebAPI/packages/EntityFramework.6.1.3/tools/init.ps1 | init.ps1 | param($installPath, $toolsPath, $package, $project)
if (Get-Module | ?{ $_.Name -eq 'EntityFramework' })
{
Remove-Module EntityFramework
}
Import-Module (Join-Path $toolsPath EntityFramework.psd1)
# SIG # Begin signature block
# MIIa4AYJKoZIhvcNAQcCoIIa0TCCGs0CAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB
# gjcCAQ... |
PowerShellCorpus/Github/Wazzouille_apiMobile/WebAPI/packages/EntityFramework.6.1.3/tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
Initialize-EFConfiguration $project
Add-EFProvider $project 'System.Data.SqlClient' 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer'
Write-Host
Write-Host "Type 'get-help EntityFramework' to see all available Entity Framework comma... |
PowerShellCorpus/Github/Wazzouille_apiMobile/WebAPI/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0/tools/init.ps1 | init.ps1 | param($installPath, $toolsPath, $package, $project)
$compilerPackageName = 'Microsoft.Net.Compilers'
$roslynSubFolder = 'roslyn'
if ($project -eq $null) {
$project = Get-Project
}
$libDirectory = Join-Path $installPath 'lib\net45'
$packageDirectory = Split-Path $installPath
$compilerPackage = Get-Chil... |
PowerShellCorpus/Github/Wazzouille_apiMobile/WebAPI/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0/tools/uninstall.ps1 | uninstall.ps1 | param($installPath, $toolsPath, $package, $project)
$roslynSubFolder = 'roslyn'
if ($project -eq $null) {
$project = Get-Project
}
$projectRoot = $project.Properties.Item('FullPath').Value
$binDirectory = Join-Path $projectRoot 'bin'
$targetDirectory = Join-Path $binDirectory $roslynSubFolder
if (Te... |
PowerShellCorpus/Github/Wazzouille_apiMobile/WebAPI/packages/Newtonsoft.Json.6.0.4/tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
# open json.net splash page on package install
# don't open if json.net is installed as a dependency
try
{
$url = "http://james.newtonking.com/json"
$dte2 = Get-Interface $dte ([EnvDTE80.DTE2])
if ($dte2.ActiveWindow.Caption -eq "Package Manager Con... |
PowerShellCorpus/Github/Amandeep-saggu_Comp2084-finalExaminatoin/FinalExam/packages/Microsoft.AspNet.Providers.LocalDB.1.1/tools/Install.ps1 | Install.ps1 | param($installPath, $toolsPath, $package, $project)
try {
# Set up variables
$timestamp = (Get-Date).ToString('yyyyMMddHHmmss')
$projectName = [IO.Path]::GetFileName($project.ProjectName.Trim([IO.PATH]::DirectorySeparatorChar, [IO.PATH]::AltDirectorySeparatorChar))
$catalogName = "aspnet-$project... |
PowerShellCorpus/Github/Amandeep-saggu_Comp2084-finalExaminatoin/FinalExam/packages/EntityFramework.5.0.0/tools/init.ps1 | init.ps1 | param($installPath, $toolsPath, $package, $project)
$importedModule = Get-Module | ?{ $_.Name -eq 'EntityFramework' }
if ($PSVersionTable.PSVersion -ge (New-Object Version @( 3, 0 )))
{
$thisModuleManifest = 'EntityFramework.PS3.psd1'
}
else
{
$thisModuleManifest = 'EntityFramework.psd1'
}
$thisModule... |
PowerShellCorpus/Github/Amandeep-saggu_Comp2084-finalExaminatoin/FinalExam/packages/EntityFramework.5.0.0/tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
function Invoke-ConnectionFactoryConfigurator($assemblyPath, $project)
{
$appDomain = [AppDomain]::CreateDomain(
'EntityFramework.PowerShell',
$null,
(New-Object System.AppDomainSetup -Property @{ ShadowCopyFiles = 'true' }))
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.