Skip to content

Instantly share code, notes, and snippets.

View pavelrevak's full-sized avatar

Pavel Revak pavelrevak

  • Slovakia
View GitHub Profile
@pavelrevak
pavelrevak / dyndnsupdate.py
Last active June 9, 2023 12:39
Simple dynamic DNS updater, emulate dyndns and noip server API, call nsupdate, without special dependencies, only dnspython
"""Dynamic DNS updater
"""
import sys
import base64 as _base64
import argparse as _argparse
import json as _json
import logging as _logging
import http.server as _httpserver
# dnspython
@pavelrevak
pavelrevak / sht30.py
Last active November 7, 2022 23:35
Micropython SHT30: reading temperature and humidity
"""Simple module for reading temperature and humidity
from SHT30 sensor for micropython
it is a simplest version only for inspiration,
where is no checking availability of sensor
and no checking CRC of data
for waiting to measured data is used clock stretching
"""
def read(i2c, address=68):
@pavelrevak
pavelrevak / .zshenv
Last active October 8, 2019 19:28
zsh@macos configuration: simple prompt in colors: "user@host time path [git branch] $"
# macports path
if [ -d "/opt/local/bin" ] ; then
PATH="/opt/local/bin:$PATH"
fi
if [ -d "/opt/local/sbin" ] ; then
PATH="/opt/local/sbin:$PATH"
fi
# user path