Skip to content

Instantly share code, notes, and snippets.

View danielpsf's full-sized avatar

Daniel Fernandes danielpsf

View GitHub Profile
@danielpsf
danielpsf / ElasticSearch_definitive_guide_notes.md
Last active June 10, 2019 19:32
ElasticSearch Definitive Guide's notes

Elastic Search’s definitive guide notes

Chapter 1. You know, for search

  • RESTful web service on top of Apache Lucene
  • Has many clients that either uses TrasportClientor HTTP Clients
    • TransportClientis scheduled to be removed on ElasticSearch 8.0
  • Has two kind of query mechanisms
@danielpsf
danielpsf / k8s_intro_cloudacademy_notes.md
Created July 19, 2019 14:36
Cloud Academy K8s course notes

Kubernetes introduction

After this course I should be able to know how to:

  • Deploy a single or a multiple container application to K8s
  • Configure Service Discovery
  • Expose applications to the public internet (well, if applicable)
  • Deploy probes to monitor containers
  • Bootstrap applications with init containers
  • Manage Secrets
@danielpsf
danielpsf / challenge_1.md
Last active August 31, 2019 16:32
Simple Python challenge

Coding challenge

The main goal of the coding challenge is to exercise Python development skills while also improving the knowledge of the broad variety of technologies from Docker to AWS as well as features from Python itself.

Pre-requirements

  • Python 3.7
  • Pip
  • An IDE (PyCharm, VSCode, VIM, etc)
@danielpsf
danielpsf / github_org_contribution_report.py
Last active July 5, 2021 07:26
Report of contrigution per repo
import csv
import datetime
import os
import time
from github import Github
def generate_report():
with open('report.csv', 'w', newline='') as csv_file:
@danielpsf
danielpsf / list_ecr_images.py
Last active March 22, 2022 11:17
List (with some limitations) all ECR images
from ast import parse
import boto3
import argparse
parser = argparse.ArgumentParser(
usage="list_ecr_images.py --profile YOUR_PROFILE --region YOUR_REGION",
description="Print all image details for reporting purpose"
)
@danielpsf
danielpsf / .zshrc
Created May 27, 2022 09:52
Always put in the end of ~/..zshrc
# tfenv
export PATH="$HOME/.tfenv/bin:$PATH"
# PyEnv
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
# Sdkman
source ~/.bash_profile;
@danielpsf
danielpsf / terminate_rds_without_connection.py
Last active May 8, 2023 16:17
Script to terminate RDS instances without connection
import datetime
import boto3
import botocore
import argparse
from distutils.util import strtobool
from datetime import datetime, timedelta
def define_parameters():
parser = argparse.ArgumentParser(
@danielpsf
danielpsf / list_ssm.py
Created June 6, 2023 13:17
List SSM parameters and its value in CSV mode (simple print)
import time
from typing import List, Tuple
from boto3 import session
from mypy_boto3_ssm import SSMClient
_PROFILE = "YOUR_PROFILE"
_REGION = "YOUR_AWS_REGION"
_MAX_RESULT=50