Skip to content

Instantly share code, notes, and snippets.

@wojtekmaj
wojtekmaj / add-missing-import-extensions.txt
Last active July 16, 2024 17:39
Visual Studio Code-compatible regular expression to add all missing import extensions
# Find
import\s(([^;]|\n)*)\sfrom\s(['"])(\.{1,2}\/.*)(?<!\.js)(?<!\.(css|pdf|png|jpg|jsx|mjs|mp3|mp4|svg|ttf))(?<!\.(avif|json|webm|webp|woff))(?<!\.woff2)(['"]);
# Replace with
import $1 from $3$4.js$7;
@JeremyKennedy
JeremyKennedy / pa_cal.cfg
Last active June 20, 2024 23:48
Klipper Pressure Advance Line Calibration Macro
[gcode_macro PA_CAL]
# Klipper pressure advance line calibration macro.
# Usage: PA_CAL BED=100 NOZZLE=240 PA_START=0.0 PA_STOP=0.1 NZL=0.4
# Or you can execute with no parameters, which will use values from printer.cfg and saved_variables.cfg.
# First prints a line with current set PA, then prints 21 additional line segments starting with PA_START, and increasing to PA_STOP.
# Based on http://realdeuce.github.io/Voron/PA/pressure_advance.html
# Cleaned up and moved to using saved_variables.cfg by u/jibbsisme
# Sourced from u/Deepsiks, assisted by u/imoftendisgruntled, u/scul86, and thanks to u/beansisfat, u/stray_r
description: Tune Pressure Advance