Instantly share code, notes, and snippets.

Altair Lage altairlage

View GitHub Profile
@altairlage
altairlage / convert_from_bitbucket.txt
Created Dec 20, 2018
How to checkout from Mercurial Bitbucket and fully commit to a github repo
View convert_from_bitbucket.txt
1- Install mercurial
- apt-get install mercurial
2- Checkout bitbucket repo
- hg clone <repo url> -r <branch>
- EX - hg clone https://bitbucket.org/rptlab/reportlab -r default
3 - Create a git repo:
- cd reportlab
- git init
- git checkout -b master
@altairlage
altairlage / deleteIoTThingsByTypeOrName.py
Last active Dec 6, 2018
Delete AWS IoT things based on type or thing name detaching principals and deleting certificates (python 3 iot)
View deleteIoTThingsByTypeOrName.py
import logging
import argparse
import os
import botocore
import json
from daasdeployhelpers import cloudformation as daas_cfn
from daasdeployhelpers import authentication as daas_auth
import boto3
@altairlage
altairlage / listGithubOrgRepos.py
Created Dec 6, 2018
List github repos under org creating a .csv file (github enterprise - python 3 - github api
View listGithubOrgRepos.py
import requests
import json
import argparse
import logging
github_api_url = "https://github.infra.int.daas-watchguard.com/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)