Skip to content

Instantly share code, notes, and snippets.

@sirtaj
sirtaj / rest_shutdown.py
Created January 27, 2025 17:57
Shutdown or suspend a linux system via HTTP GET or POST.
#!/usr/bin/env python3
# WARNING: Don't use it on any system you care about.
# A super-simple linux implementation of this windows shutdown service:
# https://github.com/karpach/remote-shutdown-pc
# This makes it turn off/suspend from home assistant using rest_command.
import http.server
@sirtaj
sirtaj / minecraft-backup.sh
Created January 21, 2015 16:01
minecraft backup script
#!/bin/bash
# Backup script for minecraft server. Uses duplicity(1).
. /etc/minecraft/config
. /etc/minecraft/backup.cfg
BACKUP_URL="file://${BACKUP_TARGET}"
CONSOLE="${RUN}/console.in"

Keybase proof

I hereby claim:

  • I am sirtaj on github.
  • I am sirtaj (https://keybase.io/sirtaj) on keybase.
  • I have a public key whose fingerprint is 1F0B 9E52 538F E79D 2915 0E96 F892 17EB 1E70 C3B6

To claim this, I am signing this object: