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
| with open('./scheduled_builds.txt', 'r') as f: | |
| lines = f.readlines() | |
| print(lines) | |
| project_list = [] | |
| for line in lines: | |
| project_list.append(line) |
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
| # view module help from commandline | |
| pydoc [module] | |
| # within python | |
| # list module attirbutes | |
| >>> dir(module) | |
| # view module help from within python | |
| >>> help(module) |
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
| - name: remove DynamoDB table | |
| dynamodb_table: | |
| name: "{{ item }}" | |
| region: "{{ region }}" | |
| state: absent | |
| with_items: "{{ dynamodb_table_names }}" |
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
| # all images | |
| docker image ls | |
| # running containers | |
| docker container ls | |
| # all containers | |
| docker container ps -a | |
| # stop auto restart. |
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
| #Login / change team | |
| fly -t qa login -n main | |
| #Unpause pipelines | |
| fly -t qa unpause-pipeline -p matttestdb | |
| #View jobs | |
| fly -t qa jobs -p matttestdb | |
| #Watch jobs output |
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
| --- | |
| - hosts: localhost | |
| connection: local | |
| gather_facts: no | |
| vars: | |
| dynamodb_table_names: [] | |
| feature: "matttestdb" | |
| environment: "qa" | |
| tasks: | |
| - name: Set AWS region |
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
| # https://www.terraform.io/docs/providers/azurerm/r/virtual_machine.html | |
| resource "azurerm_resource_group" "main" { | |
| name = "${var.resource_group_name}" | |
| location = "${var.location}" | |
| tags = { | |
| environment = "${var.tagValue}" | |
| } | |
| } |
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
| New-Item -Path 'C:\assets' -ItemType Directory | |
| $text= @' | |
| This file was provisioned with the azure virtual machine extension resource using Terraform. | |
| https://docs.microsoft.com/en-us/azure/virtual-machines/extensions/custom-script-windows | |
| This is just a text file but a script similar to this could be run to register with a config managemnt solution, do basic | |
| provisioning etc. | |
| '@ | |
| Set-Content -Path 'C:\assets\provision.txt' -Value $text |
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
| # https://docs.microsoft.com/en-us/security/solving-tls1-problem#update-windows-powershell-scripts-or-related-registry-settings | |
| # use the “System Default” TLS versions | |
| $command64 = 'reg add HKLM\SOFTWARE\Microsoft\.NETFramework\v4.0.30319 /v SystemDefaultTlsVersions /t REG_DWORD /d 1 /f /reg:64' | |
| Invoke-Expression -Command $command64 | |
| $command32 = 'reg add HKLM\SOFTWARE\Microsoft\.NETFramework\v4.0.30319 /v SystemDefaultTlsVersions /t REG_DWORD /d 1 /f /reg:32' | |
| Invoke-Expression -Command $command32 |
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
| cp /etc/ansible/ansible.cfg /etc/ansible/ansible.cfg-$(date +%F) |