Skip to content

Instantly share code, notes, and snippets.

View kevinlu1248's full-sized avatar
👨‍💼
Living in Office

Kevin Lu kevinlu1248

👨‍💼
Living in Office
View GitHub Profile
@kevinlu1248
kevinlu1248 / redeploy.sh
Created September 24, 2024 21:41
0DD redeploy script
# !/bin/bash
# Remove old docker images only after 2 runs to allow for rollbacks.
# Docker images also need to finish processing their requests before they can be removed.
docker pull sweepai/sweep:$TAG
containers_to_remove=$(docker ps -q --filter "ancestor=sweepai/sweep" | awk 'NR>2')
if [ ! -z "$containers_to_remove" ]; then
@kevinlu1248
kevinlu1248 / delete_old_repos.sh
Last active September 24, 2024 19:18
Deletes untouched repos
#!/bin/bash
# Function to safely remove a directory and echo the action
safe_remove() {
local dir="$1"
if [ -d "$dir" ]; then
echo "Removing: $dir"
rm -rf "$dir"
fi
}
@kevinlu1248
kevinlu1248 / install.sh
Last active September 11, 2023 05:12
Sweep Sandbox Install from Source
#!/bin/bash
CYAN='\033[0;46m'
WHITE='\033[1;37m'
RED='\033[0;31m'
NC='\033[0m' # No Color
echo -e "\n${CYAN}${WHITE}### Starting Setup Script ###${NC}\n"
# Function to display message and exit when a command fails
@kevinlu1248
kevinlu1248 / BaseIndex.tsx.md
Last active August 1, 2023 22:23
Langchain's Chunker
@kevinlu1248
kevinlu1248 / BaseIndex.tsx.md
Last active March 5, 2024 16:01
Sweep's Chunker