Some simple ways to free up space on Ubuntu
apt-get autoremove
| #!/bin/bash | |
| # Enhanced cleanup_cache.sh for Ubuntu 24.04 | |
| # Security and efficiency improvements | |
| # Enable error handling and safety features | |
| set -e # Exit on error | |
| set -u # Exit on undefined variables | |
| set -o pipefail # Exit on pipe failures |
| #!/bin/bash | |
| # Define the directory where Open-WebUI is located | |
| OPEN_WEBUI_DIR="$HOME/GitHub/open-webui" | |
| # Define the port to run Open-WebUI on | |
| WEBUI_PORT=7860 # Replace this with your desired port number | |
| # Navigate to the Open-WebUI directory | |
| if cd "$OPEN_WEBUI_DIR"; then |
| #!/bin/bash | |
| # Define the directory where ComfyUI is located | |
| COMFYUI_DIR="$HOME/GitHub/ComfyUI" | |
| # Check if Conda is installed | |
| if ! command -v conda &> /dev/null; then | |
| echo "Error: Conda is not installed. Please install Conda and try again." | |
| exit 1 | |
| fi |
| #!/bin/bash | |
| # Source Conda environment script to make 'conda' available in WSL | |
| if [ -f "/home/username/anaconda3/etc/profile.d/conda.sh" ]; then | |
| source "/home/username/anaconda3/etc/profile.d/conda.sh" | |
| else | |
| echo "Conda initialization script not found. Please check your Conda installation." | |
| exit 1 | |
| fi |
| # Unreal Engine specific content (optimized for WSL) | |
| *.uasset filter=lfs diff=lfs merge=lfs -text | |
| *.umap filter=lfs diff=lfs merge=lfs -text | |
| # Source code and text files (with explicit line endings) | |
| *.cpp text eol=lf | |
| *.h text eol=lf | |
| *.ini text eol=lf | |
| *.uproject text eol=lf | |
| *.txt text eol=lf |
| #!/usr/bin/env bash | |
| # Security-Hardened Ubuntu Cleanup Script | |
| # This script performs comprehensive system cleanup with enterprise-grade security | |
| # EXCLUDES: hy3dgen folder from any deletion operations | |
| # | |
| # Security improvements: | |
| # - Comprehensive error handling with trap handlers | |
| # - Safe configuration loading without arbitrary code execution | |
| # - APT and script-level locking mechanisms |
| // From Algorithmic Design Workbook with Houdini https://app.gumroad.com/d/782fb33b45a3bbc40fdc24d9196cb6ec | |
| // https://www.tokeru.com/cgwiki/index.php?title=HoudiniVex#Attributes_vs_variables | |
| int npnt = nearpoint(1,@P); | |
| vector targetpos = point(1, 'P', npnt); | |
| float dist = distance(@P, targetpos); |
| import requests | |
| def DownloadImage(pic_url_prefix, pic_name): | |
| with open(pic_name, 'wb') as handle: | |
| response = requests.get(pic_url_prefix+pic_name, stream=True) | |
| if not response.ok: | |
| print(pic_url_prefix+pic_name, response) | |
| for block in response.iter_content(1024): |
| # First, you should install flickrapi | |
| # pip install flickrapi | |
| import flickrapi | |
| import urllib | |
| from PIL import Image | |
| # Flickr api access key | |
| flickr=flickrapi.FlickrAPI('c6a2c45591d4973ff525042472446ca2', '202ffe6f387ce29b', cache=True) |