This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Prompt(){ | |
$W = Split-Path -leaf -path (Get-Location) | |
$prompt = Write-Prompt "$($env:UserName)@$($env:ComputerName):" -ForegroundColor Green | |
$prompt += Write-Prompt $W -ForegroundColor DarkCyan | |
$prompt += Write-Prompt '>' | |
return ' ' | |
} | |
function Remove-StoppedContainers { | |
docker container rm $(docker container ls -q) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
choco install -y visualstudio2017enterprise | |
choco install -y intellijidea-ultimate | |
choco install -y dotnetcore-sdk | |
choco install -y jdk8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.3' | |
services: | |
web: | |
image: microsoft/iis:nanoserver | |
networks: | |
- app-net | |
ports: | |
- mode: host |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$serverName = 'my.server.region.cloudapp.azure.com' | |
$externalIP = '1.2.3.4' | |
$internalIP = '10.0.0.4' | |
mkdir -p C:\certs\vm\client | |
docker run --rm ` | |
-e SERVER_NAME= $serverName ` | |
-e IP_ADDRESSES=127.0.0.1,$externalIP,$internalIP ` | |
-v 'C:\ProgramData\docker:C:\ProgramData\docker' ` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ip = '127.0.0.1' | |
docker swarm init --listen-addr $ip --advertise-addr $ip | |
docker network create --driver overlay test | |
docker service create ` | |
--network test ` | |
--endpoint-mode dnsrr ` | |
--publish mode=host,target=80,published=80 ` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#docker rm $(docker ps -a -q) | |
function Remove-StoppedContainers { | |
foreach ($id in & docker ps -a -q) { | |
& docker rm $id } | |
} | |
#docker rmi $(docker images -f "dangling=true" -q) | |
function Remove-DanglingImages { | |
foreach ($id in & docker images -q -f 'dangling=true') { | |
& docker rmi $id } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Upgrades an existing Docker installation on Windows Server 2016 | |
# Assumes you have Docker already installed by following the steps in https://blog.sixeyed.com/1-2-3-iis-running-in-nano-server-in-docker-on-windows-server-2016/ | |
Stop-Service docker | |
dockerd.exe --unregister-service | |
Invoke-WebRequest "https://download.docker.com/components/engine/windows-server/cs-1.12/docker.zip" -OutFile "$env:TEMP\docker.zip" -UseBasicParsing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.SCP; | |
using Newtonsoft.Json; | |
using System; | |
using System.Collections.Generic; | |
namespace My.Storm.App.Tests | |
{ | |
/// <summary> | |
/// Simple stub for emitting Event Hub-style tuples to Storm context. | |
/// </summary> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TopologyBuilder topologyBuilder = new TopologyBuilder("MyEventProcessorRealTimeStorm"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<UsingTask TaskName="ExecAsync" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll" > | |
<ParameterGroup> | |
<exePath ParameterType="System.String" Required="true" /> | |
<arguments ParameterType="System.String" Required="true" /> | |
<waitMilliseconds ParameterType="System.Int32" Required="true" /> | |
</ParameterGroup> | |
<Task> | |
<Using Namespace="System.Diagnostics"/> | |
<Using Namespace="System.Threading"/> |