Skip to content

Instantly share code, notes, and snippets.

View ckuethe's full-sized avatar

Chris Kuethe ckuethe

View GitHub Profile
#!/bin/bash
APPIMAGE_DIR="${HOME}/AppImage"
mkdir -p ${APPIMAGE_DIR}
BASE="https://download.nextcloud.com/desktop/releases/Linux"
LATEST=$(curl --silent "${BASE}/?C=M;O=D" | \
grep 'Next[Cc]loud.*[.]AppImage[.]asc' | \
head -1 | \
# because PiHole can not block TLDs on its own :(
# https://data.iana.org/TLD/tlds-alpha-by-domain.txt
(\.)(ad|bg|br|bz|cd|cf|cl|cm|cn|cz|ec|ga|gq|gt|hu|id|in|iq|ir|ke|kz|la|lt|lv|ml|nf|ng|om|pk|pw|ro|ru|sh|sy|tk|ua|vn|vu|wf|yt|zw|academy|accountant|adult|agency|art|asia|bank|bet|bid|bio|black|blackfriday|business|cab|cafe|cam|capetown|capital|casa|casino|cat|center|cfd|city|claims|click|club|coffee|company|credit|creditcard|cricket|cyou|date|desi|design|digital|direct|dog|download|estate|expert|faith|football|frl|fun|gdn|global|green|group|guide|guru|haus|hospital|host|hosting|house|icu|istanbul|kim|life|limo|link|live|loan|lol|love|management|market|mba|media|men|mobi|moe|mom|moscow|mov|nagoya|one|onion|online|ooo|ovh|party|pet|pink|plus|poker|porn|pro|quest|racing|red|rent|report|rest|review|rip|rocks|run|sale|sbs|science|services|sex|sexy|singles|skin|social|solutions|store|stream|study|style|surf|support|tattoo|tax|today|top|trade|uno|video|vin|vip|vision|wang|watch|webcam|website|win|work|world|xxx|xyz|
@ckuethe
ckuethe / btt_skr_e3_dip_changes.diff
Created October 1, 2021 04:20
Marlin 2.0.7.2 config changes to make the BTT SKR E3 DIP work with TMC2130 drivers and BLTourch.
Finally spent a while getting Marlin 2.0.7.2 compiled with all the bits the way I want.
Changes:
* Enable TMC2130
- Explicitly set the pins for TMC_USE_SW_SPI because pins.h wasn't doing it for me
- Enabled all the TMC2130 debug and status
* Enabled arc and bezier curves so I can use arcwelder
* BLTouch support
- Disable Z-Endstop as Z Probe, use PC14 (the dedicated bltouch port)
* Auto Bed Leveling (UBL)
- Restore leveling after homing
#!/usr/bin/env python3
import sys
from collections import namedtuple
import datetime
import sgp4
from sgp4 import exporter
from sgp4.api import Satrec, WGS72
from sgp4.model import Satellite
from sgp4.io import _alpha5, _to_alpha5
@ckuethe
ckuethe / doh-blocklist.txt
Last active March 17, 2024 04:51
DNS-over-HTTPS Block List
# Here are some domains I block to interfere with DNS-over-HTTPS, so that my own DNS-based security schemes work.
# If you're going to be doing this, you should probably block all outbound 53, 853, and 5353 on your network,
# except from your own internal DNS resolver (eg. pihole)
#
# Data from https://github.com/curl/curl/wiki/DNS-over-HTTPS (and other places)
1a.ns.ozer.im
8888.google
aattwwss.duckdns.org
abel.waringer-atg.de
@ckuethe
ckuethe / run_korg.py
Created January 22, 2020 18:27
run_korg
#!/usr/bin/env python
# vim: tabstop=4:softtabstop=4:shiftwidth=4:expandtab:
# Rescued from https://github.com/markfink/korg/pull/7
from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter
from korg import LineGrokker, PatternRepo
if __name__ == '__main__':
descr = "Tests a pattern on a log source"
parser = ArgumentParser(formatter_class=ArgumentDefaultsHelpFormatter, description=descr)
@ckuethe
ckuethe / ghidra_processor_docs_downloader.py
Last active November 12, 2024 18:09
Ghidra Processor Documentation Downloader
#!/usr/bin/env python
# vim: tabstop=4:softtabstop=4:shiftwidth=4:expandtab:
import os
import requests
import sys
docs = {
'68000': {
'M68000PRM.pdf': 'https://www.nxp.com/files-static/archives/doc/ref_manual/M68000PRM.pdf',
@ckuethe
ckuethe / intercrap-block-list.txt
Last active January 30, 2024 05:22
Stuff I'm not interested in contacting.
# Last updated at 2024-01-30T05:22:19Z
# Various bits of intercrap that I've observed over the years, blocked
# "because reasons". Be careful if you use this list. There are some pretty
# big ban hammers here.
# To make use of this you will need to do some sort of DNS wild-carding,
# which is beyond the scope of this document. Be careful, lest you break
# the internet, eg. blocking all of google, amazon, or cloudflare.
@ckuethe
ckuethe / micropython-ssd1306-demo.py
Created November 26, 2018 08:15
Micropython Demonstration of using an ESP8266 with integrated SSD1306
# -*- coding: utf-8 -*-
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4 syn=python
# quick demo of displaying text on an esp8266 with integrated SSD1306
# OLED such as this: https://smile.amazon.com/gp/product/B076JDVRLP
from machine import Pin, I2C
from ssd1306 import SSD1306_I2C
from random import getrandbits
@ckuethe
ckuethe / openocd-trinket.cfg
Created August 30, 2018 16:09
OpenOCD configuration for an Adafruit Trinket M0 (probably others too) connected via generic ST-Link v2 programmer
# OpenOCD configuration for the Adafruit Trinket M0
# https://www.adafruit.com/product/3500
# connected via a generic ST-Link/v2 compatible programmer
# https://amazon.com/s/?keywords=stlink%20v2
# Consult the pinout for the location of the SWCLK and SWDIO pins
# and connect the 3.3v line on the programmer to VBAT
# https://learn.adafruit.com/assets/49778
# It's not necessary to set the adapter speed, since OpenOCD