Skip to content

Instantly share code, notes, and snippets.

View Mausy5043's full-sized avatar

Maurice (mausy5043) Hendrix Mausy5043

  • The Netherlands
  • 10:59 (UTC +02:00)
View GitHub Profile
@Mausy5043
Mausy5043 / buildbluez.sh
Last active April 7, 2023 13:56
install bleeding edge bluez on Rasberry Pi
#!/bin/sh
if [ -z "$STY" ]; then exec screen -dm -S buildbluez /bin/bash "$0"; fi
sudo cp /etc/apt/sources.list /etc/apt/sources.list.d/deb-src.list
sudo sed -i 's/^deb /deb-src /' /etc/apt/sources.list.d/deb-src.list
sudo apt-get update
sudo apt-get build-dep bluez
sudo apt -y install python3-docutils
@Mausy5043
Mausy5043 / btmon.out.txt
Created March 23, 2023 19:55
btmon output
@ MGMT Open: bluepy3-helper version 1.22 {0x0002} 310.837037
@ MGMT Command: Read Management Version Information (0x0001) plen 0 {0x0002} 310.837435
@ MGMT Event: Command Complete (0x0001) plen 6 {0x0002} 310.837453
Read Management Version Information (0x0001) plen 3
Status: Success (0x00)
Version: 1.22
< HCI Command: LE Set Scan Parameters (0x08|0x000b) plen 7 #2822 [hci0] 310.837975
Type: Passive (0x00)
Interval: 60.000 msec (0x0060)
Window: 60.000 msec (0x0060)
@Mausy5043
Mausy5043 / kamstrup_warmte.sh
Created October 15, 2022 08:38
KAMSTRUP warmtemeters
#!/bin/bash
# filenames to be corrected for your specific application
# Temp2 [87] [68]
python3 /home/pi/domoticz/scripts/python/kamstrup403.py /dev/ttyUSB-IR 87 68
# Heat Energy (verbruik) [60] [65]
python3 /home/pi/domoticz/scripts/python/kamstrup403.py /dev/ttyUSB-IR 60 65
@Mausy5043
Mausy5043 / PREP.log
Created November 28, 2021 15:36
DietPi console output
─────────────────────────────────────────────────────
DietPi v7.8.2 : 16:29 - Sun 11/28/2021
─────────────────────────────────────────────────────
- Device model : RPi 3 Model B+ (aarch64)
- CPU temp : 48'C : 118'F (Optimal temperature)
- LAN IP : 192.168.2.77 (eth0)
- MOTD : Read more about the new DietPi-Dashboard:
https://dietpi.com/docs/software/system_stats/#dietpi-dashboard
─────────────────────────────────────────────────────
@Mausy5043
Mausy5043 / 1
Last active June 7, 2019 09:01
enable installation of Cockpit on Raspberry
sudo nano /etc/apt/sources.list.d/backports.list
Add these lines:
# For Cockpit-Project
deb http://deb.debian.org/debian stretch-backports main
# This is the main Samba configuration file. You should read the
# smb.conf(5) manual page in order to understand the options listed
# here. Samba has a huge number of configurable options (perhaps too
# many!) most of which are not shown in this example
#
# Any line which starts with a ; (semi-colon) or a # (hash)
# is a comment and is ignored. In this example we will use a #
# for commentry and a ; for parts of the config file that you
# may wish to enable
#
@Mausy5043
Mausy5043 / _etc_smartd.conf
Last active January 22, 2023 22:21
My SMART configuration
# Sample configuration file for smartd. See man smartd.conf.
# Home page is: http://www.smartmontools.org
# $Id: smartd.conf 4120 2015-08-27 16:12:21Z samm2 $
# smartd will re-read the configuration file if it receives a HUP
# signal
# Sample configuration file for smartd. See man smartd.conf.
@Mausy5043
Mausy5043 / getMyIP
Created May 6, 2018 09:34
Print IP of local machine
#!/bin/bash
getMyIP() {
local _ip _line
while IFS=$': \t' read -a _line ;do
[ -z "${_line%inet}" ] &&
_ip=${_line[${#_line[1]}>4?1:2]} &&
[ "${_ip#127.0.0.1}" ] && echo $_ip && return 0
done< <(LANG=C /sbin/ifconfig)
}
@Mausy5043
Mausy5043 / simplemail.py
Last active February 18, 2018 10:25
A simple Python script to send email
#!/usr/bin/env python2.7
import sys
import getopt
import smtplib
import email.mime.text
import syslog
import os,time
from email.mime.text import MIMEText
@Mausy5043
Mausy5043 / archey-m.py
Last active December 25, 2017 09:17
Python system information tool
#!/usr/bin/env python
#
# Archey-m [version 0.2.8-1]
# Archey [version 0.2.8]
#
# Archey is a system information tool written in Python.
#
# Maintained by Melik Manukyan <melik@archlinux.us>
# ASCII art by Brett Bohnenkamper <kittykatt@silverirc.com>
# Changes Jerome Launay <jerome@projet-libre.org>