Skip to content

Instantly share code, notes, and snippets.

View bjoern-r's full-sized avatar

Björn bjoern-r

  • Berlin; Germany
View GitHub Profile
bjoern-r / boot.cmd
Created January 30, 2024 16:34
fixed Armbian sunxi orangepi zero bootscript to boot from different partition than 1st
# Please edit /boot/armbianEnv.txt to set supported parameters
setenv load_addr "0x45000000"
setenv overlay_error "false"
# default values
setenv verbosity "1"
setenv console "both"
bjoern-r /
Created April 6, 2022 10:03
remove Proxmox PVE Subscription banner cronjob
#### add a crontab for this script
# crontab -e
# # m h dom mon dow command
# 23 0 * * * /root/
if ! fgrep -q 'void({ //{' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; then
#echo "patching ..."
sed -Ezi.bak "s/(\(\{\s+title: gettext\('No valid sub)/void\(\{ \/\/\1/g" /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js && systemctl restart pveproxy.service
bjoern-r /
Created February 21, 2022 20:53
Simple script to start/stop/restart open5gs 5G SA services using systemd
#### amf.yaml ausf.yaml nrf.yaml nssf.yaml pcf.yaml smf.yaml udm.yaml udr.yaml upf.yaml
dostart() {
for nf in $NFLIST; do
echo systemctl start open5gs-${nf}d
bjoern-r / 103.conf
Last active March 4, 2024 04:04
Proxmox VE (privileged) lxc container for running kodi with GPU, keyboard and sound
arch: amd64
cores: 2
hostname: kodipriv
memory: 2048
net0: name=eth0,bridge=vmbr0,firewall=1,hwaddr=56:94:2A:9A:8E:1B,ip=dhcp,ip6=auto,type=veth
ostype: ubuntu
parent: before_first_boot
rootfs: encrypted_zfs:subvol-103-disk-0,size=8G
swap: 512
lxc.cgroup2.devices.allow: c 226:* rwm
bjoern-r /
Last active May 10, 2022 07:58
script to control GB Cart reader/Writer BennVenn Joey Jr on linux
#set -x
for drive in sd{a,b,c,d,e,f}
## Warning: this will spin up the disk!
## TODO: just check for USB and or Vendor ID
if dd if=/dev/$rdisk bs=512 skip=0 count=1 status=none | grep -q BENNVENN ; then
bjoern-r /
Created September 29, 2021 12:43
Script to connect a Quectel 5G modem with qmicli
# Set traps to catch exite signals
trap stopservice SIGINT
trap stopservice SIGKILL
trap stopservice SIGTERM
function stopservice {
if [[ ! -z ${DATA_HANDLE} && ! -z ${CLIENT_CID} ]]
bjoern-r /
Last active December 13, 2023 22:02 — forked from rectalogic/
Parse spis and keys from "ip xfrm state" output and generate a Wireshark ESP decryption config that can decrypt an ESP capture.
#!/usr/bin/env python
Runs "ip xfrm state" and outputs lines to be added to ~/.wireshark/esp_sa
This process must be run using sudo.
This allows Wireshark to decrypt ipsec traffic captured with 'sudo tcpdump -vni any -U -w /tmp/esp.pcap "ip proto 50"'
import sys
import subprocess
bjoern-r / BatteryVoltageGuard.ino
Created April 14, 2020 18:52
Simple Arduino sketch to control a relais to switch a relais if the voltage read from the adc is below a certain level
Battery Guard
Use an arduino nano and connect the input voltage with an voltage divider to A0
I used 9kOhm and 1kOhm to get a /10 divider to be able to measure up to 50V
Switch points are for a 12v AGM battery.
The relais is controlled via D7.
#define NUM_READINGS 10
#define RELAIS_PIN 7
#define ADC_REF 5.0
bjoern-r /
Last active November 2, 2019 18:14
CodiMD docker with Oauth2 via

CodeiMD authentication via Oauth2 with django-oidc-provider

install django-oidc-provider

create application in django-oidc-provider

Configure allowed callback urls:

Configure scopes:

bjoern-r /
Last active April 9, 2019 06:30
busybox static chroot

create user

usermod -G chrootlogin joe

add to sshd_config

change file /etc/ssh/sshd_config

Subsystem sftp internal-sftp