Skip to content

Instantly share code, notes, and snippets.

View tosin2013's full-sized avatar

Tosin Akinosho tosin2013

View GitHub Profile
@tosin2013
tosin2013 / README.md
Last active November 23, 2024 17:05
aider_setup.sh - Aider Setup Script - Streamlined setup for using various AI models with aider-chat, including options for DeepSeek, OpenAI, OpenRouter, and Ollama models.

Aider Setup Script

This Bash script streamlines the setup and execution of Aider, an AI-powered pair programming assistant that operates within your terminal. It automates the installation process, manages virtual environments, and configures Aider with various models and settings.

Prerequisites

  • Python: Ensure Python 3.9 or higher is installed. Verify your version with:

python3 --version

@tosin2013
tosin2013 / delete-pods.sh
Created July 1, 2024 18:53
delete-pods.sh
#!/bin/bash
set -xe
# Get all projects in OpenShift
projects=$(oc get projects -o=jsonpath='{.items[*].metadata.name}')
# Iterate through each project
for project in $projects; do
echo "Checking project: $project"
# Get pods with non-zero restarts in the current project
@tosin2013
tosin2013 / git-merge-script.sh
Created March 30, 2024 13:31
Universal Git Repository Merger
#!/bin/bash
# Source repository configuration (HTTPS)
source_repo_url="https://github.com/SOURCE_REPO_OWNER/SOURCE_REPO_NAME.git"
source_branch="main"
# Target repository configuration (SSH)
target_repo_url="[email protected]:TARGET_REPO_OWNER/TARGET_REPO_NAME.git"
target_branch="main"
#!/bin/bash
# Check if a repository URL was provided
if [ "$#" -ne 1 ]; then
echo "Usage: $0 <repository-url>"
exit 1
fi
REPO_URL=$1
@tosin2013
tosin2013 / setup-docs.yml
Last active August 26, 2024 22:51
.github/workflows/setup-docs.yml
name: Setup and Deploy Documentation
on:
workflow_dispatch:
inputs:
setup_jekyll_docs:
description: 'Setup Jekyll Docs'
required: true
default: 'false'
type: choice
@tosin2013
tosin2013 / configure_gui.sh
Last active October 3, 2024 00:31
GNOME GUI and xrdp on RHEL
#!/bin/bash
# Install GNOME GUI
sudo yum groupinstall "Server with GUI" -y
# Enable EPEL repository
#sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm -y
sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm -y
# Install xrdp and dependencies
@tosin2013
tosin2013 / openshift-ai-workload.sh
Last active September 12, 2024 19:16
openshift-ai-workload.sh
#!/bin/bash
if [ -z "$1" ]; then
echo "Instance size not provided. Please pass the instance size as an argument."
echo "Example: ./openshift-ai-workload.sh m6i.4xlarge"
echo "Example: ./openshift-ai-workload.sh g4dn.4xlarge"
echo "Example: ./openshift-ai-workload.sh g4ad.4xlarge"
echo "Example: ./openshift-ai-workload.sh p3.2xlarge"
echo "Example with GPU flag: ./openshift-ai-workload.sh --gpu"
exit 1
@tosin2013
tosin2013 / h2ogpt_docker.sh
Last active August 26, 2024 22:51
h2ogpt_docker.sh
#!/bin/bash
set -x
# Function to check if Docker is installed and start Docker service if it's not running
check_and_start_docker() {
if ! command -v docker &> /dev/null; then
# Docker is not installed, install it
echo "Docker is not installed. Installing..."
sudo apt update
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common
@tosin2013
tosin2013 / privategpt-bootstrap.sh
Last active August 26, 2024 22:48
privateGPT
#!/bin/bash
# privategpt documentation
# https://docs.privategpt.dev/installation/getting-started/installation
set -e
# PostgreSQL settings
PG_DB_NAME="ollama_db"
PG_USER="ollama_user"
PG_PASSWORD="pAsSw0Rd" # Change this to a secure password
#!/bin/bash
set -xe
# Updated usage to include EMAIL as the fourth parameter
if [[ $# -ne 4 ]]; then
echo "Usage: $0 <AWS_ACCESS_KEY> <AWS_SECRET_ACCESS_KEY> <CONTAINER_RUN_TIME> <EMAIL>"
exit 1
fi
# Check if logged on to OpenShift and if not exit