Skip to content

Instantly share code, notes, and snippets.

@herbetom
herbetom / oracle-cloud-nixos-install.md
Created February 11, 2022 23:22 — forked from misuzu/oracle-cloud-nixos-install.md
Make sure to use Ubuntu 18.04 or this may not work

Install NixOS on Oracle Cloud over Ubuntu 18.04

# install useful tools
sudo apt-get update
sudo apt-get install --no-install-recommends -y nano mc git

# prepare /boot
sudo umount /boot/efi
sudo mv /boot /boot.bak
@herbetom
herbetom / README.md
Last active July 6, 2021 16:25
Markdown Code Blocks

Markdown Code Formatting

Sending code, logs, or commands in a Markdown-enabled chat client (Element, Gitter, Mattermost, Rocket.Chat and probably others) without using code styling makes messages more cluttered than necessary.

Using it is actually relatively simple, and the effect is quite visible:

Code Blocks

Simple Code Block

```

@herbetom
herbetom / docker-compose_synapse.md
Last active February 4, 2022 13:22
Matrix Synapse with docker-compose on Debian 10 (maybe don't run stuff in Docker ;) )

Tested on Debian 10.2

mkdir /opt/matrix-synapse/
cd /opt/matrix-synapse/
wget https://raw.githubusercontent.com/matrix-org/synapse/master/contrib/docker/docker-compose.yml

Inside the docker-compose.yml i changed the port config to - 8008:8008/tcp since i will let a nginx proxy handle the ssl stuff.

@herbetom
herbetom / signieren.sh
Created August 26, 2019 19:40
Gluon sysupgrade signieren
#!/bin/sh
# basiert auf https://github.com/FreiFunkMuenster/tools/blob/master/signieren.sh
# benötigt:
# - sshfs
# - ecdsautils (https://github.com/tcatm/ecdsautils)
# - sign.sh und sigtest.sh aus dem Gluon Repo (https://github.com/freifunk-gluon/gluon/tree/master/contrib)
# herunterladen und am besten in /usr/bin ablegen. Dann ausführbar machen.
# wget https://raw.githubusercontent.com/freifunk-gluon/gluon/master/contrib/sign.sh
# wget https://raw.githubusercontent.com/freifunk-gluon/gluon/master/contrib/sigtest.sh
@herbetom
herbetom / elckarbackupNextcloudBackupScript.sh
Last active May 3, 2019 20:56
This script can be run before ElkarBackup does the backup of a nextcloud-data direcory. It stores the SQL Dump within the data directory.
#!/bin/bash
# inspired by https://github.com/elkarbackup/elkarbackup-scripts/tree/master/backup-mysql
# access to the nexecloud-DB from the user doing the backup via mysqldump must be granted somehow
URL=`echo $ELKARBACKUP_URL | cut -d ":" -f1` # user@serverip
USER="${URL%@*}" # user
HOST="${URL#*@}" # host
DIR=`echo $ELKARBACKUP_URL | cut -d ":" -f2` # path
DIR=$DIR"/sqlbkp" # path inside the main backup folder
@herbetom
herbetom / routerOSautoUpdate.txt
Last active October 17, 2018 09:31
routerOSautoUpdate
# Mikrotik RouterOS autoUpdate Script to perform an automatic
# should be run periodically. Therefore you can use the Scheduler
# E-Mail must be configured prior. Some explanation can be found
# here https://wiki.mikrotik.com/wiki/Manual:Tools/email#Properties
:local mailto "sysinfo@example.org"
/log info message="Update Checking for new Updates."
/system package update
check-for-updates once
@herbetom
herbetom / routerOSbackupToMail.txt
Last active October 17, 2018 09:31
Mikrotik Backup to E-Mail
# Mikrotik RouterOS Backup Script based on
# http://adminlog.eu/mikrotik-automated-backup/
# but changed to send E-Mails instead of an FTP upload
# E-Mail must be configured prior. Some explanation can be found
# here https://wiki.mikrotik.com/wiki/Manual:Tools/email#Properties
:local mailto "mail@example.org"
# start backup
/log info message="Backup Configuration backup started."
@herbetom
herbetom / AssemblerWithinWSL.md
Created May 15, 2018 18:40
HOWTO Run 32 Bit Assembler within the WSL (Windows Subsystem for Linux)

HOWTO Run 32 Bit Assembler within WSL (Windows Subsystem for Linux)

Running a 32bit Binary within WSL can be complicated, because at the moment WSL only runs ELF-64 binaries.

Installation of WSL is described here (docs.microsoft.com)

sudo apt update
sudo apt upgrade
apt install build-essential gcc-multilib