az account list-locations -o table| DisplayName | Latitude | Longitude | Name | 
|---|---|---|---|
| East Asia | 22.267 | 114.188 | eastasia | 
| Southeast Asia | 1.283 | 103.833 | southeastasia | 
| Central US | 41.5908 | -93.6208 | centralus | 
| East US | 37.3719 | -79.8164 | eastus | 
| { | |
| "Version": "2012-10-17", | |
| "Statement": [ | |
| { | |
| "Sid": "Statement1", | |
| "Principal": { | |
| "AWS": "*" | |
| }, | |
| "Effect": "Allow", | |
| "Action": [ | 
| # workstation-ks.cfg | |
| # version 1.0.1 2012-03-15 | |
| # Copyright 2010,2011,2012 Red Hat Inc., Durham, North Carolina. | |
| # All Rights Reserved. | |
| # | |
| # This program is free software; you can redistribute it and/or modify | |
| # it under the terms of the GNU General Public License as published by | |
| # the Free Software Foundation; either version 2 of the License, or | |
| # (at your option) any later version. | |
| # | 
| #!/usr/bin/perl | |
| use strict; | |
| my $scriptname = $0; | |
| my $separator = '='; | |
| my $whitespace = 0; | |
| my @files = (); | |
| my @namevalues = (); | 
az account list-locations -o table| DisplayName | Latitude | Longitude | Name | 
|---|---|---|---|
| East Asia | 22.267 | 114.188 | eastasia | 
| Southeast Asia | 1.283 | 103.833 | southeastasia | 
| Central US | 41.5908 | -93.6208 | centralus | 
| East US | 37.3719 | -79.8164 | eastus | 
Personal Note on how to install Azure CLI Extension or AZ Extensions
az extension add --name [extension]| #!/usr/bin/env bash | |
| #################################################################################### | |
| # Slack Bash console script for sending messages. | |
| #################################################################################### | |
| # Installation | |
| # $ curl -s https://gist.github.com/andkirby/67a774513215d7ba06384186dd441d9e/raw --output /usr/bin/slack | |
| # $ chmod +x /usr/bin/slack | |
| #################################################################################### | |
| # USAGE | |
| # Send message to slack channel/user | 
| # This gist mimics the supposed behavior of | |
| # variable = merge(someListOfMaps[*].parameters...) | |
| # or | |
| # policy_parameters = merge(data.azurerm_policy_definition.d_policy_definitions[*].parameters...) | |
| locals { | |
| policy_parameters = [ | |
| for key,value in data.azurerm_policy_definition.d_policy_definitions: | |
| { | |
| parameters = jsondecode(value.parameters) | 
| cat access_log | awk '{print $8}' | sort -n | uniq -c | sort -nr | head -20 | 
| exports.handler = (event, context, callback) => { | |
| var AWS = require('aws-sdk'); | |
| var s3 = new AWS.S3(); | |
| var inputObj = event.queryStringParameters ? event.queryStringParameters : event; | |
| var Bucket = inputObj.Bucket = inputObj.Bucket!==undefined ? inputObj.Bucket : null; | |
| var Prefix = inputObj.Prefix = inputObj.Prefix!==undefined ? inputObj.Prefix : null; | |
| var params = {Prefix,Bucket}; | |
| s3.listObjects(params, function(err, data) { | |
| if (err){ | |
| callback({status:false,message:err},null); |