Skip to content

Instantly share code, notes, and snippets.

Altair Lage altairlage

Block or report user

Report or block altairlage

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
altairlage / CreateIAMUserViaCLI.txt
Created Jun 17, 2019
How to create and AWS IAM user via CLI
View CreateIAMUserViaCLI.txt
- Create user
aws iam create-user --user-name <username>
- Create login profile (to allow AWS Console access)
aws iam create-login-profile --user-name <value> --password <value> --password-reset-required
- Create access key (for programatic access)
aws iam create-access-key --user-name <username>
- Add user to group
View ConanCBuilderInformation.txt
View queryResoltPostgresToCSV.txt
\copy (<SQL Query - no ;>) To '/home/user/query.csv' With header CSV delimiter as ';'
altairlage / ConnectPostgresFromLinux.txt
Created Apr 18, 2019
How to connect to a remote postgres database from linux
View ConnectPostgresFromLinux.txt
psql -h <endpoint/ip> -p <port> -d <dbname> -U <user> -W <password>
altairlage / temp-policy.json
Last active Mar 31, 2020
Sample temp AWS IAM permissions policy
View temp-policy.json
"Version": "2012-10-17",
"Statement": [
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
View Install_VS2017_command_line.txt
Powershell commands:
setx /M PATH "%PATH%;C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin;
altairlage / graylog_role_request_notes.txt
Last active Feb 28, 2019
Graylog api role request notes
View graylog_role_request_notes.txt
Internal API documentation:
https://<your graylog address>/api/api-browser/
Get permissions list:
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 -r default
3 - Create a git repo:
- cd reportlab
- git init
- git checkout -b master
altairlage /
Last active May 2, 2019
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 /
Last active Feb 28, 2019
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)
You can’t perform that action at this time.