Skip to content

Instantly share code, notes, and snippets.

View stephenfeather's full-sized avatar

Stephen Feather stephenfeather

View GitHub Profile
@stephenfeather
stephenfeather / orca_slicer_post_processing_environment_variables.txt
Created July 7, 2025 23:05
List of Orca Slicer variables available to post_processing scripts. Acquired from 'env'.
SLIC3R_ACCEL_TO_DECEL_ENABLE
SLIC3R_ACCEL_TO_DECEL_FACTOR
SLIC3R_ACTIVATE_AIR_FILTRATION
SLIC3R_ACTIVATE_CHAMBER_TEMP_CONTROL
SLIC3R_ADAPTIVE_BED_MESH_MARGIN
SLIC3R_ADAPTIVE_PRESSURE_ADVANCE
SLIC3R_ADAPTIVE_PRESSURE_ADVANCE_BRIDGES
SLIC3R_ADAPTIVE_PRESSURE_ADVANCE_MODEL
SLIC3R_ADAPTIVE_PRESSURE_ADVANCE_OVERHANGS
SLIC3R_ADDITIONAL_COOLING_FAN_SPEED
@stephenfeather
stephenfeather / 0.16mm production @Qidi Q1 Pro 0.6 nozzle.json
Created June 7, 2025 18:46
Fiberon PA6-CF filament and process for Qidi Q1 Pro
{
"alternate_extra_wall": "1",
"bottom_shell_layers": "6",
"enable_support": "1",
"ensure_vertical_shell_thickness": "ensure_moderate",
"from": "User",
"gap_fill_target": "everywhere",
"gap_infill_speed": "60",
"inherits": "0.18mm Standard @Qidi Q1 Pro 0.6 nozzle",
"initial_layer_line_width": "0.45",
@stephenfeather
stephenfeather / gist:090a0f4f8e99132d029dc3dbaaaa67d3
Last active June 7, 2025 14:22
Qidi Q1 Pro Notes - Think of this as a scratch paper reference for various thoughts regarding the Q1 printer
Declared in qdprobe.py
MKS_PROBE_PIN_1 # Switches to peizo probe probe
QIDI_PROBE_PIN_1 # alias of MKS_PROBE_PIN_1
MKS_PROBE_PIN_2 # Switches to inductive probe
QIDI_PROBE_PIN_2 # alias of MKS_PROBE_PIN_2
PIN_1 and PIN_2 may be reversed on the Plus 4?
@stephenfeather
stephenfeather / gcode_layer_trim.py
Last active May 23, 2025 13:02
Python script to trim layers out of a .gcode file along with a Klipper macro to run it from server.
#!/usr/bin/env python3
"""
gcode_layer_trim.py — V1.2
Trim layers from a G‑code file with full audit trail *and* range checking.
Changes in 1.2
--------------
• First pass over the input counts layers to find the minimum/maximum index.
The program aborts with an error if:
– The file contains no recognised layer markers.
@stephenfeather
stephenfeather / klipper.txt
Last active April 6, 2025 14:17
Klipper commands I need to remember but dont
Klipper has a TON of commands you can use to query the configuration, setup your hardware, and use in your macros.
However, the commands are buried within pages of text and easy enough to overlook. This list is not exhaustive,
these are just the ones I need to remember but due to age, I dont.
The ones used for setup/tuning are near the top.
Klipper Commands:
QUERY_ENDSTOPS
@stephenfeather
stephenfeather / class-ExportACFField.php
Created September 18, 2024 14:00
A Class for a cli command to export all the values from a ACF field. Useful if converting from ACF metadata to terms
<?php
/**
* Adds a WP-CLI command fa:tools export-acf-field.
*
* @package FA-Toolkit
* @since 1.0.8
*/
namespace FAToolkit\Tools;
<?php
const STREAM_OPEN_FOR_INCLUDE = 128;
final class HardCoreDebugLogger
{
public static function register(string $output = 'php://stdout')
{
register_tick_function(function () use ($output) {
$bt = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1);
@stephenfeather
stephenfeather / class-delete-schema-command.php
Created July 6, 2023 21:04
This is a quick and dirty fix for Rank Math de-scheming over 60k products on a live site. Shared because Rank Math is too slow to respond. Wordpress, Woocommerce, Rank Math SEO
<?php
/**
* Plugin Name: Delete Schema WP-CLI Command
* Description: Deletes 'rank_math_rich_snippet' meta key and runs delete_schema function for WooCommerce products with 'rank_math_schema_Off' value.
* Version: 1.0.0
* Author: Stephen Feather
* Copywrite: 2023 Stephen Feather
* License: GPL2
*
* @comment As a Rank Math Pro customer we were pretty pissed to find over 60k products with schema disabled. This plugin is a one-off to fix that.
@stephenfeather
stephenfeather / pw-bulk-edit-category-count.php
Created July 3, 2023 23:16
Modification to allow the filtering of products in PW Bulk Edit based upon the number of categories a product is in. (Wordpress, Woocommerce, Pimwick)
<?php
/**
* Modification to allow the filtering of products in PW Bulk Edit based
* upon the number of categories a product is in.
*
* REF: https://www.pimwick.com/pw-bulk-edit/
*
* @author Stephen Feather
* @copyright Copyright (c) 2023
*/
@stephenfeather
stephenfeather / cleanUpMaps.sh
Created June 28, 2023 19:52
Bash script to clean up sourceMappingURL references in web files.
#!/bin/bash
# Script: grep_and_remove.sh
# Author: Stephen Feather
# Co-author: OpenAI (ChatGPT)
# Copyright (c) 2023
# All rights reserved.
# License: CC-BY-SA (https://creativecommons.org/licenses/by-sa/4.0/)