Skip to content

Instantly share code, notes, and snippets.

View Fail-Safe's full-sized avatar

Mark B Fail-Safe

  • United States
View GitHub Profile
@Alex-Schaefer
Alex-Schaefer / bambu-ssdp-discovery.py
Last active April 11, 2025 02:12
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:
@depau
depau / README.md
Last active April 17, 2025 19:39
Valetudo Gamepad Control

PyGame-based Valetudo Gamepad Remote Control

Uses PyGame, so it should work with all gamepads that work in actual games.

Nasty code ;)

It requires the gamepad to have at least one analog stick.

Modify the script and set DRY_RUN to True to avoid contacting Valetudo during gamepad testing.

@gaoyifan
gaoyifan / tc-mark.nft
Created September 24, 2018 10:20
Traffic control mark with nftables
#! /usr/sbin/nft -f
chain tc-wan {
# check default priority
mark & 0xff0 == 0x130 ip dscp set af22 return
# real-time application
## Dota2
udp dport 27000-27200 \
meta mark set mark & 0xfffff00f ^ 0x110 ip dscp set af41 return
@sh4t
sh4t / flush_chrome_dns.sh
Last active July 20, 2024 18:58
clearing chrome dns cache and sockets via js
#!/bin/bash
#
# The MIT License (MIT)
# Copyright (c) 2015 Justin Shattuck <[email protected]>, F5 Networks, Inc.
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell