Skip to content

Instantly share code, notes, and snippets.

@sycomix
sycomix / torch-uv-fix.ps1
Created August 31, 2025 06:15
This script guides you through the process of building PyTorch from source on Windows with libuv support. It avoids common permissions errors by building libuv to a local project directory instead of a system folder.
# This script guides you through the process of building PyTorch from source on Windows
# with libuv support. It avoids common permissions errors by building libuv to a local
# project directory instead of a system folder.
#
# Prerequisite:
# - Visual Studio Build Tools (2019 or later) with "Desktop development with C++" and "Python development" workloads.
# - Git
# - A clean Python environment (e.g., from Miniconda)
# - (Optional) CUDA Toolkit for GPU support.
@sycomix
sycomix / qdrant-tool.sh
Last active July 30, 2025 00:03
qdrant-docker-tools
#!/bin/bash
# ==============================================================================
# Unified Qdrant Docker Troubleshooter (v3)
#
# This script combines various diagnostic checks for a Qdrant instance
# running in Docker into a single, easy-to-use tool.
#
# It now includes a comprehensive batch test and report option.
#
@sycomix
sycomix / WSL-deploy.ps1
Last active July 15, 2025 08:33
secondary deploy script
<#
.SYNOPSIS
Installs a custom WSL2 distribution from a .tar file, creates a new user,
and generates a Windows Terminal profile.
.DESCRIPTION
This script automates the final setup of a custom WSL2 distro. It handles
importing the tarball, creating a specified user with sudo privileges, setting
that user as the default for login, and providing a JSON snippet for easy
integration into the Windows Terminal settings.
.NOTES
@sycomix
sycomix / wsl-builder.ps1
Created July 15, 2025 07:55
WSL2 Customization
<#
.SYNOPSIS
A PowerShell script to create a custom WSL2 distribution tar file.
.DESCRIPTION
This script provides an interactive menu to select a base Linux distribution
and a variety of packages to build a personalized WSL2 environment. It uses
Docker to assemble the distro and then exports the filesystem as a .tar file.
.NOTES
Author: Gemini
Version: 2.1
@sycomix
sycomix / FurIP.sh
Last active June 30, 2025 08:40
blanket ban states or countries on linux
#!/bin/bash
# GeoBlocker: Region-based IP banning using ipset + iptables
BLOCK_DIR="/etc/ipblocker"
BLOCK_LOG="/var/log/geo-block.log"
IPSET_CONF="/etc/ipset.conf"
mkdir -p "$BLOCK_DIR"
@sycomix
sycomix / rdpNvncFix.sh
Last active June 30, 2025 07:18
rdp and vnc unfucker for linux (ubuntu/debian)
#!/bin/bash
# ==============================================================================
#
# Ubuntu xRDP & VNC Troubleshooter
#
# Description:
# This script is designed to diagnose and fix common and advanced issues with
# xRDP and VNC on Ubuntu systems. It checks services, ports, configurations,
# firewall settings, and startup scripts.
@sycomix
sycomix / tika-install.sh
Last active July 14, 2025 19:25
tika build and install server from source
#!/bin/bash
#==============================================================================
# Download, Compile, and Install Apache Tika Server (Definitive Edition)
#
# This script fully automates the setup of a full-featured Apache Tika server.
# It uses a robust two-step process to guarantee ALL modules and dependencies
# are correctly packaged before installing the application as a system service.
#
# Prerequisites:
@sycomix
sycomix / setup.sh
Last active July 10, 2025 21:12
unified open-webui and tools setup script
#!/bin/bash
# Exit immediately if a command exits with a non-zero status.
set -e
# --- WSL Docker Credential Helper Fix ---
# In WSL, Docker can sometimes fail trying to find the Windows credential helper.
# This creates a config file to disable it, fixing the "docker-credential-desktop.exe not found" error.
echo "ℹ️ Applying WSL Docker credential helper fix..."
mkdir -p ~/.docker
@sycomix
sycomix / FU-docker.sh
Created May 4, 2025 00:21
unfuck docker in debian/ubuntu
#!/bin/bash
# --- Docker Purge Script for Ubuntu (Interactive) ---
#
# WARNING: This script uninstalls Docker and can optionally remove containers,
# images, volumes, and data directories, which can lead to data loss.
# Backup any important data (especially in Docker volumes) before proceeding.
#
# Run this script with root privileges: sudo bash purge_docker_interactive.sh
@sycomix
sycomix / nvautoreinstall.sh
Created May 3, 2025 04:37
nvidia driver unfucker for linux
#!/bin/bash
# Colors variable definitions
GREEN="\033[0;32m"
RED="\033[0;31m"
YELLOW="\033[1;33m"
CYAN="\033[0;36m"
RESET="\033[0m"
# trap ctrl-c and call ctrl_c()