Skip to content

Instantly share code, notes, and snippets.

Thomas Andreas Hesse tahesse

Block or report user

Report or block tahesse

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
tahesse /
Created Mar 13, 2018
Python 3.6 type «enforcement» (/ check) through annotations or custom list of types
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import logging.config
import functools
from typing import Callable, Union
__author__ = 'Thomas Hesse'
tahesse /
Created Mar 11, 2018
Debug hidraw through hipdapi in linux python 3.6
#!/usr/bin/env python
"""Debug hidapi python library and hid devices.
You may use this utility script for debugging purposes to check if this library does work as
intended, thus detecting all plugged hid devices.
This files does also provide you with the vendor_id and product_id required by the udev rule.
tahesse /
Created Jun 23, 2017
Shell script to terminate all services started by DC/OS that run on the master node. Source:
killall nginx 2>/dev/null && echo "Killing nginx service on ports 80, 443"
for port in {53,1050,1801,2181,5050,7070,8080,8123,8181,9990,15055,15101,15201}; do
kill -9 $(netstat -tlnp | awk "/:$port */ {split(\$NF,a,\"/\"); print a[1]}") 2>/dev/null && echo "Killing service that runs on port $port"
You can’t perform that action at this time.