Skip to content

Instantly share code, notes, and snippets.

View shift's full-sized avatar
😁
High-risk experimentation often leads to significant, data-driven insights.

Vincent Palmer shift

😁
High-risk experimentation often leads to significant, data-driven insights.
View GitHub Profile
@shift
shift / afterburner
Created May 22, 2021 06:27
Extruders Klipper
microsteps: 128
full_steps_per_rotation: 200
rotation_distance: 7.68
run_current: .5
hold_current: 0.4
@shift
shift / gist:0cebeff20228ed3e79115f302235be4a
Created May 8, 2021 15:17
klipper arduino nano flashing command
avrdude -patmega328p -c arduino -b 57600 -P /dev/ttyUSB0 -v -D -Uflash:w:out/klipper.elf.hex:i
# generated by SuperSlicer 2.3.55 on 2020-12-27 at 18:45:50 UTC
[print:0.2mm]
allow_empty_layers = 0
avoid_crossing_not_first_layer = 1
avoid_crossing_perimeters = 0
bottom_fill_pattern = monotonic
bottom_solid_layers = 3
bottom_solid_min_thickness = 0
bridge_acceleration = 0
blueprint:
name: Motion-activated Light
domain: automation
source_url: https://gist.github.com/shift/d3225b4bb5d658893f70ea7b8358721c#file-motion_activated-_light-yaml
input:
motion_entity:
name: Motion Sensor
selector:
entity:
domain: binary_sensor
@shift
shift / rpi4_eufi_booting_flatcar.md
Created December 2, 2020 09:21
UEFI/iPXE booting Raspberry Pi for Flatcar Linux

UEFI/iPXE booting Raspberry Pi for Flatcar Linux

Download and compile the following https://github.com/pftf/RPi4.git. I made the following change to edk2-platforms to always enable 3GB RAM+ as TFTP booting this seems to cause issues with it remembering the options.

diff --git a/Platform/RaspberryPi/RPi4/RPi4.dsc b/Platform/RaspberryPi/RPi4/RPi4.dsc
index c481c35342..4b495b1fe8 100644
--- a/Platform/RaspberryPi/RPi4/RPi4.dsc
+++ b/Platform/RaspberryPi/RPi4/RPi4.dsc
@@ -495,7 +495,7 @@
; filament used [mm] = 8491.3
; filament used [cm3] = 20.4
; filament used [g] = 25.3
; filament cost = 0.6
; total filament used [g] = 25.3
; total filament cost = 0.6
; estimated printing time (normal mode) = 2h 50m 33s
; estimated printing time (silent mode) = 6h 5m 7s
; avoid_crossing_perimeters = 1
; bed_custom_model =
@shift
shift / config.yml
Last active March 18, 2020 13:12
Prometheus CORVID-19 Berlin
- name: coronavirus_berlin_deaths
type: object
path: $.features[*]
labels:
district: $.attributes.GEN
values:
count: $.attributes.Death
- name: coronavirus_berlin_cases
type: object
path: $.features[*]
@shift
shift / cursed_mandelbrot.c
Created November 14, 2018 14:21 — forked from DavidBuchanan314/cursed_mandelbrot.c
Compile-time mandelbrot in pure C. Outputs a PGM image file to stdout. Output can be seen at https://twitter.com/David3141593/status/1062468528115200001
#include <stdio.h>
#define SQ(x) (x)*(x)
#define M0(x,y) SQ(x)+SQ(y)<4?0:0xe0
#define M1(x,y,x0,y0) (SQ(x)+SQ(y)<4)?M0(SQ(x)-SQ(y)+(x0),2*(x)*(y)+(y0)):0xc0
#define M2(x,y,x0,y0) (SQ(x)+SQ(y)<4)?M1(SQ(x)-SQ(y)+(x0),2*(x)*(y)+(y0),x0,y0):0xa0
#define M3(x,y,x0,y0) (SQ(x)+SQ(y)<4)?M2(SQ(x)-SQ(y)+(x0),2*(x)*(y)+(y0),x0,y0):0x80
#define M4(x,y,x0,y0) (SQ(x)+SQ(y)<4)?M3(SQ(x)-SQ(y)+(x0),2*(x)*(y)+(y0),x0,y0):0x60
#define M5(x,y,x0,y0) (SQ(x)+SQ(y)<4)?M4(SQ(x)-SQ(y)+(x0),2*(x)*(y)+(y0),x0,y0):0x40
@shift
shift / usb-booted
Last active May 16, 2019 11:28
ArchLinux for Dell XPS 13 9370 4K 16GB/512GB NVME
# This assumes a wifi only system...
wifi-menu
# Grab latest mirror list for Germany sorted by speed IPv4 only.
curl -o /etc/pacman.d/mirrorlist https://www.archlinux.org/mirrorlist/?country=DE&protocol=https&ip_version=4&use_mirror_status=on
sed -i 's/\#Server/Server/g' /etc/pacman.d/mirrorlist
# Create partitions
cgdisk /dev/nvme0n1
1 512MB EFI partition # Hex code ef00
@shift
shift / openpgp.txt
Created February 9, 2016 21:25
OpenKeychain Linked Identity
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:ad717439aa363b8ee1cf820b10bc11a32b093801]