Skip to content

Instantly share code, notes, and snippets.

@brummbrum
brummbrum / bambu-ssdp-discovery.py
Created January 21, 2025 21:41 — forked from Alex-Schaefer/bambu-ssdp-discovery.py
Python implementation to send a fake SSDP discovery message to Bambu Studio or Orca Slicer
# Derived from this: https://github.com/gashton/bambustudio_tools/blob/master/bambudiscovery.sh
# Python implementation without need for linux
# Send the IP address of your BambuLab printer to port 2021/udp, which BambuStudio is listens on.
# Ensure your PC has firewall pot 2021/udp open. This is required as the proper response would usually go to the ephemeral source port that the M-SEARCH ssdp:discover message.
# But we are are blindly sending a response directly to the BambuStudio listening service port (2021/udp).
# Temporary solution to BambuStudio not allowing you to manually specify the Printer IP.
# Usage:
@brummbrum
brummbrum / bambulab-discover.ps1
Created November 21, 2024 09:36 — forked from fritzw/bambulab-discover.ps1
PowerShell script to make BambuStudio discover a specific printer by IP address, even if it is not on the same subnet (see BambuStudio Issue #702)
# Send the IP address of your BambuLab printer to port 2021/udp, which BambuStudio is listens on.
#
# Ensure your PC has firewall pot 2021/udp open. This is required as the proper response would usually go to the ephemeral source port that the M-SEARCH ssdp:discover message.
# But we are are blindly sending a response directly to the BambuStudio listening service port (2021/udp).
#
# Temporary solution to BambuStudio not allowing you to manually specify the Printer IP.
#
# Author(s): gashton <https://github.com/gashton>, Fritz webering <https://github.com/fritzw>
#
param (
@brummbrum
brummbrum / tag_images_with_ai.sh
Created November 20, 2024 19:07 — forked from zhibor/tag_images_with_ai.sh
tag images with ollama
#!/bin/bash
# dry run mode
dry_run=0
if [[ "$1" == "-n" || "$1" == "--dry-run" ]]; then
dry_run=1
echo -e "\tℹ️ Dry run mode enabled. No changes will be made."
shift # remove the dry run argument
fi