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
@kamermans
kamermans / configure_docker0.sh
Last active April 26, 2024 00:58
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"
# }

Setup

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

$ git clone [email protected]:jeccb/Dotfiles.git

Follow the instructions in readme of Dotfiles repo.

@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