Skip to content

Instantly share code, notes, and snippets.

View ph33nx's full-sized avatar
🥷
Cooking

Abhi ph33nx

🥷
Cooking
  • 02:01 (UTC +05:30)
View GitHub Profile
@ph33nx
ph33nx / audio-conversion-ffmpeg-opus-webm.md
Last active April 22, 2025 15:35
FFmpeg Audio Conversion Guide: Convert MP3 to high-quality Opus in a WebM container for efficient audio streaming and compression on Windows, Linux, and macOS

Audio File Conversion with FFmpeg for Audio Streaming

Author: ph33nx

This guide provides detailed instructions for converting your audio files (e.g., MP3) into a high-quality, compressed Opus format encapsulated in a WebM container using FFmpeg. It is designed for developers, system administrators, and audio engineers looking for efficient audio streaming, optimal media conversion, and reliable audio compression solutions across multiple operating systems.

Table of Contents

@ph33nx
ph33nx / ComfyUI-Docker-Quickstart.md
Last active March 20, 2025 09:26
This quickstart guide shows you how to containerize and run ComfyUI using Docker on both Linux and Windows (including WSL, CMD, and PowerShell). It provides step-by-step instructions to create a local "comfy" directory and launch the Docker container with NVIDIA GPU support. Ideal for users looking to deploy ComfyUI in a containerized environmen…
@ph33nx
ph33nx / TurnOffMonitor.ps1
Created March 3, 2025 08:20
PowerShell Windows API Script: Instantly Turn Off Your Monitor (Developer Hack) Leverage this advanced PowerShell script that uses Windows API calls to instantly power off your monitor without disrupting background tasks. Perfect for system automation, IT efficiency, and developer productivity. Follow the included shortcut instructions to set up…
# TurnOffMonitor.ps1
# This script leverages the Windows API via .NET to power off the display while keeping background processes running.
# Author: ph33nx (https://github.com/ph33nx)
# Shortcut Instructions:
# 1. Right-click on your Desktop and select "New > Shortcut".
# 2. In the "Type the location of the item" field, paste:
# powershell.exe -ExecutionPolicy Bypass -File "C:\path\to\TurnOffMonitor.ps1"
# 3. Click "Next", give your shortcut a name (e.g., "Turn Off Monitor"), and finish.
# 4. (Optional) Assign a hotkey by right-clicking the shortcut, selecting "Properties", and setting your desired key combination.
# Keywords: Windows API, PowerShell, monitor off, turn off display, display sleep shortcut, Windows shortcut, system automation,
@ph33nx
ph33nx / Install-Android-USB-ADB-Fastboot-Windows-2025.md
Last active March 2, 2025 10:40
Install Android USB Driver, ADB, and Fastboot on Windows 10/11 (2025) – Step-by-step instructions to install the Android USB driver and set up ADB/Fastboot using winget on Windows 10/11. Perfect for Android development and troubleshooting.

Credit: ph33nx


Manual Installation Guide for Android USB Driver & ADB/Fastboot (Windows 10/11)

This guide provides simple, direct steps to manually install the Google USB Driver and ADB/Fastboot binaries using winget on Windows 10/11.


@ph33nx
ph33nx / change_ms_edge_user_agent_registry.reg
Created January 22, 2025 21:05
Change Microsoft Edge User Agent via Registry. This registry file changes the user agent for Microsoft Edge on Windows. Use it to set a custom user agent permanently via the registry.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge]
"UserAgent"="Mozilla/5.0 (Macintosh; Intel Mac OS X 14_7_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36 Edg/131.0.2903.86"
@ph33nx
ph33nx / project2txt.py
Last active February 7, 2025 15:20
project2txt.py - Python script that Exports Project Structure, Code and File Contents to txt file for LLM, ChatGPT, Agent Based Workflows. Scans a project's directory structure and exports the file hierarchy and contents into a clean, human-readable YAML file. This script is designed to simplify AI workflows, including those leveraging ChatGPT, …
#!/usr/bin/env python3
"""
project2txt.py
Python script to scan a project's directory structure for common programming files and export it to a text file.
Respects .gitignore rules if present, handles subdirectories, and preserves file contents.
Only includes paths that contain common programming and project files.
Author: ph33nx
GitHub: https://gist.github.com/ph33nx/12ce315ef6dbcf9ef1d01f5371af4a3d
@ph33nx
ph33nx / block-internet-access-folder-executables-windows-firewall.bat
Last active January 23, 2025 05:00
Batch script to block internet access for all .exe files in a folder recursively using Windows Firewall (inbound and outbound rules). Includes dynamic folder path input, usage instructions, and automation.
@echo off
:: Batch Script: block_folder.bat
:: Author: https://github.com/ph33nx
:: Description: Blocks all .exe files in the specified folder (and subfolders) from accessing the internet (both inbound and outbound) using Windows Firewall.
:: Usage:
:: block_folder.bat [FolderPath]
:: - Pass the folder path containing the .exe files to block.
:: block_folder.bat -h
:: - Displays this help message.
@ph33nx
ph33nx / arch-linux-setup-gaming.sh
Last active March 2, 2025 10:39
Arch Linux Gaming Setup Script: Automate the installation of NVIDIA drivers, Wine, Lutris, Vulkan, and essential 32-bit libraries for gaming. This script ensures a complete gaming environment setup with DXVK and Winetricks on Arch-based systems. Perfect for gamers looking to optimize their Linux setup for titles on Steam, Epic, or standalone Win…
#!/bin/bash
# Gaming Setup Script for Arch Linux with Nvidia GPU
# Author: ph33nx
# Description: Installs all necessary packages and configurations for gaming on Arch Linux
# Update system and keyring
echo "Updating system and keyring..."
sudo pacman -Syu --needed --noconfirm archlinux-keyring
@ph33nx
ph33nx / download_subtitles.py
Last active March 2, 2025 10:38
Python script to recursively download missing subtitles for video files
#!/usr/bin/env python3
import os
import sys
from babelfish import Language
from subliminal import download_best_subtitles, region, save_subtitles, scan_video
# Configure subliminal cache
region.configure('dogpile.cache.dbm', arguments={'filename': 'cachefile.dbm'})
@ph33nx
ph33nx / batch_image_converter.py
Last active March 2, 2025 10:39
Batch Convert Images to Web-Optimized JPG or WEBP using Python with EXIF Preservation 🖼️✨ Fast, batch image conversion while preserving EXIF metadata using Python Script
#!/usr/bin/env python3
"""
Author: ph33nx
URL: https://gist.github.com/ph33nx/861d9ff35721d56205c834c7f8308e0b
Description:
This script converts images from various formats (e.g., PNG, JPG, WebP) to either JPG or WebP for web optimization.
It preserves EXIF metadata, allows for optional parameter customization, and handles errors gracefully.