Skip to content

Instantly share code, notes, and snippets.

@tehmaze
tehmaze / printer.cfg
Last active November 5, 2022 14:05
Klipper color ramp on Mini 12864 display with NeoPixels
[neopixel fysetc_mini12864]
pin: EXP1_6
chain_count: 3
color_order: RGB
initial_RED: 0.0
initial_GREEN: 0.0
initial_BLUE: 0.4
[delayed_gcode set_displaytemp_timer]
initial_duration: 1
@tehmaze
tehmaze / jsonproxy.py
Created February 2, 2011 23:53
JSON serializer that can proxy non-standard Python types
import json
import datetime
try:
import iso8601
except ImportError:
iso8601 = None
class FancyJSONEncoder(json.JSONEncoder):
_registry = {}
@tehmaze
tehmaze / printer.cfg
Created February 28, 2022 11:08
FLSUN SR Klipper config
# This file contains common pin mappings for the BIGTREETECH SKR V1.3 board used
# in the FLSUN SuperRacer. To use this config, the firmware should be compiled
# for the LPC1768.
[mcu]
# SKR 1.3 for stepper E+sensors+heaters
serial:
[mcu:abc]
# Supernova for steppers A,B,C
@tehmaze
tehmaze / hexdump.py
Created February 13, 2011 16:23
Dump data streams
#! /usr/bin/env python
#
# _______
# ____________ _______ _\__ /_________ ___ _____
# | _ _ \ _ | ____\ _ / | |/ _ \
# | / / / / | | | /___/ _ | | / /
# |___/___/ /___/____|________|___ | |_| |___|_____/
# \__/ |___|
#
#
@tehmaze
tehmaze / ansi.py
Created May 26, 2011 15:17
ANSI Screen Rendition
#! /usr/bin/env python
'''
=======================
ANSI Screen Rendition
=======================
Library to help you use ANSI graphics on text terminals, featuring
cursor movement and color support.
@tehmaze
tehmaze / check-key.sh
Created July 10, 2011 17:32
OpenVPN Yubikey authentication
#! /bin/bash
# _______
# ____________ _______ _\__ /_________ ___ _____
# | _ _ \ _ | ____\ _ / | |/ _ \
# | / / / / | | | /___/ _ | | / /
# |___/___/ /___/____|________|___ | |_| |___|_____/
# \__/ |___|
#
# (c) 2011 Wijnand Modderman-Lenstra <maze@pyth0n.org>
# MIT License
@tehmaze
tehmaze / try_connect_ssh.sh
Created July 13, 2011 10:14
zsh/bash "command not found" handler that will use ssh if $1 resolves
#
# _______
# ____________ _______ _\__ /_________ ___ _____
# | _ _ \ _ | ____\ _ / | |/ _ \
# | / / / / | | | /___/ _ | | / /
# |___/___/ /___/____|________|___ | |_| |___|_____/
# \__/ |___|
#
#
# Put this in your ~/.zshrc or ~/.bashrc:
@tehmaze
tehmaze / i3status-maze.py
Last active September 12, 2021 22:08
i3status script
#!/usr/bin/env python2
# -*- coding: utf8; -*-
import json
import glob
import multiprocessing
import os
import sys
import time
@tehmaze
tehmaze / printer.cfg
Created May 24, 2021 19:49
CoreXY torture tests
[gcode_macro HOME]
gcode:
# home not homed axies
{% for axis in ['x', 'y', 'z'] %}
{% if axis not in printer.toolhead.homed_axes %}
G28 { axis }
{% endif %}
{% endfor %}
[gcode_macro CENTER]
This file has been truncated, but you can view the full file.
; generated by PrusaSlicer 2.3.0+ on 2021-02-20 at 22:50:29 UTC
;
; external perimeters extrusion width = 0.56mm
; perimeters extrusion width = 0.56mm
; infill extrusion width = 0.56mm
; solid infill extrusion width = 0.56mm
; top infill extrusion width = 0.50mm
; first layer extrusion width = 0.52mm