Skip to content

Instantly share code, notes, and snippets.

@dberlin
dberlin / probe.nc
Last active May 9, 2023 05:04
gcode for wincnc that finds the center of a circle
G90
G92
[X probing]
L210X [Switch low limit on X axis]
[The m28 and g31 on the next line make WinCNC stop when the limit switch is hit instead of aborting like it normally would)
l91 G1X-10 M28 G31 F30 [probe 10 inches in the negative X direction till we trigger the probe]
l212 [switch limits back]
l1 N28 V{AP0} [store current absolute position to register 28]
l91g0X0.05 [back off a little]
@andybarilla
andybarilla / hover.py
Last active August 5, 2023 06:21
DDNS Script for Hover (using their unofficial API)
#!/usr/bin/env python
"""hover.py: Provides dynamic DNS functionality for Hover.com using their unofficial API.
This script is based off one by Dan Krause: https://gist.github.com/dankrause/5585907"""
__author__ = "Andrew Barilla"
__credits__ = ["Andrew Barilla", "Dan Krause"]
__license__ = "GPL"
__version__ = "1.0"
__maintainer__ = "Andrew Barilla"
@dankrause
dankrause / _hover_example.py
Last active January 4, 2025 10:21
Example code to use the (unofficial, unsupported, undocumented) hover.com DNS API.
import requests
class HoverException(Exception):
pass
class HoverAPI(object):
def __init__(self, username, password):
params = {"username": username, "password": password}
r = requests.post("https://www.hover.com/api/login", params=params)