Skip to content

Instantly share code, notes, and snippets.

@robinrm
robinrm / 50unattended-upgrades
Created March 12, 2024 19:25
APT Autoupdate config
// Unattended-Upgrade::Origins-Pattern controls which packages are
// upgraded.
//
// Lines below have the format "keyword=value,...". A
// package will be upgraded only if the values in its metadata match
// all the supplied keywords in a line. (In other words, omitted
// keywords are wild cards.) The keywords originate from the Release
// file, but several aliases are accepted. The accepted keywords are:
// a,archive,suite (eg, "stable")
// c,component (eg, "main", "contrib", "non-free")
@robinrm
robinrm / factorio-server.bat
Last active February 16, 2024 11:55
Factorio Server Script
@echo off
:initial_Section
::var defaults
set debugmode=0
::0 = Normally
::1 = Normally + Debug Skip Intro
::2 = Normally + Backup Debug Skip Intro
::3 = Only Backup Normally
::4 = Only Backup + Debug Skip Intro
::5 = Backup + delete old date file
@robinrm
robinrm / factorio-backup.bat
Created December 30, 2023 19:23
Factorio Server Backup Script
@echo off
::var defaults
::caller
set Backup_Caller="C:\_bat\Backups\Factorio Backup.bat"
set timer_m=5
set /a timer_s= %timer_m% * 60
::UI
set color_red=04
@robinrm
robinrm / nc-update.sh
Created December 17, 2023 13:19
Nextcloud Updater
#!/bin/bash
apt update
chown -R www-data:www-data /var/www
find /var/www/nextcloud/ -type d -exec chmod 750 {} \;
find /var/www/nextcloud/ -type f -exec chmod 640 {} \;
if [ -d "/var/www/nextcloud/apps/notify_push" ]; then
sudo chmod ug+x /var/www/nextcloud/apps/notify_push/bin/x86_64/notify_push
fi
clear
echo -n "Nextcloud Updates gewünscht [y|n]?"
@robinrm
robinrm / docker-compose.env
Last active December 16, 2023 15:09
docker-compose.env for paperless ngx
PAPERLESS_URL=https://paperless.domain.de
PAPERLESS_TIME_ZONE=Europe/Berlin
PAPERLESS_OCR_LANGUAGE=deu
PAPERLESS_SECRET_KEY=xXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxX
PAPERLESS_TASK_WORKERS=2
PAPERLESS_THREADS_PER_WORKER=4
PAPERLESS_ENABLE_COMPRESSION=1
# email fetching frequency / every 2 min
@robinrm
robinrm / install-paperless-ngx.sh
Last active December 16, 2023 11:55
Installer for paperless ngx with docker-compose
#!/usr/bin/env bash
ask() {
while true ; do
if [[ -z $3 ]] ; then
read -r -p "$1 [$2]: " result
else
read -r -p "$1 ($3) [$2]: " result
fi
if [[ -z $result ]]; then
@robinrm
robinrm / Minecraft Backup.bat
Last active September 17, 2023 16:55
Minecraft Server Backup Script
@echo off
::set async mode
setlocal EnableDelayedExpansion
::check for input
if !heartbeat! equ 1 (
goto initial_Section
) else (
goto no_input
)
@robinrm
robinrm / mc 1.19.2 modded.bat
Last active September 17, 2023 15:38
Minecraft 1.19.2 Modded Server Script
@echo off
:initial_Section
::var defaults
set debugmode=0
::0 = Normally
::1 = Normally + Debug Skip Intro
::2 = Normally + Backup Debug Skip Intro
::3 = Only Backup Normally
::4 = Only Backup + Debug Skip Intro
::5 = Backup + delete old date file
@robinrm
robinrm / sinusbot_update.sh
Last active May 5, 2023 11:31
edited SinusBot Updater (by Phillip Eßwein) for environments with other ntp server settings
#!/bin/bash
# SinusBot installer by Philipp Eßwein - DAThosting.eu philipp.esswein@dathosting.eu
# Vars
MACHINE=$(uname -m)
Instversion="1.5"
USE_SYSTEMD=true
@echo off
:initial_Section
::set async mode
setlocal EnableDelayedExpansion
:start_Section
::Process looking for: cmd as admin named "Local Date Time Generator"
for /f "TOKENS=2" %%a in ('tasklist /nh /fi "WINDOWTITLE eq Administrator: Local Date Time Generator"') do Set PID=%%a
if %PID% gtr 0 (