Define DynamicKeyword 'ExecTest'
Note: Don't copy&paste from following code. PowerShell SyntaxHighlighter remove some lines. Instead, use RAW view.
#Requires -Version 4.0
Set-StrictMode -Version Latest
# Print all project items | |
Recurse-Project -Action {param($item) "`"$($item.ProjectItem.Name)`" is a $($item.Type)" } | |
# Function to format all documents based on https://gist.github.com/984353 | |
function Format-Document { | |
param( | |
[parameter(ValueFromPipelineByPropertyName = $true)] | |
[string[]]$ProjectName | |
) | |
Process { |
$svninfo = @{} | |
svn help | | |
?{$_ -match "^ "} | | |
%{($_.trim() -split " ")[0]} | | |
%{ | |
$command = $_ | |
if(!$svninfo.ContainsKey($command)) { | |
$svninfo.$command=@{SingleHyphen=@();DoubleHyphen=@()} | |
} |
Kris Nuttycombe asks:
I genuinely wish I understood the appeal of unityped languages better. Can someone who really knows both well-typed and unityped explain?
I think the terms well-typed and unityped are a bit of question-begging here (you might as well say good-typed versus bad-typed), so instead I will say statically-typed and dynamically-typed.
I'm going to approach this article using Scala to stand-in for static typing and Python for dynamic typing. I feel like I am credibly proficient both languages: I don't currently write a lot of Python, but I still have affection for the language, and have probably written hundreds of thousands of lines of Python code over the years.
$AzureConn = Get-AutomationConnection -Name 'AssetConnectionName' | |
$Certificate = Get-AutomationCertificate -Name $AzureConn.AutomationCertificateName | |
Set-AzureSubscription -SubscriptionName 'AssetConnectionName' -SubscriptionId $AzureConn.SubscriptionID -Certificate $Certificate | |
Select-AzureSubscription -SubscriptionName 'AssetConnectionName' |
// LICENSE | |
// | |
// This software is dual-licensed to the public domain and under the following | |
// license: you are granted a perpetual, irrevocable license to copy, modify, | |
// publish, and distribute this file as you see fit. | |
using System; | |
using System.Collections.Generic; | |
public static class FuzzyMatcher |
function Show-Object{ | |
param( | |
## The object to examine | |
[Parameter(ValueFromPipeline = $true)] | |
$InputObject | |
) | |
#custom controls for treeview... found it on MSDN a while ago, lost link :-/ | |
[void][System.Reflection.Assembly]::LoadWithPartialName('presentationframework') |
#################################### BEGIN ############################################## | |
$Title = "My Doc" | |
$lab = { | |
########## Module | |
###### Task - Set an alias | |
#### Description | |
## Set an alias using Set-Alias and test it. | |
### Example: |
David Wilson - @daviwil Software Engineer, PowerShell Team
{ | |
"version": "0.1.0", | |
"tasks": [ | |
{ | |
"taskName": "build", | |
"command": "powershell", | |
"args": ["Merge-Script -Script '${file}' -Bundle -OutputPath '${fileDirname}\\out' -OutputType Executable"], | |
"isBuildCommand": true, | |
"showOutput": "silent" | |
} |