Skip to content

Instantly share code, notes, and snippets.

View logic's full-sized avatar
:shipit:

Ed Marshall logic

:shipit:
View GitHub Profile
@logic
logic / README.md
Created August 20, 2026 04:44
Klipper: dual part fans with tachometer

(Dropping this here in the hopes that it'll help someone else with a similar setup, because I had to go digging through a ton of old discord conversations to finalize some of this, and a search engine might actually pick this up.)

I have a Klipper (well, Kalico)-based 3d printer that I'm putting together, and the hotend has a couple of those honkin' 12V Delta 3628 4-wire fans hanging off of it for part cooling (an Annex K3 with SLM toolhead in my case, but it's a similar story for Takeoff, Calamity, Trinity, and other 3628-based toolheads). I wanted both proper PWM control of the fans (there've been reports on the Annex discord that these fans can do Very Bad Things to your 12V rail if you just soft-PWM them in a 2-wire configuration) and a usable RPM reading in Fluidd.

Wiring specific to the K3 and my Octopus Pro: at the k3rabiner (toolhead) side, I solder-bridged the part fans to "alt" voltage, wired +/-12V on each fan to their corresponding 2-pin part fan JSTs on the board, and both pairs of PWM and tach

@logic
logic / meson-g12b-bananapi-cm4-waveshare-usb.dts
Created September 28, 2024 05:46
Getting USB OTG on a Banana Pi CM4 board working
/dts-v1/;
/plugin/;
/ {
compatible = "bananapi,bpi-cm4io", "bananapi,bpi-cm4", "amlogic,a311d", "amlogic,g12b";
fragment@0 {
target = <&usb>;
__overlay__ {
dr_mode = "host";
@logic
logic / command-completion.sh
Created March 11, 2017 22:32
terminal command-completion notifications from inside tmux
# Like gnome-terminal's command-completion notifications, but usually run
# everything within a tmux window? No problem: add this to your .bashrc, and
# make sure `xdotool` is installed. Adjust the `notify-send` command line to
# taste.
#
# THIS DOESN'T WORK WITH WAYLAND. If you're on Wayland, let me know if you
# come up with a reliable way to identify the currently-focused window.
function notify_finished() {
# If we're not in tmux, fall back to gnome-terminal's notification.
[[ -z $TMUX_PANE ]] && __vte_prompt_command && return
@logic
logic / dcc.spec
Created January 31, 2017 02:38
DCC spec for Fedora
%define homedir %{_sysconfdir}/dcc
Summary: DCC is an anti-spam content filter
Name: dcc
Version: 1.3.158
Release: 1%{?dist}
URL: http://www.dcc-servers.net/dcc/
Source0: http://www.dcc-servers.net/dcc/source/old/dcc-%{version}.tar.Z
License: distributable for non-commercial use
BuildRequires: sendmail-devel
@logic
logic / gnome-background-rotation.service
Last active July 27, 2024 23:24
GNOME background rotation script
[Unit]
Description=Rotate GNOME wallpaper
[Service]
Type=oneshot
ExecStart=/bin/bash ${HOME}/bin/rotate_background.sh
@logic
logic / userContent.css
Created February 23, 2015 21:24
Ever been annoyed that GMail displays emails in text/plain in a non-proportional font? Me too. Add this to chrome/userContent.css in your Firefox profile, and be happy.
@-moz-document domain(mail.google.com)
{
.gs .ii,
textarea.Ak,
table tbody tbody tr td font,
div[aria-label="Message Body"], /* compose area */
table[aria-role="presentation"] .iA.g6, /* excerpts in conversation view */
tr.zA.yO span.y2, /* excerpts in inbox view */
.jj /* gmail offline */
{
@logic
logic / keybase.md
Created January 25, 2015 22:16
Keybase

Keybase proof

I hereby claim:

  • I am logic on github.
  • I am logic (https://keybase.io/logic) on keybase.
  • I have a public key whose fingerprint is EBEC 168B 5D9D 4F73 5AFA 4374 3E55 2B7D A4DC 85AE

To claim this, I am signing this object:

@logic
logic / remaining.py
Last active August 29, 2015 14:12
Calculate how much money you'd leave on the table, if you quit your (stock-vesting) job right now.
#!/usr/bin/env python
"""Calculate how much money you'd leave on the table if you quit right now.
Place a file named TICKER-stock.csv (where TICKER is the ticker symbol you
want to track) in the same directory as this script, formatted as:
MM/DD/YYYY,shares
Where MM is the month, DD is the date, and YYYY is the year that "shares"
@logic
logic / methodreq.py
Created May 17, 2012 02:26
Adding an HTTP method to urllib2.Request.
import urllib2
class MethodRequest(urllib2.Request):
def __init__(self, *args, **kwargs):
if 'method' in kwargs:
self._method = kwargs['method']
del kwargs['method']
else:
self._method = None
return urllib2.Request.__init__(self, *args, **kwargs)
@logic
logic / java.env
Created April 7, 2012 04:23 — forked from dln/java.env
Zookeeper RPM spec for CentOS and Fedora, including python bindings
ZOO_LOG4J_PROP="INFO,ROLLINGFILE"
ZOO_LOG_DIR="/var/log/zookeeper/"