Skip to content

Instantly share code, notes, and snippets.

View akshmakov's full-sized avatar

Andrey Shmakov akshmakov

View GitHub Profile
@akshmakov
akshmakov / pygatt_debug_1.py
Last active March 24, 2020 21:33
pygatt debug snippet
#!/usr/bin/env python3
import pygatt
import logging
logging.basicConfig()
logging.getLogger('pygatt').setLevel(logging.DEBUG)
b = pygatt.BGAPIBackend()
b.start()
@akshmakov
akshmakov / ConvertRawToSDRAngel.py
Last active October 11, 2022 23:22 — forked from kbeckmann/ConvertRawToSDRAngel.py
Convert RAW iq samples to SDRAngel "sdriq" format
#! /bin/env python3
"""
Convert raw IQ samples to SDRIQ with header, suitable for batch processing
for use with RTL_SDR convert from unsigned 8 bit to signed 16 bit samples. using rtl_433
.cu8 - RTL_SDR Raw samples (collected via rtl_tcp)
.cs16 - converted samples for this script (or raw data from a 16 bit SDR)
Converting formats:
@akshmakov
akshmakov / Makefile
Last active August 1, 2023 16:35
Letsencrypt Automated Renewal Makefile (Cloudflare)
LETSENCRYPT_ROOT=/etc/letsencrypt
PROXY_CERT_DIR=/certs
VHOSTS=foo.example.com bar.example.com car.example.com
ACTIONS=${foreach host, $(VHOSTS), update-$(host)}
${VHOSTS}:
echo "renewing $@"; \
#docker run \
# --rm \
# -v "/etc/letsencrypt:/etc/letsencrypt" \
# -v "$$PWD/cf.ini:/cf.ini:ro" \