This file contains 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
$resourceGroup = "rg-demo" | |
$location = "westus" | |
$vmName = "myVM" | |
$cred= Get-Credential -Message "Enter your vm username and passwords" | |
tester | |
Secure$@P1234 | |
New-AzureRmResourceGroup -Name $resourceGroup -Location $location |
This file contains 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
$resourceGroup = "rg-demo" | |
$location = "westus" | |
$vmName = "myVM" | |
$cred= Get-Credential -Message "Enter your vm username and passwords" | |
tester | |
Secure$@P1234 | |
New-AzureRmResourceGroup -Name $resourceGroup -Location $location |
This file contains 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
# run the following step - if its for the first time. | |
brew tap caskroom/cask | |
brew cask install powershell | |
# then install the azure core module (the same as linux) | |
pwsh | |
> Install-Module AzureRM.Netcore | |
> Import-Module AzureRM.Netcore |
This file contains 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
# In order to run this, we need to open up NSG to WinRM (9586) and makesure the windows firewall (internally) is also open) | |
$dnsname = $env:COMPUTERNAME | |
Enable-PSRemoting -Force | |
New-NetFirewallRule -Name "WinRM HTTPS" -Enabled True -Action Allow -Direction Inbound -LocalPort 5986 -Protocol "TCP" | |
$thumbprint = (New-SelfSignedCertificate -DnsName $dnsname -CertStoreLocation Cert:\LocalMachine\My).Thumbprint |
This file contains 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
## TF and Workspace | |
``` | |
terraformer COMMAND -repo GitURL -env BRANCH-NAME [-tag GitTAG | -revision GitRev] | |
``` | |
Note: State is stored remotely | |
``` | |
git clone GitURL # if branch or tag specified it should get them as well | |
``` | |
checks the S3 bucket if {env}-{tag | revision} exist ? |
This file contains 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
How to Iterate and find the keys and values inside: System.Collection.Hashtable | |
# System.Collections.Hashtable | |
# Accessing Keys and Values using Enumerator | |
(Get-AzureKeyVaultSecret -VaultName $KeyVaultName | Where 'ContentType' -eq 'Wrapped BEK').Tags | foreach { | |
foreach ($tag in $_.GetEnumerator()) | |
{ | |
if ($tag.Key -eq 'MachineName' -and $tag.Value -eq $VMName) { | |
Write-Host "$($tag.Key) = $($tag.Value)" |
This file contains 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
# Browser | |
Google Chrome | |
# Plugins | |
## MetaMask | |
https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn | |
# Terminal | |
https://iterm2.com/downloads/stable/iTerm2-3_1_6.zip |
This file contains 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
pragma solidity ^0.4.15; | |
contract Greeter { | |
address owner; | |
string greeting; | |
/* | |
function Greeter (string _greeting) public { |
This file contains 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
pragma solidity ^0.4.24; | |
contract Incrementer { | |
address creator; | |
uint iteration; | |
function Incrementer() public | |
{ | |
creator = msg.sender; |
This file contains 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
pragma solidity ^0.4.24; | |
contract Incrementer { | |
address creator; | |
uint iteration; | |
function Incrementer() public | |
{ | |
creator = msg.sender; |