Skip to content

Instantly share code, notes, and snippets.

View Larswa's full-sized avatar

Lars W. Andersen Larswa

View GitHub Profile
# WinRM
Enable-PSRemoting -Force
Set-Item WSMan:\localhost\Service\Auth\Basic -Value $true
Set-Item WSMan:\localhost\Service\AllowUnencrypted -Value $true
New-NetFirewallRule -Name "WinRM-HTTP" -DisplayName "WinRM HTTP" -Protocol TCP -LocalPort 5985 -Action Allow
# SSH
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
Start-Service sshd
Set-Service -Name sshd -StartupType Automatic
@Larswa
Larswa / main.py
Created January 16, 2025 16:02
Prusa Connect Discord to Pushover webhook
import requests
from flask import Flask, request
# Pushover Credentials (Replace with your real credentials)
PUSHOVER_USER_KEY = "uboq658g2h4yeu72p4thxfurmu3wkj"
PUSHOVER_API_TOKEN = "atsrka2kwa2dc1a9u5xpas36znsn29"
def discord_to_pushover(request):
"""Handles Discord webhooks from Prusa Connect and forwards to Pushover."""
try:
@Larswa
Larswa / Codeserver-docker
Created March 30, 2019 22:32
Code in docker
sudo docker run --restart unless-stopped -t -p 0.0.0.0:8443:8443 -v "${PWD}:/root/project" codercom/code-server code-server --allow-http --no-auth