Skip to content

Instantly share code, notes, and snippets.

@Limbicnation
Limbicnation / ubuntu_cleanup.sh
Last active October 15, 2025 07:34
ubuntu_cleanup.sh A comprehensive system cleanup script for Ubuntu 24.04 that safely removes unnecessary files to free up disk space. This script includes system maintenance tasks like package cleanup, log rotation, cache removal, and system optimization. Features include progress tracking, disk space reporting, resource limiting, and extensive …
#!/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
@Silvenga
Silvenga / install.ps1
Created September 13, 2023 00:16
A simple PS script to install ADB/Fastboot (aka platform-tools) directly from Google and add the the binaries to PATH.
function Update-UserPath([string]$Value)
{
$currentPath = [Environment]::GetEnvironmentVariable("Path", [EnvironmentVariableTarget]::User)
if ($currentPath -like "*${Value}*")
{
Write-Host "The value '${Value}' already exists in user PATH, no update is needed."
}
else
{
$targetPath = $currentPath + ";${Value}";
@wanglf
wanglf / vscode-extension-offline.md
Last active December 8, 2025 11:11
Download VS Code extensions as VSIX

How to use?

  • Copy content of vsix-bookmarklet, create a bookmark in your browser.
  • Navigate to the web page of the VS Code extension you want to install.
  • Click the bookmark you just created, then click the download button.
    download
  • After download finished, rename the file extension to *.vsix.
  • In VS Code, select Install from VSIX... in the extension context menu.
    vsc