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
| rsync -avz hzn:/home/khaliq/repos/backend/docker/data/db/demo_data_05_02.sql . |
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
| select now() - xact_start as duration, * from pg_stat_activity WHERE state = 'active'; | |
| SELECT max(now() - xact_start) FROM pg_stat_activity | |
| WHERE state IN ('idle in transaction', 'active'); | |
| --- https://dba.stackexchange.com/questions/44084/troubleshooting-high-cpu-usage-from-postgres-and-postmaster-services |
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
| k rollout restart deployment frontend | |
| # k === kubectl |
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
| # host to container | |
| docker cp 2020-5-5-11-19.bak unruffled_khayyam:/var/opt/mssql/data/ | |
| # container to host | |
| docker cp awesome_davinci:/var/opt/mssql/data/202048-12-28-43.bak . |
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 system df |
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
| cat customers/develop.json | jq '. [] | select(.creates_infrastructure_foundation == true)' | jq 'if .run_edge then 1 else 0 end' | |
| Source: https://www.garysieling.com/blog/jq-boolean-integer/ |
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
| /github subscribe MyCorp/infrastructure comments reviews |
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
| terraform import -var-file="../prod.tfvars" 'module.ip-address.azurerm_public_ip.static_ip' /subscriptions/6ba1-4e5d-a23e-0e4d3a59208d/resourceGroups/MC_h-network-resources_h-cluster_northeurope/providers/Microsoft.Network/publicIPAddresses/h-ip | |
| terraform import -var-file="../prod.tfvars" 'module.key-vault.azurerm_key_vault.main' /subscriptions/6ba1-4e5d-a23e-0e4d3a59208d/resourceGroups/h-resources/providers/Microsoft.KeyVault/vaults/h |
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 11 | |
| count = "${var.create_bucket == true ? 1 : 0}" | |
| > version 12 | |
| count = var.db_username != "" ? 1 : 0 | |
| Version 13 | |
| count = var.create_bucket ? 1 : 0 |