Skip to content

Instantly share code, notes, and snippets.

View smashnet's full-sized avatar

Nicolas Inden smashnet

View GitHub Profile
smashnet /
Last active September 29, 2023 10:34 — forked from Pingu501/
GitLab Artifacts Clean-Up
This is a small python script to clear up old gitlab build artifacts.
There are 3 variables you should modify:
* base_url: path to your gitlab
* access_token: your personal access token to make gitlab api calls
* delete_everything_older_than: configure the timedelta as you wish
By default this script does only make dry-runs and does not actually delete any files!
smashnet /
Last active December 19, 2023 12:31
Library to get a lot of useful data out of Senec appliances.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
Library to get a lot of useful data out of Senec appliances.
Tested with: SENEC.Home V3 hybrid duo
* SYSTEM_STATE_NAME taken from
smashnet / docker-compose.yml
Last active December 7, 2023 05:50
Docker-Compose: Mastodon v3.5.3 with Traefik v2.9
version: "3.5"
# Variables to fill in:
# Line 23: <LETSENCRYPT_MAIL_ADDRESS> - your mail address for contact with Let's Encrypt
# Line 36: <TRAEFIK_DASHBOARD_ADMIN_PASSWORD> - MD5 hash of your password (use
# Line 54: <POSTGRES_PASSWORD> - the password for the postgres db. Use the same during mastodon:setup!
# Lines 31, 86, 111: <DOMAIN> - e.g. (Must have an A record pointing to your box' IP) (AAAA for IPv6 ;)
smashnet /
Created February 8, 2019 14:37
Add new no-shell-user and add self to group
if [ -z "$1" ]; then
echo "Please provide a name for the new user!"
exit 1
echo "Creating user and group -$1- and adding you ($(whoami)) to that group."
echo -n "Sure ye wanna do this? (y/N) -> "
smashnet / node_bmp280.lua
Created February 5, 2019 12:51
NodeMCU with regular BMP280 readouts and webserver for JSON delivery
-- I assume that wifi is successfully initialized and that we have an IP already!
-- Init BMP280 sensor
altitude_measurement_location = 160
sda, scl = 6, 5
i2c.setup(0, sda, scl, i2c.SLOW)
mode = bme280.setup(nil, nil, nil, 0)
-- mode = 1 -> BMP280
-- mode = 2 -> BME280