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
@Fail-Safe
Fail-Safe / README.md
Created April 19, 2025 23:17 — forked from pythoninthegrass/README.md
sysctl.conf stand-in on macOS 10.15+

com.startup.sysctl.plist

As of at least macOS Catalina 10.15.3, /etc/sysctl.conf values are no longer respected and/or the file straight up doesn't exist (confirmed on macOS Monterey 12.4.)

Ran across a fio shm error: failed to setup shm segment while benchmarking SSDs. The fix was to set shmmni to 4096. The following has to happen:

  • Disable SIP
    • Disclaimer from Apple

      Warning

      Disable SIP only temporarily to perform necessary tasks, and reenable it as soon as possible. Failure to reenable SIP when you are done testing leaves your computer vulnerable to malicious code.

@Fail-Safe
Fail-Safe / bambu-ssdp-discovery.py
Created October 1, 2024 17:54 — 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:
@Fail-Safe
Fail-Safe / flush_chrome_dns.sh
Created July 20, 2024 18:58 — forked from sh4t/flush_chrome_dns.sh
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
@Fail-Safe
Fail-Safe / change-aql.sh
Created May 28, 2024 19:17
Updates all `aql_txq_limit` values to user-specified choice.
#!/bin/sh
argc() { argc=$#; }
if [ "$#" -ne 1 ]; then
echo "Usage: Enter your AQL preference as 'latency', 'balanced', 'bandwidth', or an integer value for aql_txq_limit." >&2
exit 1
fi
aql_txqs=$(find /sys/ -name 'aql_txq_limit')
@Fail-Safe
Fail-Safe / get-mt7986-fw.sh
Last active April 16, 2025 11:18
Downloads the mt7986 firmware files from a given mtk-openwrt-feeds commit hash
#!/bin/sh
if [ $# -eq 0 ]; then
printf "No arguments supplied. Please provide the commit hash for the firmware release you wish to download.\n"
exit 1
fi
# $1 will be the incoming commit hash
fw_url="https://git01.mediatek.com/plugins/gitiles/openwrt/feeds/mtk-openwrt-feeds/+archive/${1}/autobuild_mac80211_release/package/kernel/mt76/src/firmware.tar.gz"
Index: backports-6.1-rc8/net/mac80211/sta_info.c
===================================================================
--- backports-6.1-rc8.orig/net/mac80211/sta_info.c
+++ backports-6.1-rc8/net/mac80211/sta_info.c
@@ -673,12 +673,13 @@ __sta_info_alloc(struct ieee80211_sub_if
}
sta->cparams.ce_threshold = CODEL_DISABLED_THRESHOLD;
- sta->cparams.target = MS2TIME(20);
- sta->cparams.interval = MS2TIME(100);
@Fail-Safe
Fail-Safe / mt76_Brain2000.patch
Created March 9, 2023 18:37
Patch to Switch to Brain2000's mt76 Repo
diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile
index 34930d7693..87690dacd7 100644
--- a/package/kernel/mt76/Makefile
+++ b/package/kernel/mt76/Makefile
@@ -6,11 +6,11 @@ PKG_RELEASE=5
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=
-PKG_SOURCE_URL:=https://github.com/openwrt/mt76
+PKG_SOURCE_URL:=https://github.com/Brain2000/mt76