Skip to content

Instantly share code, notes, and snippets.

View anairinac's full-sized avatar
🐱

Irina Calvo anairinac

🐱
  • Costa Rica
View GitHub Profile
@anairinac
anairinac / get_roles_by_provider.py
Created January 9, 2023 01:23
Get AWS Role names that use a given Identity Provider in their trust policy
import boto3
# Given list of provider ARNs
providers = []
iam_client = boto3.client('iam')
role_list = [ role['RoleName'] for role in iam_client.list_roles()['Roles'] ]
for provider in providers:
print("{}:".format( provider ))
for role in role_list:
trust_policy = iam_client.get_role( RoleName=role )['Role']['AssumeRolePolicyDocument']
@anairinac
anairinac / listPoliciesGlueAccess.sh
Created November 7, 2022 22:07
Get a list of AWS IAM Policies that have Glue permissions for all roles in account
roles=$(aws iam list-roles --query 'Roles[*].Arn' --output text)
for arn in $roles; do
echo filtering glue policies for arn $arn
policies=$(aws iam list-policies-granting-service-access --service-namespaces glue --arn=$arn --output text)
for policy in $policies; do
echo $policy
done
done
@anairinac
anairinac / install_dotnetcore_opensuse.md
Created November 12, 2021 03:16
Steps to install Dot NET Core on OpenSuse 15

Install C# .NET Core on OpenSuse 15

  1. Install the intial library (make sure you type your sudo password properly):
sudo zypper install libicu
  1. Add the Microsoft repo to contact for the .NET core packages:
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
wget https://packages.microsoft.com/config/opensuse/15/prod.repo
@anairinac
anairinac / .vimrc
Last active February 22, 2018 16:48
Vim configuration
if &term == "screen"
set t_Co=256
elseif &term == "xterm"
set t_Co=256
endif
" Pathogen plugin manager config
execute pathogen#infect()
syntax on
filetype plugin indent on
@anairinac
anairinac / install_gcloud.sh
Created February 11, 2018 05:18
Install Google Cloud SDK in openSuse Tumbleweed
#!/bin/bash
# Created on: 02/07/2018
# Author: anairinac
echo 'Starting Google Cloud SDK installation'
# Variables:
machine_user=anairinac
user_home=/home/$machine_user