Skip to content

Instantly share code, notes, and snippets.

View andersonVSA's full-sized avatar

Anderson de Vasconcelos Sant'Ana andersonVSA

  • Nubank
  • Brazil, São Paulo -SP
View GitHub Profile
@dedunumax
dedunumax / aws_rds_unused_lambda_function.py
Last active July 16, 2023 15:48
This AWS Lambda function will scan for RDS instances with no connections for last 14 days using boto3 and stop them. -https://github.com/dedunu/blog/blob/main/2020/2020-07-04-unused-rds-lambda.md
"""RDS-Unused AWS Lambda Function
It will go through the REGION's RDS instances and check on CloudWatch for the unused
instances and will stop them.
"""
import json
from datetime import datetime, timedelta
from multiprocessing import Process, Pipe
import boto3

Setup

$ apt-get install vim
$ apt-get install ack-grep

$ git clone git@github.com:jeccb/Dotfiles.git

Follow the instructions in readme of Dotfiles repo.

@kamermans
kamermans / configure_docker0.sh
Last active January 11, 2024 18:21
Change the IP subnet of Docker's docker0 interface
#!/bin/sh -e
#
# NOTE: Since Docker 1.10 (February 4, 2016), it has been possible to configure the
# Docker daemon using a JSON config file. On Linux, this file is normally located at
# /etc/docker/daemon.json. You should use this JSON config method if you are running
# a version of Docker that is at least 1.10!
# Here is an example configuration that sets the docker0 bridge IP to 192.168.254.1/24:
# {
# "bip": "192.168.254.1/24"
# }