I hereby claim:
- I am mill5james on github.
- I am mill5james (https://keybase.io/mill5james) on keybase.
- I have a public key ASAIbjrF5f9oDiwd6EVCaLdLJyAZ499y-LqQvxMoqQwDxAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
import com.deliveredtechnologies.rulebook.Fact; | |
import com.deliveredtechnologies.rulebook.FactMap; | |
import com.deliveredtechnologies.rulebook.NameValueReferableMap; | |
import com.deliveredtechnologies.rulebook.model.runner.RuleBookRunner; | |
public class App { | |
public static void main(String[] args) { | |
RuleBookRunner rules = new RuleBookRunner("rules"); | |
NameValueReferableMap<String> facts = new FactMap<>(); | |
facts.put("key", new Fact<>("value")); |
function VsDev { | |
pushd "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools" | |
cmd /c "VsDevCmd.bat&set" | | |
foreach { | |
if ($_ -match "=") { | |
$v = $_.split("="); set-item -force -path "ENV:\$($v[0])" -value "$($v[1])" | |
} | |
} | |
popd | |
Write-Host "`nVisual Studio 2017 Command Prompt variables set." -ForegroundColor Yellow |
function Retry-Command | |
{ | |
param ( | |
[Parameter(Mandatory=$true)][string]$command, | |
[Parameter(Mandatory=$true)][hashtable]$args, | |
[Parameter(Mandatory=$false)][int]$retries = 5, | |
[Parameter(Mandatory=$false)][int]$secondsDelay = 2 | |
) | |
# Setting ErrorAction to Stop is important. This ensures any errors that occur in the command are |
function Clean-DockerImages { | |
docker images -q | % { docker rmi -f $_ } | |
} | |
function Stop-DockerContainers { | |
docker ps -a -q | % { docker rm -f $_ } | |
} |
function Tfs-GetAll { tf vc get /force /noprompt /recursive } | |
function Tfs-CleanAll { | |
param ( | |
[switch]$NoPrompt = $false | |
) | |
$optional = '' | |
if ($NoPrompt) { $optional += '/noprompt '} | |
Move-Item -Path ./.vscode ./.vscode-hold | |
tf vc reconcile /clean /recursive /exclude:.store,.vs,.vscode-hold,*.vspscc $optional |
function Init-AzSphere { | |
pushd "C:\Program Files (x86)\Microsoft Azure Sphere SDK" | |
cmd /c "InitializeCommandPrompt.cmd&set" | | |
foreach { | |
if ($_ -match "=") { | |
$v = $_.split("="); set-item -force -path "ENV:\$($v[0])" -value "$($v[1])" | |
} | |
} | |
popd | |
Write-Host "`nDeveloper Command Prompt for Azure Sphere tools set." -ForegroundColor Yellow |
<# | |
.SYNOPSIS | |
Configures remote machine debugging for Visual Studio Code and Visual Studio 2017+. | |
.DESCRIPTION | |
Will ensure that all the required software is available or it will install the prerequisites, creates any necessary SSH keys and files on the local and remote machine, validates the connection to the remote host, and finally configures remote debugging for IoT Edge modules. | |
.PARAMETER RemoteHost | |
The DNS name or IP address of the remote host. If not suppllied, the script will prompt the user. |
function Repeat-Command | |
{ | |
param ( | |
[Parameter(Mandatory=$true)][scriptblock]$Command, | |
[Parameter(Mandatory=$false)][int]$Delay = 1 | |
) | |
$Title = $host.ui.RawUI.WindowTitle; | |
try { | |
$host.ui.RawUI.WindowTitle = $Command |
{{/* | |
Convert YAML to envirment variables for .NET Core hosting environment naming | |
*/}} | |
{{- define "translateEnv" -}} | |
{{- range $key, $value := . }} | |
{{- if or (kindIs "map" $value) (kindIs "slice" $value) }} | |
{{- include "prefixItem" (dict $key $value) }} | |
{{- else }} | |
- name: {{ $key }} | |
value: {{ $value | squote }} |