Skip to content

Instantly share code, notes, and snippets.

import argparse
import requests
import time
import json
import locale
locale.setlocale(locale.LC_ALL, 'en_US')
def main():
"""
Entry point of the application
@technmsg
technmsg / cloud_detect.sh
Created July 24, 2017 20:19
detect cloud platform
#!/bin/bash
#
# detect cloud platform and query for instance type
#
platform='unknown'
instance_type="unknown"
# AWS EC2
if [ -f /sys/hypervisor/uuid ] ; then
instance_uuid=$(cat /sys/hypervisor/uuid)