Skip to content

Instantly share code, notes, and snippets.

@rzbrk
rzbrk / 50-server.cnf
Last active November 6, 2022 13:37
Nextcloud behind Nginx Reverse Proxy. https://home.example.net/cloud is the public URL for the Nextcloud. The Nextcloud installations resides on local container with IP 192.168.2.60. The local reverse proxy is the container 192.168.2.40. There are separate container for the Nextcloud's database and Redis caching server.
# /etc/mysql/mariadb.conf.d/50-server.cnf
#
# These groups are read by MariaDB server.
# Use it for options that only the server (but not clients) should see
# this is read by the standalone daemon and embedded servers
[server]
# this is only for the mysqld standalone daemon
[mysqld]
@rzbrk
rzbrk / anleitung.md
Last active September 1, 2021 10:55
Anleitung zur Konfigurations-Änderung für das Astro Pi IR OS

Anleitung zur Einrichtung von Astro Pi IR OS für die Benutzung am Boden

Beschreibung

Astro Pi IR OS ist eine modifizierte Version des Betriebssystems Raspberry Pi OS, welche von der Raspberry Pi Foundation für den Astro Pi IR auf der Raumstation entwickelt wurde. Er ist für die dortigen Netzwerke vorkonfiguriert und security-hardened. Für eine komfortable Nutzung am Boden sind einige Änderungen empfehlenswert, die in dieser Anleitung beschrieben sind. Diese Änderungen wirken sich allerdings nicht auf die Repräsentativität aus, so dass

@rzbrk
rzbrk / call_connect
Created August 4, 2021 21:13
Kermit script to connect to Calliope Mini Microcontroller Board via USB Serial Port
#!/usr/bin/kermit +
# First argument must be present and specifying the port to use
if not defined \%1 {
echo "First argument has to be port (e.g. /dev/ttyACM0)"
exit
}
set line \%1
set speed 115200
@rzbrk
rzbrk / profiles.conf
Created May 26, 2021 16:39
My resticprofile configuration (personal notebook)
[default]
repository = "XXXX"
password-file = "/usr/local/etc/resticprofile/restic-backup.pwd"
initialize = false
[default.env]
TMPDIR = "/tmp"
[default.backup]
verbose = true
@rzbrk
rzbrk / eierwurf_mcs.pl
Created December 2, 2020 18:10
Monte-Carlo-Simulation Eierwurf
#!/usr/bin/perl -w
# ===========================================
# Laden von Perl-Modulen
# ===========================================
# Trigonometrische Funktionen, Kreiszahl Pi
use Math::Trig;
# Normalverteilte Zufallszahlen
@rzbrk
rzbrk / 20200322-144054.log
Last active March 22, 2020 14:07
Restic Test Repository Analysis
"/home/jan/temp/backup/restic-test/data/c3/c3a153419ce8c0064e27d3cbeff71e2a6acb16ceb83a1fa9ee8bc906ce933b7c", "2020-03-22 14:37:57.580592139 +0100", "b8a9972341d292132e5ca9f8acbd2555"
"/home/jan/temp/backup/restic-test/data/45/45ccfe5e9ed2386f406fa2da6662b77daba718ce4ed1c4bb3295df2900f5b208", "2020-03-22 14:37:57.569592128 +0100", "1b780a77ec89de79c829f10e7113a5ab"
"/home/jan/temp/backup/restic-test/snapshots/9e0a93a46b83972d0852efc8598e400fa9f65a23e65a370da69e0fc33db498d4", "2020-03-22 14:37:57.597592157 +0100", "8ca20f649a162d713f7695f6979c03fa"
"/home/jan/temp/backup/restic-test/config", "2020-03-22 14:37:15.673548243 +0100", "fcdf943a4ecba6697f26d04867dd7891"
"/home/jan/temp/backup/restic-test/index/81b6199f6d0044154c9e926b8a3f7052c383531ab54fb13f58f81773e39e86d4", "2020-03-22 14:37:57.589592148 +0100", "87a29b03ab29dad2224034a42e80fb17"
"/home/jan/temp/backup/restic-test/keys/e3080f9cfc5f76398232c133f43b5c9a485fe2164ee9f797779626f883b2af3d", "2020-03-22 14:37:15.666548236 +0100", "9399b554667f798937b8147
@rzbrk
rzbrk / esp8266_io_http.ino
Last active September 27, 2020 18:42
Read digital Input on ESP8266 and display on website
/*
ESP8266 IO HTTP
This program reads on digital input of the ESP8266 and displays
the result on a webpage. The ESP8266 connects directly to a
defined wifi on bootup.
*/
#include <ESP8266WiFi.h>
#!/bin/bash
#Quelle: http://opengeiger.de/Feinstaub/FeinstaubDatenLogger.pdf
#Anpassung für big endian unter RHEL 7
WDIR=~
while true; do
stty -F /dev/ttyUSB0 9600 raw
INPUT=$(dd conv=swab bs=10 count=1 </dev/ttyUSB0 2>/dev/null | od -x -N10 |head -n 1|cut -f2-10 -d" ");
#Ausgabe
#echo $INPUT
#echo " "
@rzbrk
rzbrk / keyb-switch
Created February 23, 2017 17:01
Switch between two keyboard maps
#!/bin/bash
###############################################################################
# Begin of configuration section
###############################################################################
# Define the default keyboard map here
default_map="de"
# Define the alternative keyboard map here
@rzbrk
rzbrk / rdiff-backup.sh
Created April 19, 2015 14:57
Backup Script based on rdiff-backup
#!/bin/bash
# Specify the directory which has to be backed up
src="/home/user/"
# Specify the directory to place the backup
dst="rdiff_user@servername::remote_path"
# Specify a file which defines the direcories or files to be EXCLUDED
# from backup