Skip to content

Instantly share code, notes, and snippets.

View bastosmichael's full-sized avatar
🏠
Working from home

Michael Bastos bastosmichael

🏠
Working from home
View GitHub Profile
@bastosmichael
bastosmichael / dependabot.yml
Last active October 3, 2024 13:07
Node Dependabot Auto-merging based on pass/fail PR CI
version: 2
updates:
- package-ecosystem: 'npm' # See documentation for possible values
directory: '/' # Location of package manifests
open-pull-requests-limit: 25
schedule:
interval: 'daily'
- package-ecosystem: 'github-actions' # See documentation for possible values
directory: '/' # Location of package manifests
open-pull-requests-limit: 25
@bastosmichael
bastosmichael / gist:2a5293371f9b32e5bb2411538ba982ea
Created August 10, 2023 21:11
Request for Comment (RFC) Template for Software Engineering Teams
Below is a basic RFC (Request for Comment) template suitable for software engineering teams working on Federal projects:
---
## **RFC: [Your Proposal Name]**
**RFC Number:** [Unique number or identifier for the RFC]
**Date:** [Creation date]
@bastosmichael
bastosmichael / setup_kong_docker.sh
Last active September 19, 2023 17:57
Automated Kong Setup with Self-Signed Certificate in Docker
#!/bin/bash
# Generate a self-signed certificate
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes -subj "/CN=localhost"
# Read the contents of the certificate and private key into environment variables
CA_CERT=$(cat cert.pem)
CA_KEY=$(cat key.pem)
# Cleanup the generated certificate and key files from the local file system
@bastosmichael
bastosmichael / update_repos.sh
Last active September 27, 2023 13:38
Automated Git Update for Sub-Directories
#!/bin/bash
# Get the current directory from which the script is executed
DIR="$(pwd)"
# Iterate over sub-directories
for SUB_DIR in "$DIR"/*; do
if [ -d "$SUB_DIR" ]; then
echo "Processing $SUB_DIR..."
import pandas as pd
import numpy as np
from sklearn.model_selection import train_test_split
from sklearn.ensemble import RandomForestClassifier
from sklearn.metrics import accuracy_score
from datetime import datetime, timedelta
import random
# Function to generate random dates