Skip to content

Instantly share code, notes, and snippets.

@ammunoz
ammunoz / notify.bat
Last active July 5, 2025 20:50
Terminal Notify on Command Completion
@echo off
:: Check has at least one argument
if "%~1"=="" (
echo "Usage: notify.bat <command> [arguments...]"
exit /b 1
)
:: Run command
call %*
@mdegat01
mdegat01 / update_notifications.yaml
Last active July 5, 2025 20:27
Update Notifications Automation Blueprint
blueprint:
name: Update notifications
description: Send notifications for new updates and install or skip on action
homeassistant:
min_version: '2022.4.0'
domain: automation
input:
update_entities:
name: Update entities
description: >-
@protrolium
protrolium / ffmpeg.md
Last active July 5, 2025 20:17
ffmpeg guide

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

You can get the list of installed codecs with:

@reluce
reluce / prepare_ubuntu_template.sh
Last active July 5, 2025 19:48
Prepare Ubuntu 22.04 Cloud Image and Template for Proxmox
# All commands will be executed on a Proxmox host
sudo apt update -y && sudo apt install libguestfs-tools -y
wget https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img
# Install qemu-guest-agent on the image. Additional packages can be specified by separating with a comma.
sudo virt-customize -a jammy-server-cloudimg-amd64.img --install qemu-guest-agent
# Read and set root user password from file.
sudo virt-customize -a jammy-server-cloudimg-amd64.img --root-password file:password_root.txt
# Create an additional user.
sudo virt-customize -a jammy-server-cloudimg-amd64.img --run-command "useradd -m -s /bin/bash myuser"
# Set password for that user.
@transitive-bullshit
transitive-bullshit / claude-code-prompts.js
Last active July 5, 2025 19:01
Unminified prompts and tool definitions for Claude Code
// Claude Code is a Beta product per Anthropic's Commercial Terms of Service.
// By using Claude Code, you agree that all code acceptance or rejection decisions you make,
// and the associated conversations in context, constitute Feedback under Anthropic's Commercial Terms,
// and may be used to improve Anthropic's products, including training models.
// You are responsible for reviewing any code suggestions before use.
// (c) Anthropic PBC. All rights reserved. Use is subject to Anthropic's Commercial Terms of Service (https://www.anthropic.com/legal/commercial-terms).
// Version: 0.2.9
@Richusanju
Richusanju / Own*MENU*Levanter
Last active July 5, 2025 21:03 — forked from najahvk/Own*MENU*Levanter
Levanter own menu
const { bot, getBuffer, jidToNum, genThumbnail } = require('../lib/');
const { VERSION } = require('../config');
const {
textToStylist,
getUptime,
@staaldraad
staaldraad / huaweiDecrypt.py
Created March 11, 2015 13:19
Decrypt Huawei router/firewall passwords. Huawei stores passwords using DES encryption when the crypted option is enabled.
#!/usr/bin/python
"""
Simple tool to extract local users and passwords from most Huawei routers/firewalls config files.
Will extract plain-text passwords and crypted credentials. Huawei config files use DES encryption with
a known key. Using this information, the script will decrypt credentials found in the config file.
Author: Etienne Stalmans ([email protected])
Version: 1.0 (12/01/2014)
"""
from Crypto.Cipher import DES
@frauzufall
frauzufall / benchmark_bioio_vs_native.py
Last active July 5, 2025 17:56
Benchmarking bioio vs native readers
# /// script
# dependencies = [
# "numpy",
# "pillow",
# "tifffile",
# "imageio",
# "bioio",
# "bioio-tifffile",
# "bioio-imageio",
# "matplotlib",
#!/data/data/com.termux/files/usr/bin/sh
# setup
pkg install root-repo
pkg update
# install python3
pkg install python3
# install nodejs (LTS)
@rmtbb
rmtbb / ChatGPT Canvas HTML Renderer from Clipboard.url
Last active July 5, 2025 17:49
Bookmarklet that lets you render a full HTML page with any included css and javascript that is currently copied to your clipboard. Also works for SVG code. Useful with ChatGPT Canvas
javascript:(function(){try{navigator.clipboard.readText().then(function(t){if(t){var e=window.open("","_blank","width=800,height=600");e.document.open(),e.document.write(t),e.document.close()}else alert("Clipboard is empty. Please copy some text to the clipboard first.")}).catch(function(t){console.error("Failed to read clipboard contents: ",t),alert("An error occurred while trying to access the clipboard. Please ensure your browser allows clipboard access.")})}catch(t){console.error("An error occurred:",t),alert("An error occurred while trying to open the new window with the clipboard content.")}})();//bookmarklet_title: HTML Preview from Clipboard