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
| """ | |
| Hello World Enterprise Edition - Python Implementation | |
| Source of inspiration: https://leo88.medium.com/hello-world-enterprise-edition-c3d1697b78a7 | |
| This module demonstrates enterprise-grade software architecture principles | |
| applied to the simple task of displaying "Hello, World!". | |
| Design Patterns Implemented: | |
| - Abstract Factory |
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
| /** | |
| * Source of inspiration: https://leo88.medium.com/hello-world-enterprise-edition-c3d1697b78a7 | |
| */ | |
| import java.util.*; | |
| /** | |
| * STEP 1: Abstraction for Messages | |
| * | |
| * This interface defines the contract for all message types in the system. |
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
| #!/bin/bash | |
| docker run -d --net=host --name iota-node -p 14265:14265 -p 14777:14777/udp -p 15777:15777 -v iota.ini:/iri/iota.ini iotaledger/iri:latest | |
| curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash - | |
| sudo apt-get install -y nodejs | |
| sudo npm i -g iota-pm |
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 should be 6.3* indicating Windows Server 2012 R2 | |
| If ([System.Environment]::OSVersion.Version.ToString() -like "6.3*") | |
| { | |
| # Windows Product Types. Script should only run on Server OS. | |
| # 1: Workstation | |
| # 2: Domain Controller | |
| # 3: Server | |
| If ((Get-WmiObject Win32_OperatingSystem -ErrorAction SilentlyContinue).ProductType -eq 3) | |
| { | |
| $Disks = Get-PhysicalDisk -CanPool $true -ErrorAction SilentlyContinue |
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
| <Objs Version="1.1.0.1" xmlns="http://schemas.microsoft.com/powershell/2004/04"> | |
| <Obj RefId="0"> | |
| <TN RefId="0"> | |
| <T>System.Collections.Specialized.OrderedDictionary</T> | |
| <T>System.Object</T> | |
| </TN> | |
| <DCT> | |
| <En> | |
| <S N="Key">siteName</S> | |
| <S N="Value">wa-test-cmn-beta1</S> |
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
| $galleryTemplate = Get-AzureResourceGroupGalleryTemplate -Identity $galleryTemplateId | |
| $galleryTemplateJson = Invoke-RestMethod -Uri $GalleryTemplate.DefinitionTemplatesText | |
| $siteLocation = "westeurope","eastus" | Out-GridView -PassThru -Title 'Location' | |
| $webAppSize = $galleryTemplateJson.parameters.sku.allowedValues | Out-GridView -PassThru -Title 'Web Application size' | |
| $dbSize = $galleryTemplateJson.parameters.databaseSku.allowedValues | Out-GridView -PassThru -Title 'Database size' | |
| $KeySalt = [guid]::NewGuid().Guid.Replace("-","") | |
| $TemplateParameterObject = [ordered]@{ | |
| siteName = $webAppName | |
| hostingPlanName = "{0}-HostingPlan" -f $webAppName |
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
| iex (Invoke-RestMethod -Uri https://api.github.com/gists/dfe515f4ef0b14e6be15).files.'Update-AzurePowershell.ps1'.content |
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
| # Get latest azure-powershell | |
| $AzureModule = Get-Module -Name Azure* -ListAvailable | |
| $LatestRelease = Invoke-RestMethod -Uri https://api.github.com/repos/Azure/azure-powershell/releases/latest -Method GET | |
| If (-not($AzureModule) -or $AzureModule.Version.ToString() -ne $LatestRelease.name) | |
| { | |
| $Asset = $LatestRelease.assets | Where-Object {$_.name -like "*.msi"} | |
| $OutFile = "{0}\{1}" -f $env:TEMP, $Asset.name | |
| Invoke-WebRequest -Uri $Asset.browser_download_url -OutFile $Outfile -Method Get | |
| Start-Process -FilePath msiexec.exe -ArgumentList @("/i $OutFile /qb") -Wait -PassThru | |
| } |
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
| Scriptblock { | |
| [appdomain]::CurrentDomain.GetAssemblies() | Format-Table ImageRuntimeVersion, FullName | |
| Get-Module -ListAvailable | Format-Table Name, Version | |
| } | |
| ImageRuntimeVersion FullName | |
| ------------------- -------- | |
| v4.0.30319 mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyTok... | |
| v4.0.30319 Orchestrator.Sandbox, Version=7.2.0.0, Culture=neutral, ... | |
| v4.0.30319 Orchestrator.Shared, Version=7.2.0.0, Culture=neutral, P... |
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
| $XmlData = @' | |
| <HostGroups> | |
| <HostGroup Name="All Hosts"> | |
| <HostGroup Name="Oslo"> | |
| <LogicalNetworkDefinitions> | |
| <LogicalNetworkDefinition name="LM Oslo"> | |
| <LogicalNetwork>Live Migration</LogicalNetwork> | |
| <Subnet>192.168.5.0/24</Subnet> | |
| <VlanID>5</VlanID> | |
| </LogicalNetwork> |
NewerOlder