Skip to content

Instantly share code, notes, and snippets.

Tom Hensel gretel

Block or report user

Report or block gretel

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@gretel
gretel / teenyhawk_cli.txt
Last active Oct 18, 2019
emax tinyhawk (1s) setup, inspired by project mockingbird. requires betaflight 4.1 and jesc! free your inner hawk!
View teenyhawk_cli.txt
#
# diff all
# version
# Betaflight / STM32F411 (S411) 4.1.0 Sep 25 2019 / 14:08:41 (08e8afa09) MSP API: 1.42
# manufacturer_id: MTKS board_name: MATEKF411RX custom defaults: YES
# start the command batch
batch start
@gretel
gretel / install_telegraf.sh
Created Apr 23, 2019
install telegraf on openbsd 6.4 using a snapshot package for 6.5
View install_telegraf.sh
#!/bin/sh
ln -s /usr/lib/libc.so.92.5 /usr/lib/libc.so.95.0
ln -s /usr/lib/libpthread.so.25.1 /usr/lib/libpthread.so.26.1
pkg_add https://ftp.openbsd.org/pub/OpenBSD/snapshots/packages/amd64/telegraf-1.9.0.tgz
@gretel
gretel / Configuration.h
Last active Jul 2, 2019
Marlin 2.0 Configuration for a Multec M420S enabling AUTO_BED_LEVELING_UBL, JUNCTION_DEVIATION, LIN_ADVANCE, ...
View Configuration.h
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
@gretel
gretel / config.fish
Created Feb 20, 2019
the ocean is really nice today
View config.fish
### disable greeting
set -e fish_greeting
# store name of system/architecture
set -x PLATFORM (command uname -s)
# ensure set
set -x SHELL (command which fish)
# prefix for user installations
@gretel
gretel / disable.sh
Last active Jun 12, 2018 — forked from pwnsdx/disable.sh
Disable bunch of #$!@ in Sierra (Version 2.1)
View disable.sh
#!/bin/bash
# IMPORTANT: You will need to disable SIP aka Rootless in order to fully execute this script, you can reenable it after.
# WARNING: It might disable things that you may not like. Please double check the services in the TODISABLE vars.
# Get active services: launchctl list | grep -v "\-\t0"
# Find a service: grep -lR [service] /System/Library/Launch* /Library/Launch* ~/Library/LaunchAgents
# Agents to disable
TODISABLE=(
@gretel
gretel / smtpd.conf
Last active Jun 2, 2018
openbsd 6.3-current new grammer opensmtpd configuration
View smtpd.conf
# https://gist.github.com/gretel/e56956f05cc59682195ade6a089c28db
# tables
table aliases file:/etc/mail/aliases
table domains file:/etc/mail/domains
table passwd file:/etc/mail/passwd
table secrets file:/etc/mail/secrets
table deny db:/etc/mail/deny.db
table receip db:/etc/mail/receip.db
@gretel
gretel / course53.py
Last active Mar 13, 2018
cli for route53 to create/update A (ipv4) and AAAA (ipv6) records. combine with https://gist.github.com/gretel/a5bf5fa196686f986c87b994bc5f16c9
View course53.py
#!/usr/bin/env python3
# https://gist.github.com/gretel/8bb0c2936ae5cda12ae5f0bf381dd3f0
# based on https://github.com/edgan/route53-set-hostname/blob/master/route53-set-hostname.py
import boto3
import sys
import argparse
class Course53(object):
def __init__(self, region, domain, subdomain, hosted_zone_id, record_type, ipaddress, ttl):
@gretel
gretel / temphumi.py
Created Mar 13, 2018
openbsd has native support for 'ugold' temperature/humidity sensors - this does publish the measured values via mqtt
View temphumi.py
#!/usr/bin/env python3
#
# https://gist.github.com/gretel/22b7b042ef0317d779e5d114710d1e17
MQTT_HOST='mqtt.jitter.local'
import subprocess
from time import sleep
import paho.mqtt.client as mqtt
@gretel
gretel / nonstatic.py
Last active Mar 13, 2018
nanoservice "api" which listens to "dyndns" requests from a router to update records on route53 (via shellscript)
View nonstatic.py
#!/usr/local/bin/python3.6
#
# https://gist.github.com/gretel/a5bf5fa196686f986c87b994bc5f16c9
from flask import Flask, request
import ipaddress
import subprocess
PORT=5001
TIMEOUT=60
@gretel
gretel / graphite_nut.py
Created Jan 11, 2018
send basic values gathered via 'upsc' from "network ups tools" to graphite in python3
View graphite_nut.py
#!/usr/bin/env python3
#
import graphyte
import subprocess
import time
UPS_ID='apc1500@kali'
TIME_INTERVAL=15
GRAPHITE_HOST='graphite.jitter.local'
GRAPHITE_PREFIX='ups.apc1500'
You can’t perform that action at this time.