Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View carschrotter's full-sized avatar

MNHcC (Michael Hegenbarth) carschrotter

View GitHub Profile
<?php
/**
* Removed the house number from a german like address
* @param string $street
* @return string
*/
function removeHouseNumber($street) {
// removes the last occurrence of a house number type specification: 12. Februar-Platz 1A = 1A
//entfernt letztes vorkommen einer Hausummerntypischen Angabe: 12. Februar-Platz 1A = 1A
@carschrotter
carschrotter / bhc9938d.c
Created October 10, 2017 11:07
pilight 5 bhc9938d protocol from raw
/*
* File: bhc9938d.c
* Author: Michael Hegenbarth (carschrotter) <mnh@mn-hegenbarth.de>
*
* Created on 23. Januar 2015, 13:19
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#!/bin/bash
#simple script for make a nas from Proxmox
#setup repository
mv /etc/apt/sources.list.d/pve-enterprise.list /etc/apt/sources.list.d/pve-enterprise.list.back
echo "deb http://download.proxmox.com/debian/pve stretch pve-no-subscription" > /etc/apt/sources.list.d/pve-no-subscription.list
echo "deb http://deb.debian.org/debian buster-backports main" > /etc/apt/sources.list.d/buster-backport.list
apt update
# install cockpit
apt -t buster-backports install cockpit -y
apt install sudo git wget samba -y
@carschrotter
carschrotter / myopenhab_conf.php
Created August 14, 2021 19:20
myopenhab.org status grabber
<?php
return [
"username" => "MYUSERNAME",
"password" => "MYPASSWORD",
];