Skip to content

Instantly share code, notes, and snippets.

@altairlage
altairlage / deleteIoTThingsByTypeOrName.py
Last active May 2, 2019 01:39
Delete AWS IoT things based on type or thing name detaching principals and deleting certificates (python 3 iot)
import logging
import argparse
import os
import botocore
import json
import boto3
logging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s', level=logging.INFO)
@altairlage
altairlage / listGithubOrgRepos.py
Last active February 28, 2019 13:47
List github repos under org creating a .csv file (github enterprise - python 3 - github api
import requests
import json
import argparse
import logging
github_api_url = "https://<github URL>/api/v3"
ghe_access_token = 'your github personal access token'
#logging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s', level=logging.INFO, filename='ghe_org_repo_list.log')
logging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s', level=logging.INFO)