Skip to content

Instantly share code, notes, and snippets.

View mach0's full-sized avatar

Werner Macho mach0

  • somewhere between here and there
View GitHub Profile
@arnesund
arnesund / fetch_netatmo.py
Last active September 3, 2023 13:40
Fetch Netatmo Weather Station measurements and store in InfluxDB
#!/usr/bin/env python
import os
import sys
import json
import time
import requests
# Get your client ID and secret by creating an App at https://dev.netatmo.com/
NETATMO_CLIENT_ID = ""
NETATMO_CLIENT_SECRET = ""
@ttimasdf
ttimasdf / 00-Systemd_service_for_autossh.md
Last active October 11, 2025 22:00 — forked from thomasfr/autossh.service
Systemd service for autossh

Usage

curl -sSL https://gist.githubusercontent.com/ttimasdf/ef739670ac5d627981c5695adf4c8f98/raw/autossh@host1 | \
  sudo tee /etc/default/autossh@example
curl -sSL https://gist.githubusercontent.com/ttimasdf/ef739670ac5d627981c5695adf4c8f98/raw/autossh@.service | \
  sudo tee /etc/systemd/system/autossh@.service

sudo useradd -g nogroup -s /bin/false -m tunnel
sudo -u tunnel mkdir -p ~tunnel/.ssh # and copy your private key here
@nickoala
nickoala / gpspipe.md
Last active June 6, 2025 14:27
Log GPSD Outputs and Extract Lat/Lon

Log GPSD Outputs and Extract Lat/Lon

$ gpspipe -w             # log to stdout
$ gpspipe -w -o abc.log  # log to a file

To auto-log on startup, insert the following line to the file /etc/rc.local:

@hdoverobinson
hdoverobinson / ubxconfig.sh
Last active March 8, 2026 02:02
Configure u-blox GPS/GNSS modules with Bash
#!/bin/bash
###AUTHOR###
#Harry Dove-Robinson 5/8/2017
#harry@doverobinson.me
#https://gist.github.com/hdoverobinson
#https://github.com/hdoverobinson
###USAGE###
#This is a script used to configure u-blox GPS/GNSS modules from a text file generated by u-center.
@thomasfr
thomasfr / autossh.service
Last active June 19, 2025 05:38
Systemd service for autossh
[Unit]
Description=Keeps a tunnel to 'remote.example.com' open
After=network.target
[Service]
User=autossh
# -p [PORT]
# -l [user]
# -M 0 --> no monitoring
# -N Just open the connection and do nothing (not interactive)