Skip to content

Instantly share code, notes, and snippets.

View bbbenji's full-sized avatar
🛸
Hello, Earth!

Benji bbbenji

🛸
Hello, Earth!
View GitHub Profile
@Alex-Schaefer
Alex-Schaefer / bambu-ssdp-discovery.py
Last active October 13, 2024 06:40
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:
@tribut
tribut / ds102-3.yaml
Created August 6, 2019 14:26
Esphome config for DS102 (3 Gang)
substitutions:
device_name: your_device_name
friendly_name: "Your Device Name"
api_password: !secret api_password
ota_password: !secret ota_password
esphome:
name: ${device_name}
platform: ESP8266
board: esp01_1m
var pageSpeedApiKey = '';
var pageSpeedMonitorUrl = '';
function monitor() {
var desktop = callPageSpeed('desktop', pageSpeedMonitorUrl);
var mobile = callPageSpeed('mobile', pageSpeedMonitorUrl);
var desktopVitals = getVitals(desktop);
var mobileVitals = getVitals(mobile);
@frenck
frenck / hassio_ubuntu_install_commands.sh
Last active February 1, 2023 05:38
Simple install command for installing Hass.io on a Generic Ubuntu/Debian machine
Unbuntu is no longer support by the Home Assistant project.
The installation commands previous listed here, are not up 2 date, not recommended, not supported and, therefore, removed.
@hjbotha
hjbotha / free_ports.sh
Last active November 17, 2024 08:58
Free ports 80 and 443 on Synology NAS
#! /bin/bash
# NEWLY ADDED BACKUP FUNCTIONALITY IS NOT FULLY TESTED YET, USE WITH CARE, ESPECIALLY DELETION
# Developed for DSM 6 - 7.0.1. Not tested on other versions.
# Steps to install
# Save this script in one of your shares
# Edit it according to your requirements
# Backup /usr/syno/share/nginx/ as follows:
# # cd /usr/syno/share/
# # tar cvf ~/nginx.tar nginx
@vladkras
vladkras / default.conf
Last active January 17, 2024 09:59
NGINX redirect to app store and google play based on user agent
location = /gotoapp {
if ($http_user_agent ~* "iphone|ipod|ipad|appletv") {
return 301 https://www.apple.com/lae/ios/app-store/;
}
if ($http_user_agent ~* "android") {
return 301 https://play.google.com/store;
}
if ($http_user_agent ~* "Windows") {
return 301 https://www.microsoft.com/store/apps?rtc=1;
@nonsintetic
nonsintetic / tronxy-pla-s3d.txt
Created July 10, 2017 10:06
TronXY X1 - Simplify3D generic settings for PLA
Extruder:
- Nozzle Diameter: 0.40mm
- Extrusion Multiplier: 1.00 (can fiddle with this: if you get holes in top layers - increase, if you get blobs and the head digs into the current layer - decrease)
- Extrusion Width: auto
- Retraction:
- Distance: 4-6mm or less even
- Extra Restart Dist: 0.5
- Vertical Lift: 0
- Retraction Speed: 3000
- Coast at end - enabled - 0.1mm
@HeikoMamerow
HeikoMamerow / Nginx-make.txt
Last active February 9, 2022 13:23
Build nginx with Google PageSpeed, Brotli and other modules
How to build your custom Nginx
==============================
Works fine for me with Ubuntu 16.04.
Automated Install with pagespeed module (Google)
------------------------------------------------
If you interested, read the original
Source: https://developers.google.com/speed/pagespeed/module/build_ngx_pagespeed_from_source
@sebastienvercammen
sebastienvercammen / Code.gs
Last active March 9, 2022 09:58
Nintendo PTC Account Verifier for Gmail v2 with CORS proxy (via Google Scripts & jQuery)
/*
Automatically click all "Verify your email" links in the welcome e-mail from
Nintendo Pokémon Trainer Club's signup e-mails.
Only unread emails in inbox will be processed.
All processed e-mails will be marked as read if verification was successful,
and optionally moved to trash if it's enabled in your settings.
How to use:
1. Login to Gmail
anonymous
anonymous / GAME_MASTER_v0_1.protobuf
Created July 16, 2016 16:31
Pokemon Go decoded GAME_MASTER protobuf file v0.1
Result: 1
Items {
TemplateId: "BADGE_BATTLE_ATTACK_WON"
Badge {
BadgeType: BADGE_BATTLE_ATTACK_WON
BadgeRanks: 4
Targets: "\nd\350\007"
}
}
Items {