Skip to content

Instantly share code, notes, and snippets.

View MaObOriginal's full-sized avatar
🎯
Focusing

Martin MaObOriginal

🎯
Focusing
  • Hochschule Mainz
  • Germany/Wiesbaden
View GitHub Profile
@antonmihaylov
antonmihaylov / docker-compose.yaml
Created November 20, 2022 10:02
Docker Compose + Traefik proxy and certificate management
version: "3.8"
# Before you run the containers add the network using
# docker network create main
networks:
main:
external: true
volumes:
acme-certs:
@Mr-Groch
Mr-Groch / offline-notification-for-sensors-with-last_seen.yaml
Last active October 16, 2025 21:12
Home Assistant Blueprint: Offline detection for Z2M devices with last_seen
blueprint:
name: Offline detection for Z2M devices with last_seen
description: Regularly test all sensors with 'last_seen' in name and 'timestamp' device_class
('last seen' Z2M sensors) to detect offline and if so execute an action.
domain: automation
input:
hours:
name: Hours not seen
description: Sensors not seen this amount of time are assumed to be offline.
default: 24
@ceres-c
ceres-c / CR95HF_ICODE_psw_dump.py
Created December 31, 2019 12:54
CR95HF Python script to read NXP ICODE tags in privacy mode
#!/usr/bin/python3
# Author: ceres-c 2019-12-29
# Authenticate to ICODE SLI tags
import hid
# Global defines & commands
password = [0x00, 0x00, 0x00, 0x00] # You have to find it yourself, try to search online in german ;-)
@hjbotha
hjbotha / free_ports.sh
Last active October 9, 2025 03:02
Free ports 80 and 443 on Synology NAS
#! /bin/bash
# NEWLY ADDED BACKUP FUNCTIONALITY IS NOT FULLY TESTED YET, USE WITH CARE, ESPECIALLY DELETION
# Developed for DSM 6 - 7.0.1. Not tested on other versions.
# Steps to install
# Save this script in one of your shares
# Edit it according to your requirements
# Backup /usr/syno/share/nginx/ as follows:
# # cd /usr/syno/share/
# # tar cvf ~/nginx.tar nginx
@marcan
marcan / bloom.py
Last active February 29, 2024 19:55
Simple Bloom filter implementation in Python 3 (for use with the HIBP password list)
#!/usr/bin/python3
#
# Simple Bloom filter implementation in Python 3
# Copyright 2017 Hector Martin "marcan" <marcan@marcan.st>
# Licensed under the terms of the MIT license
#
# Written to be used with the Have I been pwned? password list:
# https://haveibeenpwned.com/passwords
#
# Download the pre-computed filter here (968MB, k=11, false positive p=0.0005):
@upsuper
upsuper / bind-backup.sh
Last active December 17, 2024 01:50
Script to automatically bind and unbind external USB drive on Synology NAS
#!/bin/bash
SERIAL="00000000"
echo "Looking for device with serial $SERIAL..."
for d in /sys/bus/usb/devices/*-*; do
if [[ -f "$d/serial" ]]; then
serial=$(<"$d/serial")
if [[ "$serial" = "$SERIAL" ]]; then
device="$(basename $d)"
anonymous
anonymous / zoom.vba
Created March 9, 2016 17:21
VBA-Skript zur Einstellung einer bestimmten Zoom-Stufe
Option Explicit
Dim WithEvents myOlExp As Outlook.Explorer ' <===
Dim WithEvents objInspectors As Outlook.Inspectors
Dim WithEvents objOpenInspector As Outlook.Inspector
Dim WithEvents objMailItem As Outlook.MailItem
Private Sub Application_Startup()
Set objInspectors = Application.Inspectors
@octocat
octocat / .gitignore
Created February 27, 2014 19:38
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@leommoore
leommoore / git_cheatsheet.md
Last active October 12, 2016 20:04
Git - Cheatsheet

#Git - Cheatsheet

###Create Repo git init

###Fork (Copy) existing Repo git clone repo name

###Branching You should create a branch per feature. Create a branch.

<?php
header("Cache-Control: no-cache, must-revalidate");
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
header("Pragma: no-cache");
function human_filesize($bytes, $decimals = 2) {
$sz = 'BKMGTP';
$factor = floor((strlen($bytes) - 1) / 3);
return sprintf("%.{$decimals}f", $bytes / pow(1024, $factor)) . @$sz[$factor];
}