Skip to content

Instantly share code, notes, and snippets.

[led_effect case_off]
leds:
neopixel:my_neopixel (1-16)
layers:
static 0 0 top (0,0,0)
[led_effect bed_off]
leds:
neopixel:my_neopixel (17)
layers:
[gcode_macro END_PRINT]
gcode:
{% set th = printer.toolhead %}
{% set x_safe = th.position.x + 20 * (1 if th.axis_maximum.x - th.position.x > 20 else -1) %}
{% set y_safe = th.position.y + 20 * (1 if th.axis_maximum.y - th.position.y > 20 else -1) %}
{% set z_safe = [th.position.z + 2, th.axis_maximum.z]|min %}
SAVE_GCODE_STATE NAME=STATE_PRINT_END
M400
G92 E0
[temperature_sensor pi]
sensor_type: temperature_host
sensor_path: /sys/class/thermal/thermal_zone0/temp
[temperature_sensor mcu]
sensor_type: temperature_mcu
@ChainsDD
ChainsDD / 60-macros.cfg
Last active April 21, 2022 21:22
macros
[idle_timeout]
gcode:
TURN_OFF_HEATERS
M84
M106 S0
BED_LIGHT_OFF
[homing_override]
set_position_z: 0
gcode:
@ChainsDD
ChainsDD / fn_CreateMarker.sqf
Created July 2, 2017 01:56
Something slightly less crazy
private _type =
switch(toLower _difficulty) do
{
case "contamination":
{
"ExileContaminationZone";
};
default
{
_markerType;
case "hardcore":
{
_markerType = "ExileMissionHardcoreIcon";
"ColorBlack"
};
case "contamination":
{
_markerIcon = "ExileContaminationZone";
"ColorRed"
};
@ChainsDD
ChainsDD / ApiModels.kt
Created December 12, 2016 01:07
Moshi custom type adapter on Kotlin
class RedditLink(
val author: String,
val likes: RedditLikes,
val title: String,
val score: Int
)
enum class RedditLikes {
UP, DOWN, NONE
}